From 4c771d8be3448c8cbbd3782abfad7980916be025 Mon Sep 17 00:00:00 2001 From: Jose Olarte III Date: Fri, 28 Nov 2025 15:47:10 +0800 Subject: [PATCH] fix: update iOS share extension deployment target and fix compatibility issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix share extension not appearing in share sheet on iOS 18.6 and earlier versions by updating deployment target and resolving API availability issues. Changes: - Update share extension deployment target from 26.1 to 14.0 - iOS 18.6 cannot use extensions requiring iOS 26.1 - UTType API requires iOS 14.0+ (used in ShareViewController) - Update share extension display name from "TimeSafariShareExtension" to "TimeSafari" for cleaner appearance in share sheet - Fix compiler warning: replace unused error binding with boolean check (if let error = error → if error != nil) The share extension now works on iOS 14.0+ (matching UTType requirements) and displays properly in the share sheet on older iOS versions. --- ios/App/App.xcodeproj/project.pbxproj | 8 ++++---- .../TimeSafariShareExtension/ShareViewController.swift | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 121d2fe8b6..621b29043e 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -566,9 +566,9 @@ GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = TimeSafariShareExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = TimeSafariShareExtension; + INFOPLIST_KEY_CFBundleDisplayName = TimeSafari; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 26.1; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -604,9 +604,9 @@ GCC_C_LANGUAGE_STANDARD = gnu17; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = TimeSafariShareExtension/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = TimeSafariShareExtension; + INFOPLIST_KEY_CFBundleDisplayName = TimeSafari; INFOPLIST_KEY_NSHumanReadableCopyright = ""; - IPHONEOS_DEPLOYMENT_TARGET = 26.1; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/ios/App/TimeSafariShareExtension/ShareViewController.swift b/ios/App/TimeSafariShareExtension/ShareViewController.swift index 316ccc99b3..c793db1b78 100644 --- a/ios/App/TimeSafariShareExtension/ShareViewController.swift +++ b/ios/App/TimeSafariShareExtension/ShareViewController.swift @@ -72,7 +72,7 @@ class ShareViewController: UIViewController { return } - if let error = error { + if error != nil { completion(false) return }