DynamicLinks: Skip retrieving web locale when running targeting below iOS14 (only on simulator & Apple Silicon) - #7989
Merged
Merged
Conversation
Collaborator
Generated by 🚫 Danger |
ncooke3
commented
Apr 27, 2021
| // Perform an early exit if the process is running under Rosetta translation and targeting | ||
| // under iOS 14. | ||
| if (processIsTranslated() && !systemVersionAtLeastiOS14) { | ||
| [self handleExecutionError:nil]; |
Member
Author
There was a problem hiding this comment.
Calling the delegate method in the early exit case avoids interrupting the dynamic links flow and the locale property in the delegate will be set to empty string. See here
paulb777
reviewed
Apr 27, 2021
| // and -1 when an error occurs. | ||
| // From: | ||
| // https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment | ||
| int processIsTranslated() { |
Member
There was a problem hiding this comment.
Make this C function static so that it does not pollute the global symbol namespace.
paulb777
reviewed
Apr 27, 2021
paulb777
left a comment
Member
There was a problem hiding this comment.
LGTM with static fix.
Deferring approval to @eldhosembabu
Collaborator
Coverage ReportAffected SDKs
Test Logs
|
eldhosembabu
approved these changes
Apr 27, 2021
eldhosembabu
left a comment
Contributor
There was a problem hiding this comment.
Thanks for addressing this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manually tested fix on M1 machine and it successfully ran without crashing.
Fixes #7618