-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Config] Merge RemoteConfig and its Swift extension in a non-breaking way #11720
Conversation
Generated by 🚫 Danger |
Apple API Diff ReportCommit: 8d8012e [REMOVED] FirebaseRemoteConfigSwift[REMOVED] FirebaseRemoteConfigSwiftSwift:
- public enum RemoteConfigCodableError : Error
- case invalidSetDefaultsInput ( String )
- public enum RemoteConfigValueCodableError : Error
- case unsupportedType ( String )
- public extension RemoteConfig
- func decoded < Value > ( asType : Value . Type = Value . self ) throws -> Value where Value : Decodable
- func setDefaults < Value > ( from value : Value ) throws where Value : Encodable
- subscript < T > ( decodedValue key : String ) -> T ? where T : Decodable { get }
- subscript ( jsonValue key : String ) -> [ String : AnyHashable ]? { get }
- public extension RemoteConfigValue
- func decoded < Value > ( asType : Value . Type = Value . self ) throws -> Value where Value : Decodable
- @available(iOS 14.0, macOS 11.0, tvOS 14.0, watchOS 7.0, *) @propertyWrapper public struct RemoteConfigProperty < T > : DynamicProperty where T : Decodable
- public let key : String
- public var wrappedValue : T { get }
- public init ( key : String , fallback : T ) |
Coverage Report 1Affected Products
Test Logs |
zip run: https://github.com/firebase/firebase-ios-sdk/actions/runs/5958843237 edit: zip run is green 🎉 |
@paulb777, I've completed manual testing. As far as outstanding work, I'm thinking:
Do you think the above work items should be done before merging into edit: I realize I could also just do this follow-up work into |
I don't feel strongly about not merging into Note that |
The test specs to test the Swift library code are still part of the
RemoteConfigSwift.podspec
. I'm leaving them there temporarily to reduce the amount of changes to get this tested across CI.I have also left the Swift library sources in the
RemoteConfigSwift
directory. These and the tests mentioned earlier should likely be moved into a reorganizedRemoteConfig
directory.Different to #11386 in that this PR is aimed to merge the two libraries in a non-breaking way.
CocoaPods approach
FirebaseRemoteConfigSwift
pod now exports theFirebaseRemoteConfig
module and has no APIs.FirebaseRemoteConfig
pod, making it a mixed lang. pod.SPM approach
FirebaseRemoteConfigSwift
target now exports theFirebaseRemoteConfig
module and has no APIs.FirebaseRemoteConfigSwift
's previous Swift contents are moved intoFirebaseRemoteConfig
, and the ObjC sources that were inFirebaseRemoteConfig
are moved into an internal target namedFirebaseRemoteConfigInternal
. See the SPM-specific workaround for re-exporting the ObjC API from theFirebaseRemoteConfig
target that now contains only Swift extension APIs.Test cases for ensuring this is non-breaking
FirebaseRemoteConfig
via headers still builds/runsconfig / sample-build-test
spm / client-app
(seeSwiftPMTests/ClientApp/ClientApp/objc-header-import-test.m
)FirebaseRemoteConfig
via module import still builds/runsspm / client-app
(seeSwiftPMTests/ClientApp/ClientApp/objc-module-import-test.m
)FirebaseRemoteConfigSwift
and/orFirebaseRemoteConfigSwift-Swift.h
FirebaseRemoteConfigSwift
, but I'd like to understand the implications if one does.FirebaseRemoteConfigSwift-Swift.h
and there was no functional difference. Should be good here.FirebaseRemoteConfigSwift
via module import still builds/runsremoteconfig / quickstart
spm / client-app
AND SwiftUI RC app [Manual]FirebaseRemoteConfig
via module import still builds/runsFollow-up work:
FirebaseRemoteConfig/
([Config] Refactor Swift sources out of FirebaseRemoteConfigSwift #11747)FirebaseRemoteConfig-Swift.h
generated by SPM or CocoaPods becauseFirebaseRemoteConfig
had no Swift code. With this PR, it seems that in SPM, a Clang import of@import FirebaseRemoteConfig;
requires the generated header but the same import in CocoaPods does not. The reason is because of the module maps.@_exported
because without it, SPM clients wouldn't get the ObjC API from the SPMFirebaseRemoteConfigInternal
target.FirebaseRemoteConfigSwift.podspec