Skip to content

Commit cde714d

Browse files
committed
fix(ios/sharing-extension): Add compat for newer ios versions
1 parent d9b9db9 commit cde714d

File tree

3 files changed

+46
-33
lines changed

3 files changed

+46
-33
lines changed

ios/App/App.xcodeproj/project.pbxproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
INFOPLIST_KEY_NSHumanReadableCopyright = "";
364364
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
365365
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
366-
MARKETING_VERSION = 5.1.1;
366+
MARKETING_VERSION = 5.3.2;
367367
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
368368
MTL_FAST_MATH = YES;
369369
PRODUCT_BUNDLE_IDENTIFIER = "org.handmadeideas.floccus.new-bookmark";
@@ -397,7 +397,7 @@
397397
INFOPLIST_KEY_NSHumanReadableCopyright = "";
398398
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
399399
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
400-
MARKETING_VERSION = 5.1.1;
400+
MARKETING_VERSION = 5.3.2;
401401
MTL_FAST_MATH = YES;
402402
PRODUCT_BUNDLE_IDENTIFIER = "org.handmadeideas.floccus.new-bookmark";
403403
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -459,7 +459,7 @@
459459
GCC_WARN_UNUSED_FUNCTION = YES;
460460
GCC_WARN_UNUSED_VARIABLE = YES;
461461
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
462-
MARKETING_VERSION = 5.2.4;
462+
MARKETING_VERSION = 5.3.2;
463463
MTL_ENABLE_DEBUG_INFO = YES;
464464
ONLY_ACTIVE_ARCH = YES;
465465
SDKROOT = iphoneos;
@@ -511,7 +511,7 @@
511511
GCC_WARN_UNUSED_FUNCTION = YES;
512512
GCC_WARN_UNUSED_VARIABLE = YES;
513513
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
514-
MARKETING_VERSION = 5.2.4;
514+
MARKETING_VERSION = 5.3.2;
515515
MTL_ENABLE_DEBUG_INFO = NO;
516516
SDKROOT = iphoneos;
517517
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -537,7 +537,7 @@
537537
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
538538
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
539539
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
540-
MARKETING_VERSION = 5.2.4;
540+
MARKETING_VERSION = 5.3.2;
541541
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
542542
PRODUCT_BUNDLE_IDENTIFIER = org.handmadeideas.floccus;
543543
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -567,7 +567,7 @@
567567
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
568568
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
569569
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
570-
MARKETING_VERSION = 5.2.4;
570+
MARKETING_VERSION = 5.3.2;
571571
PRODUCT_BUNDLE_IDENTIFIER = org.handmadeideas.floccus;
572572
PRODUCT_NAME = "$(TARGET_NAME)";
573573
PROVISIONING_PROFILE_SPECIFIER = "";

ios/App/Floccus New Bookmark/ShareViewController.swift

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,20 @@ class ShareViewController: UIViewController {
183183
var responder: UIResponder? = self
184184
while responder != nil {
185185
if let application = responder as? UIApplication {
186-
return application.perform(#selector(openURL(_:)), with: url) != nil
186+
if #available(iOS 10.0, *) {
187+
// Use the updated API for iOS 10 and later
188+
application.open(url, options: [:], completionHandler: { success in
189+
if success {
190+
print("URL opened successfully")
191+
} else {
192+
print("Failed to open URL")
193+
}
194+
})
195+
return true
196+
} else {
197+
// Fallback for iOS 9 or earlier, if needed
198+
return application.openURL(url)
199+
}
187200
}
188201
responder = responder?.next
189202
}

ios/App/Podfile.lock

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@ PODS:
22
- ByteowlsCapacitorOauth2 (5.0.0):
33
- Capacitor
44
- OAuthSwift (= 2.2.0)
5-
- Capacitor (5.5.1):
5+
- Capacitor (6.1.1):
66
- CapacitorCordova
7-
- CapacitorApp (5.0.7):
7+
- CapacitorApp (6.0.0):
88
- Capacitor
9-
- CapacitorCordova (5.5.1)
10-
- CapacitorDevice (5.0.6):
9+
- CapacitorBrowser (6.0.1):
1110
- Capacitor
12-
- CapacitorFilesystem (5.1.4):
11+
- CapacitorCordova (6.1.1)
12+
- CapacitorDevice (6.0.0):
1313
- Capacitor
14-
- CapacitorNetwork (5.0.6):
14+
- CapacitorFilesystem (6.0.0):
1515
- Capacitor
16-
- CapacitorPreferences (5.0.6):
16+
- CapacitorNetwork (6.0.1):
1717
- Capacitor
18-
- CapacitorShare (5.0.6):
18+
- CapacitorPreferences (6.0.1):
1919
- Capacitor
20-
- CapacitorSplashScreen (5.0.6):
20+
- CapacitorShare (6.0.1):
21+
- Capacitor
22+
- CapacitorSplashScreen (6.0.1):
2123
- Capacitor
22-
- CordovaPlugins (5.7.5):
23-
- CapacitorCordova
2424
- OAuthSwift (2.2.0)
2525
- SendIntent (0.0.1):
2626
- Capacitor
@@ -29,14 +29,14 @@ DEPENDENCIES:
2929
- "ByteowlsCapacitorOauth2 (from `../../node_modules/@byteowls/capacitor-oauth2`)"
3030
- "Capacitor (from `../../node_modules/@capacitor/ios`)"
3131
- "CapacitorApp (from `../../node_modules/@capacitor/app`)"
32+
- "CapacitorBrowser (from `../../node_modules/@capacitor/browser`)"
3233
- "CapacitorCordova (from `../../node_modules/@capacitor/ios`)"
3334
- "CapacitorDevice (from `../../node_modules/@capacitor/device`)"
3435
- "CapacitorFilesystem (from `../../node_modules/@capacitor/filesystem`)"
3536
- "CapacitorNetwork (from `../../node_modules/@capacitor/network`)"
3637
- "CapacitorPreferences (from `../../node_modules/@capacitor/preferences`)"
3738
- "CapacitorShare (from `../../node_modules/@capacitor/share`)"
3839
- "CapacitorSplashScreen (from `../../node_modules/@capacitor/splash-screen`)"
39-
- CordovaPlugins (from `../capacitor-cordova-ios-plugins`)
4040
- SendIntent (from `../../node_modules/send-intent`)
4141

4242
SPEC REPOS:
@@ -50,6 +50,8 @@ EXTERNAL SOURCES:
5050
:path: "../../node_modules/@capacitor/ios"
5151
CapacitorApp:
5252
:path: "../../node_modules/@capacitor/app"
53+
CapacitorBrowser:
54+
:path: "../../node_modules/@capacitor/browser"
5355
CapacitorCordova:
5456
:path: "../../node_modules/@capacitor/ios"
5557
CapacitorDevice:
@@ -64,26 +66,24 @@ EXTERNAL SOURCES:
6466
:path: "../../node_modules/@capacitor/share"
6567
CapacitorSplashScreen:
6668
:path: "../../node_modules/@capacitor/splash-screen"
67-
CordovaPlugins:
68-
:path: "../capacitor-cordova-ios-plugins"
6969
SendIntent:
7070
:path: "../../node_modules/send-intent"
7171

7272
SPEC CHECKSUMS:
7373
ByteowlsCapacitorOauth2: 9e7cdae2bf251463a6ad89493e27fb288bf694d7
74-
Capacitor: 9da0a2415e3b6098511f8b5ffdb578d91ee79f8f
75-
CapacitorApp: 17fecd0e6cb23feafac7eb0939417389038b0979
76-
CapacitorCordova: e128cc7688c070ca0bfa439898a5f609da8dbcfe
77-
CapacitorDevice: 2c968f98a1ec4d22357418c1521e7ddc46c675e6
78-
CapacitorFilesystem: af704badfbc69f6f8623d9ed313e5490e3723dcb
79-
CapacitorNetwork: d80b3e79bef6ec37640ee2806c19771f07ff2d0c
80-
CapacitorPreferences: f03954bcb0ff09c792909e46bff88e3183c16b10
81-
CapacitorShare: cd41743331cb71d217c029de54b681cbd91e0fcc
82-
CapacitorSplashScreen: 5fa2ab5e46cf5cc530cf16a51c80c7a986579ccd
83-
CordovaPlugins: 95c3561aee8b676a4358d0cb037c4dd4a4af690e
74+
Capacitor: 8941aba4364ba9d1b22188569001f2ce45cc2b00
75+
CapacitorApp: 9d53aec7101f7b030a950c5bdc4df8612576b279
76+
CapacitorBrowser: 473c7fd70ddbe541608ff09ec1be14da0078279e
77+
CapacitorCordova: 8f2cc8d8d3619c566e9418fe8772064a94266106
78+
CapacitorDevice: f8fd88f9edd1261c55a109f32015b09bbbfdc4a0
79+
CapacitorFilesystem: 60e59ba274c234a979e7a3be2552feaadcee4263
80+
CapacitorNetwork: 5c94acfdddc22043f2ffaff224ce9b4aa5a179f0
81+
CapacitorPreferences: 72909b165bc7807103778ddbb86d5d8ce06abf71
82+
CapacitorShare: 02222f2457ff003e642370a9c1ecd101baaa27c8
83+
CapacitorSplashScreen: 61645214e8f955ff2b80f16a6a3648960fe4c89f
8484
OAuthSwift: 75efbb5bd9a4b2b71a37bd7e986bf3f55ddd54c6
8585
SendIntent: 0a17b6984c4f27e9dfa56513267ba2c044a5a6c8
8686

87-
PODFILE CHECKSUM: c782f610b4a22377261d553bd8de5783a1fee26b
87+
PODFILE CHECKSUM: ec4a5e49843d3546e8e3d2415a3cc07be4758a27
8888

89-
COCOAPODS: 1.15.2
89+
COCOAPODS: 1.16.2

0 commit comments

Comments
 (0)