From cde714d2cb376fff87251524832c98d8f2bd9b70 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Fri, 8 Nov 2024 10:49:53 +0100 Subject: [PATCH] fix(ios/sharing-extension): Add compat for newer ios versions --- ios/App/App.xcodeproj/project.pbxproj | 12 ++--- .../ShareViewController.swift | 15 +++++- ios/App/Podfile.lock | 52 +++++++++---------- 3 files changed, 46 insertions(+), 33 deletions(-) diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 5a746ffae3..b3492fc3c2 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -363,7 +363,7 @@ INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 5.1.1; + MARKETING_VERSION = 5.3.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "org.handmadeideas.floccus.new-bookmark"; @@ -397,7 +397,7 @@ INFOPLIST_KEY_NSHumanReadableCopyright = ""; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 5.1.1; + MARKETING_VERSION = 5.3.2; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = "org.handmadeideas.floccus.new-bookmark"; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -459,7 +459,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 5.2.4; + MARKETING_VERSION = 5.3.2; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -511,7 +511,7 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 5.2.4; + MARKETING_VERSION = 5.3.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -537,7 +537,7 @@ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 5.2.4; + MARKETING_VERSION = 5.3.2; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = org.handmadeideas.floccus; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -567,7 +567,7 @@ INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 5.2.4; + MARKETING_VERSION = 5.3.2; PRODUCT_BUNDLE_IDENTIFIER = org.handmadeideas.floccus; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/ios/App/Floccus New Bookmark/ShareViewController.swift b/ios/App/Floccus New Bookmark/ShareViewController.swift index 45b4fe70d0..d11b4349c4 100644 --- a/ios/App/Floccus New Bookmark/ShareViewController.swift +++ b/ios/App/Floccus New Bookmark/ShareViewController.swift @@ -183,7 +183,20 @@ class ShareViewController: UIViewController { var responder: UIResponder? = self while responder != nil { if let application = responder as? UIApplication { - return application.perform(#selector(openURL(_:)), with: url) != nil + if #available(iOS 10.0, *) { + // Use the updated API for iOS 10 and later + application.open(url, options: [:], completionHandler: { success in + if success { + print("URL opened successfully") + } else { + print("Failed to open URL") + } + }) + return true + } else { + // Fallback for iOS 9 or earlier, if needed + return application.openURL(url) + } } responder = responder?.next } diff --git a/ios/App/Podfile.lock b/ios/App/Podfile.lock index 9bdccef993..42467457ac 100644 --- a/ios/App/Podfile.lock +++ b/ios/App/Podfile.lock @@ -2,25 +2,25 @@ PODS: - ByteowlsCapacitorOauth2 (5.0.0): - Capacitor - OAuthSwift (= 2.2.0) - - Capacitor (5.5.1): + - Capacitor (6.1.1): - CapacitorCordova - - CapacitorApp (5.0.7): + - CapacitorApp (6.0.0): - Capacitor - - CapacitorCordova (5.5.1) - - CapacitorDevice (5.0.6): + - CapacitorBrowser (6.0.1): - Capacitor - - CapacitorFilesystem (5.1.4): + - CapacitorCordova (6.1.1) + - CapacitorDevice (6.0.0): - Capacitor - - CapacitorNetwork (5.0.6): + - CapacitorFilesystem (6.0.0): - Capacitor - - CapacitorPreferences (5.0.6): + - CapacitorNetwork (6.0.1): - Capacitor - - CapacitorShare (5.0.6): + - CapacitorPreferences (6.0.1): - Capacitor - - CapacitorSplashScreen (5.0.6): + - CapacitorShare (6.0.1): + - Capacitor + - CapacitorSplashScreen (6.0.1): - Capacitor - - CordovaPlugins (5.7.5): - - CapacitorCordova - OAuthSwift (2.2.0) - SendIntent (0.0.1): - Capacitor @@ -29,6 +29,7 @@ DEPENDENCIES: - "ByteowlsCapacitorOauth2 (from `../../node_modules/@byteowls/capacitor-oauth2`)" - "Capacitor (from `../../node_modules/@capacitor/ios`)" - "CapacitorApp (from `../../node_modules/@capacitor/app`)" + - "CapacitorBrowser (from `../../node_modules/@capacitor/browser`)" - "CapacitorCordova (from `../../node_modules/@capacitor/ios`)" - "CapacitorDevice (from `../../node_modules/@capacitor/device`)" - "CapacitorFilesystem (from `../../node_modules/@capacitor/filesystem`)" @@ -36,7 +37,6 @@ DEPENDENCIES: - "CapacitorPreferences (from `../../node_modules/@capacitor/preferences`)" - "CapacitorShare (from `../../node_modules/@capacitor/share`)" - "CapacitorSplashScreen (from `../../node_modules/@capacitor/splash-screen`)" - - CordovaPlugins (from `../capacitor-cordova-ios-plugins`) - SendIntent (from `../../node_modules/send-intent`) SPEC REPOS: @@ -50,6 +50,8 @@ EXTERNAL SOURCES: :path: "../../node_modules/@capacitor/ios" CapacitorApp: :path: "../../node_modules/@capacitor/app" + CapacitorBrowser: + :path: "../../node_modules/@capacitor/browser" CapacitorCordova: :path: "../../node_modules/@capacitor/ios" CapacitorDevice: @@ -64,26 +66,24 @@ EXTERNAL SOURCES: :path: "../../node_modules/@capacitor/share" CapacitorSplashScreen: :path: "../../node_modules/@capacitor/splash-screen" - CordovaPlugins: - :path: "../capacitor-cordova-ios-plugins" SendIntent: :path: "../../node_modules/send-intent" SPEC CHECKSUMS: ByteowlsCapacitorOauth2: 9e7cdae2bf251463a6ad89493e27fb288bf694d7 - Capacitor: 9da0a2415e3b6098511f8b5ffdb578d91ee79f8f - CapacitorApp: 17fecd0e6cb23feafac7eb0939417389038b0979 - CapacitorCordova: e128cc7688c070ca0bfa439898a5f609da8dbcfe - CapacitorDevice: 2c968f98a1ec4d22357418c1521e7ddc46c675e6 - CapacitorFilesystem: af704badfbc69f6f8623d9ed313e5490e3723dcb - CapacitorNetwork: d80b3e79bef6ec37640ee2806c19771f07ff2d0c - CapacitorPreferences: f03954bcb0ff09c792909e46bff88e3183c16b10 - CapacitorShare: cd41743331cb71d217c029de54b681cbd91e0fcc - CapacitorSplashScreen: 5fa2ab5e46cf5cc530cf16a51c80c7a986579ccd - CordovaPlugins: 95c3561aee8b676a4358d0cb037c4dd4a4af690e + Capacitor: 8941aba4364ba9d1b22188569001f2ce45cc2b00 + CapacitorApp: 9d53aec7101f7b030a950c5bdc4df8612576b279 + CapacitorBrowser: 473c7fd70ddbe541608ff09ec1be14da0078279e + CapacitorCordova: 8f2cc8d8d3619c566e9418fe8772064a94266106 + CapacitorDevice: f8fd88f9edd1261c55a109f32015b09bbbfdc4a0 + CapacitorFilesystem: 60e59ba274c234a979e7a3be2552feaadcee4263 + CapacitorNetwork: 5c94acfdddc22043f2ffaff224ce9b4aa5a179f0 + CapacitorPreferences: 72909b165bc7807103778ddbb86d5d8ce06abf71 + CapacitorShare: 02222f2457ff003e642370a9c1ecd101baaa27c8 + CapacitorSplashScreen: 61645214e8f955ff2b80f16a6a3648960fe4c89f OAuthSwift: 75efbb5bd9a4b2b71a37bd7e986bf3f55ddd54c6 SendIntent: 0a17b6984c4f27e9dfa56513267ba2c044a5a6c8 -PODFILE CHECKSUM: c782f610b4a22377261d553bd8de5783a1fee26b +PODFILE CHECKSUM: ec4a5e49843d3546e8e3d2415a3cc07be4758a27 -COCOAPODS: 1.15.2 +COCOAPODS: 1.16.2