From b21c8de01fd05694a5f3d36a5d1f3172e70de339 Mon Sep 17 00:00:00 2001 From: ivar Date: Tue, 2 Dec 2025 21:50:33 +0100 Subject: Work on CameraView --- "ios/H\303\246-appen.xcodeproj/project.pbxproj" | 8 ++++---- "ios/H\303\246-appen/CameraContentView.swift" | 9 +++++++++ "ios/H\303\246-appen/CameraManager.swift" | 22 ---------------------- "ios/H\303\246-appen/CameraService.swift" | 16 ++++++++++++++++ "ios/H\303\246-appen/ClusterHit.swift" | 18 ------------------ "ios/H\303\246-appen/TabBarView.swift" | 2 +- 6 files changed, 30 insertions(+), 45 deletions(-) delete mode 100644 "ios/H\303\246-appen/CameraManager.swift" create mode 100644 "ios/H\303\246-appen/CameraService.swift" delete mode 100644 "ios/H\303\246-appen/ClusterHit.swift" diff --git "a/ios/H\303\246-appen.xcodeproj/project.pbxproj" "b/ios/H\303\246-appen.xcodeproj/project.pbxproj" index 12b0cf8..89a4707 100644 --- "a/ios/H\303\246-appen.xcodeproj/project.pbxproj" +++ "b/ios/H\303\246-appen.xcodeproj/project.pbxproj" @@ -270,8 +270,8 @@ INFOPLIST_FILE = "H--appen-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Hæ"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking"; - INFOPLIST_KEY_NSCameraUsageDescription = "This app use the camera for allowing you to post pictures"; - INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "To show you on the, and to get your position when posting images"; + INFOPLIST_KEY_NSCameraUsageDescription = "This app use the camera to allow you to post pictures"; + INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "To show you on the map and to get your position when posting images"; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; @@ -312,8 +312,8 @@ INFOPLIST_FILE = "H--appen-Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "Hæ"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking"; - INFOPLIST_KEY_NSCameraUsageDescription = "This app use the camera for allowing you to post pictures"; - INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "To show you on the, and to get your position when posting images"; + INFOPLIST_KEY_NSCameraUsageDescription = "This app use the camera to allow you to post pictures"; + INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "To show you on the map and to get your position when posting images"; INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; diff --git "a/ios/H\303\246-appen/CameraContentView.swift" "b/ios/H\303\246-appen/CameraContentView.swift" index 0819097..0a7081b 100644 --- "a/ios/H\303\246-appen/CameraContentView.swift" +++ "b/ios/H\303\246-appen/CameraContentView.swift" @@ -5,4 +5,13 @@ // Created by Ivar Løvlie on 20/10/2025. // import SwiftUI +import MijickCamera +struct CameraContentView : View +{ + var body: some View { + VStack { + Text("Hello, World!") + } + } +} diff --git "a/ios/H\303\246-appen/CameraManager.swift" "b/ios/H\303\246-appen/CameraManager.swift" deleted file mode 100644 index a2d5d39..0000000 --- "a/ios/H\303\246-appen/CameraManager.swift" +++ /dev/null @@ -1,22 +0,0 @@ -// -// CameraManager.swift -// Hæ-appen -// -// Created by Ivar Løvlie on 20/10/2025. -// - -import Foundation -import AVFoundation - -class CameraManager: NSObject { - // 1. - private let captureSession = AVCaptureSession() - // 2. - private var deviceInput: AVCaptureDeviceInput? - // 3. - private var videoOutput: AVCaptureVideoDataOutput? - // 4. - private let systemPreferredCamera = AVCaptureDevice.default(for: .auxiliaryPicture) - // 5. - private var sessionQueue = DispatchQueue(label: "video.preview.session") -} diff --git "a/ios/H\303\246-appen/CameraService.swift" "b/ios/H\303\246-appen/CameraService.swift" new file mode 100644 index 0000000..09eb654 --- /dev/null +++ "b/ios/H\303\246-appen/CameraService.swift" @@ -0,0 +1,16 @@ +// +// CameraService.swift +// Hæ-appen +// +// Created by Ivar Løvlie on 28/10/2025. +// + +import AVFoundation + +struct CameraService +{ + func setupSession() + { + + } +} diff --git "a/ios/H\303\246-appen/ClusterHit.swift" "b/ios/H\303\246-appen/ClusterHit.swift" deleted file mode 100644 index ebab096..0000000 --- "a/ios/H\303\246-appen/ClusterHit.swift" +++ /dev/null @@ -1,18 +0,0 @@ -// -// ClusterHit.swift -// Hæ-appen -// -// Created by Ivar Løvlie on 16/09/2025. -// -import GISTools -import WebKit - -struct ClusterHit : Decodable { } - -final class ClusterProvider { - func load(west:Int, south: Int, north: Int, east: Int) async throws -> [ClusterHit] { - let url = URL(string: "http://http://localhost:5281/places?w=\(west)&e=\(east)&s=\(south)&n=\(north)")! - let (data, _) = try await URLSession.shared.data(from: url) - return try JSONDecoder().decode([ClusterHit].self, from: data) - } -} diff --git "a/ios/H\303\246-appen/TabBarView.swift" "b/ios/H\303\246-appen/TabBarView.swift" index aa12188..2a88336 100644 --- "a/ios/H\303\246-appen/TabBarView.swift" +++ "b/ios/H\303\246-appen/TabBarView.swift" @@ -17,7 +17,7 @@ struct TabBarView : View { MapContentView() } Tab("", systemImage: "camera.shutter.button.fill", role: .search) { - MapContentView() + CameraContentView() } } } -- cgit v1.3