Skip to content

Conversation

paulb777
Copy link
Member

@paulb777 paulb777 commented Jan 7, 2022

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.

@paulb777 paulb777 closed this Jan 7, 2022
@paulb777 paulb777 force-pushed the pb-rc-strong-typing branch from 9647f2d to fc7bbbd Compare January 7, 2022 22:36
@paulb777 paulb777 reopened this Jan 7, 2022
@paulb777 paulb777 marked this pull request as draft January 8, 2022 01:56
@paulb777 paulb777 force-pushed the pb-rc-strong-typing branch from befc179 to b475445 Compare January 8, 2022 18:38
@paulb777 paulb777 force-pushed the pb-rc-strong-typing branch from 5e7e763 to e1c5aa3 Compare January 10, 2022 23:26
@paulb777 paulb777 force-pushed the pb-rc-strong-typing branch from e1c5aa3 to b9b2b48 Compare February 9, 2022 19:13
@paulb777 paulb777 marked this pull request as ready for review February 9, 2022 19:14
@paulb777 paulb777 requested a review from morganchen12 February 9, 2022 19:27
@paulb777 paulb777 enabled auto-merge (squash) February 9, 2022 19:27
@paulb777 paulb777 requested a review from ncooke3 February 9, 2022 19:27
@paulb777 paulb777 disabled auto-merge February 9, 2022 19:58
Copy link
Contributor

@morganchen12 morganchen12 left a 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.

@paulb777
Copy link
Member Author

@morganchen12 Thanks for the review. Any idea why the UI Tests are crashing in CI?

@paulb777
Copy link
Member Author

paulb777 commented Feb 12, 2022

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.

@paulb777
Copy link
Member Author

Something about the swift to the async/await fetchAndActivate API is triggering the issue. Reverting back to the old one for now.

@paulb777 paulb777 merged commit c3ed4e6 into master Feb 12, 2022
@paulb777 paulb777 deleted the pb-rc-strong-typing branch February 12, 2022 15:59
}

extension UIViewController {
public func displayError(_ error: Error?, from function: StaticString = #function) {
Copy link
Member

@ncooke3 ncooke3 Feb 14, 2022

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.

Copy link
Member Author

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants