Conversation
|
/gemini review |
|
Would you do a thorough check to make sure that the behavior will always match the behavior of the previous Objective-C implementation I've just done a deep line-by-line comparison of the new Swift components against the original 1. Concurrency and Deduplication (Perfect Match)
2. Provider Initialization (Perfect Match)
3. Edge Cases & Type Handling (Matched & Improved)
ConclusionOutside of the
|
2 data container key regressions
The ObjC key names should be preserved. nickcooke@nickcooke-mac2 app-check (nc-swift-test) % git grep "kKeyIDStorageDefaultsSuiteName" main:AppCheckCore/Sources/
main:AppCheckCore/Sources/:AppAttestProvider/Storage/GACAppAttestKeyIDStorage.m:static NSString *const kKeyIDStorageDefaultsSuiteName = @"com.firebase.GACAppAttestKeyIDStorage";
main:AppCheckCore/Sources/:AppAttestProvider/Storage/GACAppAttestKeyIDStorage.m: _userDefaults = [[GULUserDefaults alloc] initWithSuiteName:kKeyIDStorageDefaultsSuiteName];
nickcooke@nickcooke-mac2 app-check (nc-swift-test) % git grep "kKeyIDStorageDefaultsSuiteName" pb-swift:AppCheckCore/Sources/
pb-swift:AppCheckCore/Sources/:AppAttestProvider/Storage/AppCheckCoreAppAttestKeyIDStorage.swift:private let kKeyIDStorageDefaultsSuiteName = "com.firebase.AppCheckCoreAppAttestKeyIDStorage"
pb-swift:AppCheckCore/Sources/:AppAttestProvider/Storage/AppCheckCoreAppAttestKeyIDStorage.swift: userDefaults = GULUserDefaults(suiteName: kKeyIDStorageDefaultsSuiteName)Expected: private let kKeyIDStorageDefaultsSuiteName = "com.firebase.GACAppAttestKeyIDStorage"nickcooke@nickcooke-mac2 app-check (nc-swift-test) % git grep -E "kDebugToken(Registered)?UserDefaultsKey =" main:AppCheckCore/Sources/DebugProvider/
main:AppCheckCore/Sources/DebugProvider/:GACAppCheckDebugProvider.m:static NSString *const kDebugTokenUserDefaultsKey = @"GACAppCheckDebugToken";
main:AppCheckCore/Sources/DebugProvider/:GACAppCheckDebugProvider.m:static NSString *const kDebugTokenRegisteredUserDefaultsKey = @"GACAppCheckDebugTokenRegistered";
nickcooke@nickcooke-mac2 app-check (nc-swift-test) % git grep -E "kDebugToken(Registered)?UserDefaultsKey =" pb-swift:AppCheckCore/Sources/DebugProvider/
pb-swift:AppCheckCore/Sources/DebugProvider/:AppCheckCoreDebugProvider.swift:private let kDebugTokenUserDefaultsKey = "AppCheckCoreDebugToken"
pb-swift:AppCheckCore/Sources/DebugProvider/:AppCheckCoreDebugProvider.swift:private let kDebugTokenRegisteredUserDefaultsKey = "AppCheckCoreDebugTokenRegistered"Expected: private let kDebugTokenUserDefaultsKey = "GACAppCheckDebugToken"private let kDebugTokenRegisteredUserDefaultsKey = "GACAppCheckDebugTokenRegistered" |
We'll need to keep the podspec for zip building. The podspec can be published or live on SpecsStaging. |
Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
This PR migrates AppCheckCore from Objective-C to Swift, replacing FBLPromises with async/await while maintaining Objective-C backwards compatibility.
CocoaPods port is not intended for release - only to increase test coverage, since several tests are CocoaPods only.
See google/GoogleSignIn-iOS#626 and firebase/firebase-ios-sdk#16544 for integration testing with the AppCheckCore dependencies.
Before merge:
- [ ] Remove podspecArchitectural Changes & Code Review Summary
1. Code Conversion and Modernization
FBLPromiseand manualdispatch_queuecallback chains were successfully migrated to Swiftasync/await.@objcand@objcMembersannotations were attached to Swift classes. LegacyGAC...prefixes (e.g.,@objc(GACAppCheckSettings)) were properly maintained so that down-stream clients wouldn't encounter missing symbols.objc_subclassing_restrictedattribute, breaking existing Objective-C classes that historically subclassed them (e.g.FIRAppCheckSettings). This was resolved by removing direct subclassing and satisfying protocols (GACAppCheckSettingsProtocol) instead.2. File and Structural Integrity
.swiftfiles correctly apply the Apache 2.0 license headers.AppCheckCore.h) and public module headers have been safely retired or modified to point to theAppCheckCore-Swift.hbridge.3. API Signature Consistency
initWithToken:expirationDate:receivedAtDate:explicitly uses thereceivedAt:argument label in Swift to prevent breaking compilation across SDKs that depended on Swift's automatic Clang truncation.GACAppCheckErrorDomain) do not export easily, so usages have been cleaned up or replaced by their literal string representations.4. Build and Compilation Validation
AppCheckCoreframework compiles with 0 warnings and 0 errors locally.Downstream Compatibility Matrix
Downstream Effect: A GSI 9 x Firebase 12 project that updates to GSI to 10 will have no issue. If the project updates to Firebase 13, it will need to update GSI.