diff --git a/VikunjaApp.xcodeproj/project.pbxproj b/VikunjaApp.xcodeproj/project.pbxproj index f89362d..513394f 100644 --- a/VikunjaApp.xcodeproj/project.pbxproj +++ b/VikunjaApp.xcodeproj/project.pbxproj @@ -10,9 +10,22 @@ DDD502722F648F9900DE4155 /* VikunjaApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VikunjaApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + EEFF00012F648F9900DE4155 /* Exceptions for "VikunjaApp" folder in "VikunjaApp" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = DDD502712F648F9900DE4155 /* VikunjaApp */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + /* Begin PBXFileSystemSynchronizedRootGroup section */ DDD502742F648F9900DE4155 /* VikunjaApp */ = { isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + EEFF00012F648F9900DE4155 /* Exceptions for "VikunjaApp" folder in "VikunjaApp" target */, + ); path = VikunjaApp; sourceTree = ""; }; @@ -82,6 +95,7 @@ TargetAttributes = { DDD502712F648F9900DE4155 = { CreatedOnToolsVersion = 26.3; + LastSwiftMigration = 2630; }; }; }; @@ -177,7 +191,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 26.2; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; @@ -234,7 +248,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 26.2; + IPHONEOS_DEPLOYMENT_TARGET = 18.6; LOCALIZATION_PREFERS_STRING_CATALOGS = YES; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; @@ -249,15 +263,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 66D85634AA; ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + GENERATE_INFOPLIST_FILE = NO; + INFOPLIST_FILE = VikunjaApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -269,6 +281,7 @@ SWIFT_APPROACHABLE_CONCURRENCY = YES; SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -280,15 +293,13 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CLANG_ENABLE_MODULES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 66D85634AA; ENABLE_PREVIEWS = YES; - GENERATE_INFOPLIST_FILE = YES; - INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; - INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; - INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + GENERATE_INFOPLIST_FILE = NO; + INFOPLIST_FILE = VikunjaApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/VikunjaApp/Assets.xcassets/AppIcon.appiconset/AppIcon.png b/VikunjaApp/Assets.xcassets/AppIcon.appiconset/AppIcon.png new file mode 100644 index 0000000..590cb19 Binary files /dev/null and b/VikunjaApp/Assets.xcassets/AppIcon.appiconset/AppIcon.png differ diff --git a/VikunjaApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/VikunjaApp/Assets.xcassets/AppIcon.appiconset/Contents.json index 2305880..87d4015 100644 --- a/VikunjaApp/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/VikunjaApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "AppIcon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -12,6 +13,7 @@ "value" : "dark" } ], + "filename" : "AppIcon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" @@ -23,6 +25,7 @@ "value" : "tinted" } ], + "filename" : "AppIcon.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/VikunjaApp/ContentView.swift b/VikunjaApp/ContentView.swift index e478aab..da64db0 100644 --- a/VikunjaApp/ContentView.swift +++ b/VikunjaApp/ContentView.swift @@ -7,18 +7,17 @@ import SwiftUI +// ⚠️ HIER die eigene IP/Port eintragen: +let vikunjaURL = URL(string: "http://192.168.178.89:3456")! + struct ContentView: View { + @State private var canGoBack = false + var body: some View { - VStack { - Image(systemName: "globe") - .imageScale(.large) - .foregroundStyle(.tint) - Text("Hello, world!") + NavigationStack { + WebView(url: vikunjaURL, canGoBack: $canGoBack) + .ignoresSafeArea() + .navigationBarHidden(true) } - .padding() } } - -#Preview { - ContentView() -} diff --git a/VikunjaApp/Info.plist b/VikunjaApp/Info.plist new file mode 100644 index 0000000..6ca6138 --- /dev/null +++ b/VikunjaApp/Info.plist @@ -0,0 +1,61 @@ + + + + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleName + $(PRODUCT_NAME) + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundlePackageType + APPL + CFBundleInfoDictionaryVersion + 6.0 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + + UIApplicationSupportsIndirectInputEvents + + UILaunchScreen + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + NSLocalNetworkUsageDescription + Wird benötigt, um auf deine lokale Vikunja-Instanz zuzugreifen. + NSAppTransportSecurity + + NSAllowsLocalNetworking + + NSExceptionDomains + + 192.168.178.89 + + NSExceptionAllowsInsecureHTTPLoads + + + + + + diff --git a/VikunjaApp/VikunjaAppApp.swift b/VikunjaApp/VikunjaApp.swift similarity index 78% rename from VikunjaApp/VikunjaAppApp.swift rename to VikunjaApp/VikunjaApp.swift index d412643..2062856 100644 --- a/VikunjaApp/VikunjaAppApp.swift +++ b/VikunjaApp/VikunjaApp.swift @@ -1,5 +1,5 @@ // -// VikunjaAppApp.swift +// VikunjaApp.swift // VikunjaApp // // Created by Justin Schwegmann on 13.03.26. @@ -8,7 +8,7 @@ import SwiftUI @main -struct VikunjaAppApp: App { +struct VikunjaApp: App { var body: some Scene { WindowGroup { ContentView() diff --git a/VikunjaApp/WebView.swift b/VikunjaApp/WebView.swift new file mode 100644 index 0000000..531faaf --- /dev/null +++ b/VikunjaApp/WebView.swift @@ -0,0 +1,43 @@ +// +// WebView.swift +// VikunjaApp +// +// Created by Justin Schwegmann on 13.03.26. +// + +import SwiftUI +import WebKit + +struct WebView: UIViewRepresentable { + let url: URL + @Binding var canGoBack: Bool + + func makeCoordinator() -> Coordinator { + Coordinator(self) + } + + func makeUIView(context: Context) -> WKWebView { + let config = WKWebViewConfiguration() + config.websiteDataStore = WKWebsiteDataStore.default() // persistent auf Disk + + let webView = WKWebView(frame: .zero, configuration: config) + webView.navigationDelegate = context.coordinator + webView.allowsBackForwardNavigationGestures = true + context.coordinator.webView = webView + webView.load(URLRequest(url: url)) + return webView + } + + func updateUIView(_ webView: WKWebView, context: Context) {} + + class Coordinator: NSObject, WKNavigationDelegate { + var parent: WebView + var webView: WKWebView? + + init(_ parent: WebView) { self.parent = parent } + + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + parent.canGoBack = webView.canGoBack + } + } +}