diff --git a/Meshtastic.xcodeproj/project.pbxproj b/Meshtastic.xcodeproj/project.pbxproj index 252463b9..be06040b 100644 --- a/Meshtastic.xcodeproj/project.pbxproj +++ b/Meshtastic.xcodeproj/project.pbxproj @@ -866,7 +866,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Meshtastic/Preview Content\""; - DEVELOPMENT_TEAM = QWER3PMRVZ; + DEVELOPMENT_TEAM = GCH7VS5Y9R; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Meshtastic/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Meshtastic; @@ -876,7 +876,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.3.27; - PRODUCT_BUNDLE_IDENTIFIER = cvc.MeshtasticClient; + PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; @@ -898,7 +898,7 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"Meshtastic/Preview Content\""; - DEVELOPMENT_TEAM = QWER3PMRVZ; + DEVELOPMENT_TEAM = GCH7VS5Y9R; ENABLE_PREVIEWS = YES; INFOPLIST_FILE = Meshtastic/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = Meshtastic; @@ -908,7 +908,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.3.27; - PRODUCT_BUNDLE_IDENTIFIER = cvc.MeshtasticClient; + PRODUCT_BUNDLE_IDENTIFIER = gvh.MeshtasticClient; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; diff --git a/Meshtastic/Meshtastic.entitlements b/Meshtastic/Meshtastic.entitlements index 68669b4c..3d8c755d 100644 --- a/Meshtastic/Meshtastic.entitlements +++ b/Meshtastic/Meshtastic.entitlements @@ -4,7 +4,7 @@ com.apple.developer.associated-domains - applinks:meshtastic.org/E/* + applinks:meshtastic.org/* com.apple.security.app-sandbox diff --git a/Meshtastic/MeshtasticApp.swift b/Meshtastic/MeshtasticApp.swift index e59de623..679ebb1d 100644 --- a/Meshtastic/MeshtasticApp.swift +++ b/Meshtastic/MeshtasticApp.swift @@ -12,7 +12,7 @@ struct MeshtasticAppleApp: App { @ObservedObject private var userSettings: UserSettings = UserSettings() @State var saveQR = false - @State private var channelUrl: URL? + @State var channelUrl: URL? @Environment(\.scenePhase) var scenePhase @@ -26,20 +26,28 @@ struct MeshtasticAppleApp: App { .onContinueUserActivity(NSUserActivityTypeBrowsingWeb) { userActivity in print("QR Code URL received from the Camera \(userActivity)") - guard let channelUrl = userActivity.webpageURL else { - return + channelUrl = userActivity.webpageURL + if channelUrl!.absoluteString.lowercased().contains("https://meshtastic.org/e/#") { + saveQR = true } - - print("User wants to open URL: \(channelUrl)") - saveQR = true + + print("User wants to open URL: \(channelUrl?.relativeString)") } .sheet(isPresented: $saveQR) { - SaveChannelQRCode(channelHash: channelUrl) + SaveChannelQRCode(channelHash: channelUrl?.absoluteString ?? "Empty Channel URL") } .onOpenURL(perform: { (url) in + print("QR Code URL received from the Camera \(url)") + channelUrl = url + print("User wants to open URL: \(channelUrl?.absoluteString ?? "No QR Code Link")") + + if url.absoluteString.lowercased().contains("https://meshtastic.org/e/#") { + saveQR = true + } + //we are expecting a .mbtiles map file that contains raster data //save it to the documents directory, and name it offline_map.mbtiles let fileManager = FileManager.default diff --git a/Meshtastic/Views/Settings/SaveChannelQRCode.swift b/Meshtastic/Views/Settings/SaveChannelQRCode.swift index 650a0e9d..4024f861 100644 --- a/Meshtastic/Views/Settings/SaveChannelQRCode.swift +++ b/Meshtastic/Views/Settings/SaveChannelQRCode.swift @@ -8,7 +8,7 @@ import SwiftUI struct SaveChannelQRCode: View { - var channelHash: URL? + var channelHash: String var body: some View { @@ -22,7 +22,7 @@ struct SaveChannelQRCode: View { .font(.callout) .padding() - Text(String(channelHash?.path ?? "URL did not pass through properly")) + Text(channelHash) .font(.title2) .padding()