-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update RC JSON example to use new API #1332
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
Conversation
9647f2d
to
fc7bbbd
Compare
befc179
to
b475445
Compare
5e7e763
to
e1c5aa3
Compare
e1c5aa3
to
b9b2b48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a few comments.
@morganchen12 Thanks for the review. Any idea why the UI Tests are crashing in CI? |
Reproducing locally from command line - but not Xcode UI: 🚨 Error in fetchAndActivateRemoteConfig(): Failed to get installations token. Error : Error Domain=com.firebase.installations Code=0 "Underlying error: The operation couldn’t be completed. SecItemCopyMatching (-34018)" UserInfo={NSLocalizedFailureReason=Underlying error: The operation couldn’t be completed. SecItemCopyMatching (-34018), NSUnderlyingError=0x600003cb7ab0 {Error Domain=com.gul.keychain.ErrorDomain Code=0 "SecItemCopyMatching (-34018)" UserInfo={NSLocalizedFailureReason=SecItemCopyMatching (-34018)}}}. 2022-02-11 15:01:03.919719-0900 ConfigExample[21355:6419222] [Animation] +[UIView setAnimationsEnabled:] being called from a background thread. Performing any operation from a background thread on UIView or a subclass is not supported and may result in unexpected and insidious behavior. |
Something about the swift to the async/await fetchAndActivate API is triggering the issue. Reverting back to the old one for now. |
} | ||
|
||
extension UIViewController { | ||
public func displayError(_ error: Error?, from function: StaticString = #function) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the error you were running into had to do with how this method was being called within the async contexts. It was then being called on a background thread causing the crash (because it does UI work). Weird how it wasn't straightforward to reproduce though. I think it would work if the implementation of this method was wrapped in DispatchQueue.main.async { ... }
. That way, you could call it from whatever context and it would put itself on the main queue by itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Nick! If you have the bandwidth, would you see if you can get the async/await variation to work? Otherwise I should be able to get it to work later this week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing, I'll take a closer look later today.
Quickstart PR that accompanies firebase/firebase-ios-sdk#9084 and the new type safe Swift Codable APIs for Remote Config
Now that 8.12.0 has released, this is functional with published podspecs.