Skip to content

Commit

Permalink
Add conditional compilation to support both Swift 5 and 6 language mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tp committed Sep 26, 2024
1 parent 875bbb5 commit 6d94760
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,22 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, macos-14]
os: [macos-13, macos-14, macos-15]
package: [sign_in_with_apple/sign_in_with_apple]
xcode: ["14.3.1", "15.2", "16.0"]
flutter: ["3.19.1"]
flutter: ["3.19.1", "3.24.3"]
exclude:
- os: macos-13
xcode: 14.3.1
xcode: 15.2
- os: macos-13
xcode: 16.0
- os: macos-14
xcode: 16.0
flutter: 3.19.1
- os: macos-15
xcode: 15.2
- os: macos-15
xcode: 14.3.1
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ public enum SignInWithAppleError {
case .notInteractive:
errorCode = "authorization-error/notInteractive"
#endif



// #available(iOS 18.0, *)
case .matchedExcludedCredential:
errorCode = "authorization-error/matchedExcludedCredential"

@unknown default:
print("[SignInWithApplePlugin]: Unknown authorization error code: \(code)");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import UIKit
import Flutter


#if (os(iOS) && swift(>=6.0)) || (os(macOS) && swift(>=6.0.0))
@main
#else
@UIApplicationMain
#endif
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sign_in_with_apple
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.
version: 6.1.2
version: 6.1.3-dev1
homepage: https://github.com/aboutyou/dart_packages/tree/master/packages/sign_in_with_apple
repository: https://github.com/aboutyou/dart_packages

Expand Down

0 comments on commit 6d94760

Please sign in to comment.