Skip to content

Commit

Permalink
Fix: Set ios target version 12
Browse files Browse the repository at this point in the history
Signed-off-by: dab246 <[email protected]>
(cherry picked from commit 8ff7635)
  • Loading branch information
dab246 committed Jan 12, 2024
1 parent 1a20180 commit 2a1c5cd
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,6 @@ SPEC CHECKSUMS:
url_launcher_ios: 68d46cc9766d0c41dbdc884310529557e3cd7a86
workmanager: 0afdcf5628bbde6924c21af7836fed07b42e30e6

PODFILE CHECKSUM: e209bf81fb4facf3f68c43dbffa0b2d05ff63db0
PODFILE CHECKSUM: 91d9116a6c482e0d0b230a68097981fae7e4d07a

COCOAPODS: 1.14.3
18 changes: 9 additions & 9 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@
DEVELOPMENT_TEAM = KUT463DS29;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -978,7 +978,7 @@
DEVELOPMENT_TEAM = KUT463DS29;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1008,7 +1008,7 @@
DEVELOPMENT_TEAM = KUT463DS29;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1041,7 +1041,7 @@
INFOPLIST_FILE = TeamMailShareExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TeamMailShareExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1081,7 +1081,7 @@
INFOPLIST_FILE = TeamMailShareExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TeamMailShareExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1118,7 +1118,7 @@
INFOPLIST_FILE = TeamMailShareExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TeamMailShareExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 15.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1159,7 +1159,7 @@
INFOPLIST_FILE = TwakeMailNSE/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TwakeMailNSE;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1203,7 +1203,7 @@
INFOPLIST_FILE = TwakeMailNSE/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TwakeMailNSE;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -1245,7 +1245,7 @@
INFOPLIST_FILE = TwakeMailNSE/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TwakeMailNSE;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.2;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
13 changes: 10 additions & 3 deletions ios/TwakeCore/Network/Model/AuthenticationSSO.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ struct AuthenticationSSO: Authentication {
return false
}

guard let expireDate = expireTime.convertISO8601StringToDate(),
expireDate.isBefore(Date.now) else {
return true
if #available(iOSApplicationExtension 15, *) {
guard let expireDate = expireTime.convertISO8601StringToDate(),
expireDate.isBefore(Date.now) else {
return true
}
} else {
guard let expireDate = expireTime.convertISO8601StringToDate(),
expireDate.isBefore(Date()) else {
return true
}
}

return false
Expand Down
9 changes: 7 additions & 2 deletions ios/TwakeMailNSE/NotificationService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ class NotificationService: UNNotificationServiceExtension {
return self.notify()
}

Task {
await handleGetNewEmails(payloadData: payloadData)
if #available(iOSApplicationExtension 13.0, *) {
Task {
await handleGetNewEmails(payloadData: payloadData)
}
} else {
return self.notify()
}
}

Expand All @@ -36,6 +40,7 @@ class NotificationService: UNNotificationServiceExtension {
notify()
}

@available(iOSApplicationExtension 13.0.0, *)
private func handleGetNewEmails(payloadData: [String: Any]) async {
let mapStateChanges: [String: [TypeName: String]] = PayloadParser.shared.parsingPayloadNotification(payloadData: payloadData)

Expand Down

0 comments on commit 2a1c5cd

Please sign in to comment.