1.0.0 for iOS is ready to ship

This commit is contained in:
2025-09-14 23:07:32 -06:00
parent a3e60ce995
commit 127c25f506
33 changed files with 2646 additions and 251 deletions

View File

@@ -1,9 +1,3 @@
//
// AddEditProblemView.swift
// OpenClimb
//
// Created by OpenClimb on 2025-01-17.
//
import PhotosUI
import SwiftUI
@@ -459,19 +453,10 @@ struct AddEditProblemView: View {
private func loadSelectedPhotos() async {
for item in selectedPhotos {
if let data = try? await item.loadTransferable(type: Data.self) {
// Save to app's documents directory
let documentsPath = FileManager.default.urls(
for: .documentDirectory, in: .userDomainMask
).first!
let imageName = "photo_\(UUID().uuidString).jpg"
let imagePath = documentsPath.appendingPathComponent(imageName)
do {
try data.write(to: imagePath)
imagePaths.append(imagePath.path)
// Use ImageManager to save image
if let relativePath = ImageManager.shared.saveImageData(data) {
imagePaths.append(relativePath)
imageData.append(data)
} catch {
print("Failed to save image: \(error)")
}
}
}