summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ios/Hæ-appen.xcodeproj/project.pbxproj23
-rw-r--r--ios/Hæ-appen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved20
-rw-r--r--ios/Hæ-appen/CameraContentView.swift8
-rw-r--r--ios/Hæ-appen/CameraManager.swift22
-rw-r--r--ios/Hæ-appen/MapContentView.swift20
-rw-r--r--ios/Hæ-appen/TabBarView.swift11
6 files changed, 80 insertions, 24 deletions
diff --git a/ios/Hæ-appen.xcodeproj/project.pbxproj b/ios/Hæ-appen.xcodeproj/project.pbxproj
index d237a7b..12b0cf8 100644
--- a/ios/Hæ-appen.xcodeproj/project.pbxproj
+++ b/ios/Hæ-appen.xcodeproj/project.pbxproj
@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */
1B9B791B2E7A06C300D5AF05 /* GISTools in Frameworks */ = {isa = PBXBuildFile; productRef = 1B9B791A2E7A06C300D5AF05 /* GISTools */; };
+ 1B9E76382EA6DCD200170C86 /* MijickCamera in Frameworks */ = {isa = PBXBuildFile; productRef = 1B9E76372EA6DCD200170C86 /* MijickCamera */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -27,6 +28,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 1B9E76382EA6DCD200170C86 /* MijickCamera in Frameworks */,
1B9B791B2E7A06C300D5AF05 /* GISTools in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -71,6 +73,7 @@
name = "Hæ-appen";
packageProductDependencies = (
1B9B791A2E7A06C300D5AF05 /* GISTools */,
+ 1B9E76372EA6DCD200170C86 /* MijickCamera */,
);
productName = "Hæ-appen";
productReference = 1B9B79032E79DFB800D5AF05 /* Hæ-appen.app */;
@@ -102,6 +105,7 @@
minimizedProjectReferenceProxies = 1;
packageReferences = (
1B9B79192E7A06C300D5AF05 /* XCRemoteSwiftPackageReference "gis-tools" */,
+ 1B9E76362EA6DCD200170C86 /* XCRemoteSwiftPackageReference "Camera" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 1B9B79042E79DFB800D5AF05 /* Products */;
@@ -266,7 +270,8 @@
INFOPLIST_FILE = "H--appen-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Hæ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
- INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "";
+ 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_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
@@ -307,7 +312,8 @@
INFOPLIST_FILE = "H--appen-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Hæ";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.social-networking";
- INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "";
+ 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_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
@@ -367,6 +373,14 @@
minimumVersion = 1.3.0;
};
};
+ 1B9E76362EA6DCD200170C86 /* XCRemoteSwiftPackageReference "Camera" */ = {
+ isa = XCRemoteSwiftPackageReference;
+ repositoryURL = "https://github.com/Mijick/Camera.git";
+ requirement = {
+ kind = upToNextMajorVersion;
+ minimumVersion = 3.0.3;
+ };
+ };
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
@@ -375,6 +389,11 @@
package = 1B9B79192E7A06C300D5AF05 /* XCRemoteSwiftPackageReference "gis-tools" */;
productName = GISTools;
};
+ 1B9E76372EA6DCD200170C86 /* MijickCamera */ = {
+ isa = XCSwiftPackageProductDependency;
+ package = 1B9E76362EA6DCD200170C86 /* XCRemoteSwiftPackageReference "Camera" */;
+ productName = MijickCamera;
+ };
/* End XCSwiftPackageProductDependency section */
};
rootObject = 1B9B78FB2E79DFB800D5AF05 /* Project object */;
diff --git a/ios/Hæ-appen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ios/Hæ-appen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
index 36b946c..8b323a8 100644
--- a/ios/Hæ-appen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
+++ b/ios/Hæ-appen.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
@@ -1,7 +1,16 @@
{
- "originHash" : "a1cca039aa1704ebabd161056262205e26a4daf8a42ebb77bc98b0b620ee8fb4",
+ "originHash" : "632a8f8853aa0d419765a7b78fcd66e62b7f9aa58329c89492d24f6985316ee5",
"pins" : [
{
+ "identity" : "camera",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Mijick/Camera.git",
+ "state" : {
+ "revision" : "0f02348fcc8fbbc9224c7fbf444f182dc25d0b40",
+ "version" : "3.0.3"
+ }
+ },
+ {
"identity" : "gis-tools",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Outdooractive/gis-tools.git",
@@ -9,6 +18,15 @@
"revision" : "f7a4d2aa2acf771b79a91150f359bcd84de9ceac",
"version" : "1.13.2"
}
+ },
+ {
+ "identity" : "timer",
+ "kind" : "remoteSourceControl",
+ "location" : "https://github.com/Mijick/Timer",
+ "state" : {
+ "revision" : "342371c33c3f084d82a4818447ba77d858064c85",
+ "version" : "2.0.0"
+ }
}
],
"version" : 3
diff --git a/ios/Hæ-appen/CameraContentView.swift b/ios/Hæ-appen/CameraContentView.swift
new file mode 100644
index 0000000..0819097
--- /dev/null
+++ b/ios/Hæ-appen/CameraContentView.swift
@@ -0,0 +1,8 @@
+//
+// CameraContentView.swift
+// Hæ-appen
+//
+// Created by Ivar Løvlie on 20/10/2025.
+//
+import SwiftUI
+
diff --git a/ios/Hæ-appen/CameraManager.swift b/ios/Hæ-appen/CameraManager.swift
new file mode 100644
index 0000000..a2d5d39
--- /dev/null
+++ b/ios/Hæ-appen/CameraManager.swift
@@ -0,0 +1,22 @@
+//
+// 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æ-appen/MapContentView.swift b/ios/Hæ-appen/MapContentView.swift
index 4d35dfe..e77c2b7 100644
--- a/ios/Hæ-appen/MapContentView.swift
+++ b/ios/Hæ-appen/MapContentView.swift
@@ -14,29 +14,15 @@ struct MapContentView: View {
@State private var position: MapCameraPosition = .automatic
var annotationStringKey: LocalizedStringKey = "Annotation"
var annotationCoordinate: CLLocationCoordinate2D = CLLocationCoordinate2D.init()
- let symbolSet: [String] = ["cloud.bolt.rain.fill", "sun.rain.fill", "moon.stars.fill", "moon.fill"]
var body: some View {
- if #available(iOS 26, *) {
VStack {
Map(initialPosition: .userLocation(fallback: position), scope: mapScope)
- }.safeAreaInset(edge: .trailing) {
- GlassEffectContainer(spacing: 10.0) {
- HStack(spacing: 20.0) {
- ForEach(symbolSet.indices, id: \.self) { item in
- Image(systemName: symbolSet[item])
- .frame(width: 80.0, height: 80.0)
- .font(.system(size: 36))
- .glassEffect()
- .glassEffectUnion(id: item < 2 ? "1" : "2", namespace: mapScope)
- }
- }
- }
- }.mapScope(mapScope)
- .task {
+ }
+ .task {
LocationAuthorizer.shared.requestWhenInUse()
}
- }
+
}
}
diff --git a/ios/Hæ-appen/TabBarView.swift b/ios/Hæ-appen/TabBarView.swift
index ed0a89c..aa12188 100644
--- a/ios/Hæ-appen/TabBarView.swift
+++ b/ios/Hæ-appen/TabBarView.swift
@@ -10,12 +10,15 @@ struct TabBarView : View {
var body: some View {
if #available(iOS 26, *) {
TabView {
- Tab("Hææ", systemImage: "house") {
+ Tab("Hæ", systemImage: "network") {
+ MapContentView()
+ }
+ Tab("Resten", systemImage: "option") {
+ MapContentView()
+ }
+ Tab("", systemImage: "camera.shutter.button.fill", role: .search) {
MapContentView()
}
- }
- .tabViewBottomAccessory {
- Image(systemName: "person.fill")
}
}
}