Skip to content

Commit 4e10bff

Browse files
committedSep 27, 2024
Add support for Xcode 16
Fixes aboutyou#437 Example: Automatic project migration when running with Xcode 16 Use iOS 12 as minimum deployment target Upgrade example app to Swift 6 language mode Add conditional compilation to support both Swift 5 and 6 language mode
1 parent 613ffa6 commit 4e10bff

File tree

11 files changed

+60
-20
lines changed

11 files changed

+60
-20
lines changed
 

‎.github/workflows/dart.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,24 @@ jobs:
5959
runs-on: ${{ matrix.os }}
6060
strategy:
6161
matrix:
62-
os: [macos-13, macos-14]
62+
os: [macos-13, macos-14, macos-15]
6363
package: [sign_in_with_apple/sign_in_with_apple]
64-
xcode: ["14.3.1", "15.2"]
65-
flutter: ["3.19.1"]
64+
xcode: ["14.3.1", "15.2", "16.0"]
65+
flutter: ["3.19.1", "3.24.3"]
6666
exclude:
6767
- os: macos-13
68+
xcode: 15.2
69+
- os: macos-13
70+
xcode: 16.0
71+
- os: macos-14
72+
xcode: 16.0
73+
flutter: 3.19.1
74+
- os: macos-15
75+
xcode: 15.2
76+
- os: macos-15
6877
xcode: 14.3.1
78+
- os: macos-15
79+
flutter: 3.19.1
6980
steps:
7081
- uses: actions/checkout@v1
7182
- uses: actions/setup-java@v1

‎packages/sign_in_with_apple/sign_in_with_apple/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 6.1.3
2+
3+
- Support Xcode 16 (in addition to all previously supported versions)
4+
15
## 6.1.2
26

37
- Switch to modern Gradle setup (https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply) for the example app

‎packages/sign_in_with_apple/sign_in_with_apple/darwin/Classes/SignInWithAppleError.swift

+4
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ public enum SignInWithAppleError {
112112
// use https://swiftly.dev/swift-versions to match Swift to Xcode versions (as this is in practice driven by the OS SDK, not Swift version)
113113
case .notInteractive:
114114
errorCode = "authorization-error/notInteractive"
115+
#endif
116+
#if compiler(>=6.0)
117+
case .matchedExcludedCredential:
118+
errorCode = "authorization-error/matchedExcludedCredential"
115119
#endif
116120
@unknown default:
117121
print("[SignInWithApplePlugin]: Unknown authorization error code: \(code)");

‎packages/sign_in_with_apple/sign_in_with_apple/example/ios/Flutter/AppFrameworkInfo.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

‎packages/sign_in_with_apple/sign_in_with_apple/example/ios/Podfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
platform :ios, '9.0' # iOS 13 is the minimum supported for signInWithApple, however we can still build this app on older versions.
2+
platform :ios, '12.0' # iOS 13 is the minimum supported for signInWithApple, however we can still build this app on older versions.
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -38,7 +38,7 @@ post_install do |installer|
3838
installer.pods_project.targets.each do |target|
3939
flutter_additional_ios_build_settings(target)
4040
target.build_configurations.each do |config|
41-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
41+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
4242
end
4343
end
4444
end

‎packages/sign_in_with_apple/sign_in_with_apple/example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ EXTERNAL SOURCES:
1414
:path: ".symlinks/plugins/sign_in_with_apple/ios"
1515

1616
SPEC CHECKSUMS:
17-
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
17+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
1818
sign_in_with_apple: f3bf75217ea4c2c8b91823f225d70230119b8440
1919

20-
PODFILE CHECKSUM: d981cf8337d0943dd868346839125427256b32bd
20+
PODFILE CHECKSUM: 1e1f157c1a20c6bac7abde50f6d1e11fbeac5303
2121

2222
COCOAPODS: 1.11.2

‎packages/sign_in_with_apple/sign_in_with_apple/example/ios/Runner.xcodeproj/project.pbxproj

+22-10
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 46;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -68,7 +68,6 @@
6868
10135393A9089B654C7B3C80 /* Pods-Runner.release.xcconfig */,
6969
EBDBDA9BE28C8968F80280F4 /* Pods-Runner.profile.xcconfig */,
7070
);
71-
name = Pods;
7271
path = Pods;
7372
sourceTree = "<group>";
7473
};
@@ -156,7 +155,7 @@
156155
97C146E61CF9000F007C117D /* Project object */ = {
157156
isa = PBXProject;
158157
attributes = {
159-
LastUpgradeCheck = 1020;
158+
LastUpgradeCheck = 1510;
160159
ORGANIZATIONNAME = "";
161160
TargetAttributes = {
162161
97C146ED1CF9000F007C117D = {
@@ -200,10 +199,12 @@
200199
/* Begin PBXShellScriptBuildPhase section */
201200
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
202201
isa = PBXShellScriptBuildPhase;
202+
alwaysOutOfDate = 1;
203203
buildActionMask = 2147483647;
204204
files = (
205205
);
206206
inputPaths = (
207+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
207208
);
208209
name = "Thin Binary";
209210
outputPaths = (
@@ -236,6 +237,7 @@
236237
};
237238
9740EEB61CF901F6004384FC /* Run Script */ = {
238239
isa = PBXShellScriptBuildPhase;
240+
alwaysOutOfDate = 1;
239241
buildActionMask = 2147483647;
240242
files = (
241243
);
@@ -340,7 +342,7 @@
340342
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
341343
GCC_WARN_UNUSED_FUNCTION = YES;
342344
GCC_WARN_UNUSED_VARIABLE = YES;
343-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
345+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
344346
MTL_ENABLE_DEBUG_INFO = NO;
345347
SDKROOT = iphoneos;
346348
SUPPORTED_PLATFORMS = iphoneos;
@@ -358,7 +360,10 @@
358360
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
359361
ENABLE_BITCODE = NO;
360362
INFOPLIST_FILE = Runner/Info.plist;
361-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
363+
LD_RUNPATH_SEARCH_PATHS = (
364+
"$(inherited)",
365+
"@executable_path/Frameworks",
366+
);
362367
PRODUCT_BUNDLE_IDENTIFIER = com.aboutyou.dart_packages.sign_in_with_apple_example;
363368
PRODUCT_NAME = "$(TARGET_NAME)";
364369
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -414,7 +419,7 @@
414419
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
415420
GCC_WARN_UNUSED_FUNCTION = YES;
416421
GCC_WARN_UNUSED_VARIABLE = YES;
417-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
422+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
418423
MTL_ENABLE_DEBUG_INFO = YES;
419424
ONLY_ACTIVE_ARCH = YES;
420425
SDKROOT = iphoneos;
@@ -463,11 +468,12 @@
463468
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
464469
GCC_WARN_UNUSED_FUNCTION = YES;
465470
GCC_WARN_UNUSED_VARIABLE = YES;
466-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
471+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
467472
MTL_ENABLE_DEBUG_INFO = NO;
468473
SDKROOT = iphoneos;
469474
SUPPORTED_PLATFORMS = iphoneos;
470-
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
475+
SWIFT_COMPILATION_MODE = wholemodule;
476+
SWIFT_OPTIMIZATION_LEVEL = "-O";
471477
TARGETED_DEVICE_FAMILY = "1,2";
472478
VALIDATE_PRODUCT = YES;
473479
};
@@ -482,7 +488,10 @@
482488
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
483489
ENABLE_BITCODE = NO;
484490
INFOPLIST_FILE = Runner/Info.plist;
485-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
491+
LD_RUNPATH_SEARCH_PATHS = (
492+
"$(inherited)",
493+
"@executable_path/Frameworks",
494+
);
486495
PRODUCT_BUNDLE_IDENTIFIER = com.aboutyou.dart_packages.sign_in_with_apple_example;
487496
PRODUCT_NAME = "$(TARGET_NAME)";
488497
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@@ -501,7 +510,10 @@
501510
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
502511
ENABLE_BITCODE = NO;
503512
INFOPLIST_FILE = Runner/Info.plist;
504-
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
513+
LD_RUNPATH_SEARCH_PATHS = (
514+
"$(inherited)",
515+
"@executable_path/Frameworks",
516+
);
505517
PRODUCT_BUNDLE_IDENTIFIER = com.aboutyou.dart_packages.sign_in_with_apple_example;
506518
PRODUCT_NAME = "$(TARGET_NAME)";
507519
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

‎packages/sign_in_with_apple/sign_in_with_apple/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1020"
3+
LastUpgradeVersion = "1510"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

‎packages/sign_in_with_apple/sign_in_with_apple/example/ios/Runner/AppDelegate.swift

+5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import UIKit
22
import Flutter
33

4+
5+
#if (os(iOS) && swift(>=6.0)) || (os(macOS) && swift(>=6.0.0))
6+
@main
7+
#else
48
@UIApplicationMain
9+
#endif
510
@objc class AppDelegate: FlutterAppDelegate {
611
override func application(
712
_ application: UIApplication,

‎packages/sign_in_with_apple/sign_in_with_apple/example/ios/Runner/Info.plist

+4
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,9 @@
4141
</array>
4242
<key>UIViewControllerBasedStatusBarAppearance</key>
4343
<false/>
44+
<key>CADisableMinimumFrameDurationOnPhone</key>
45+
<true/>
46+
<key>UIApplicationSupportsIndirectInputEvents</key>
47+
<true/>
4448
</dict>
4549
</plist>

‎packages/sign_in_with_apple/sign_in_with_apple/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sign_in_with_apple
22
description: Flutter bridge to initiate Sign in with Apple (on iOS, macOS, and Android). Includes support for keychain entries as well as signing in with an Apple ID.
3-
version: 6.1.2
3+
version: 6.1.3
44
homepage: https://github.com/aboutyou/dart_packages/tree/master/packages/sign_in_with_apple
55
repository: https://github.com/aboutyou/dart_packages
66

0 commit comments

Comments
 (0)