Skip to content
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

react-native iOS settings may not be defined with new architecture #757

Open
quinnturner opened this issue Jan 24, 2025 · 5 comments · Fixed by #758
Open

react-native iOS settings may not be defined with new architecture #757

quinnturner opened this issue Jan 24, 2025 · 5 comments · Fixed by #758
Labels
bug Something isn't working package: sdk/react-native Issues that affect the react native SDK.

Comments

@quinnturner
Copy link
Contributor

Describe the bug

For settings.AppleLocale, settings can be null/undefined using the new arch, so I think we also need a check _a.settings?.AppleLocale

To reproduce

When I loaded my application using React 0.77 with the new architecture on an iOS simulator with the latest iOS version settings was undefined or null

Expected behavior

Check for nullability on settings

SDK version
Latest

@kinyoklion
Copy link
Member

Hey @quinnturner, do you know if it is ever non-null (for instance on a real device)? I can approve your PR for now, but my concern here is that the code may actually need re-structured to make this call at a different time, or with a different API. So I will likely leave this issue open even after merging the PR until that behavior can be validated.

kinyoklion pushed a commit that referenced this issue Jan 24, 2025
…#758)

This check seems necessary for the new architecture (on React Native
0.77) to prevent an immediate crash.

Closes #757
@kinyoklion kinyoklion reopened this Jan 24, 2025
@quinnturner
Copy link
Contributor Author

Honestly, I know very little about this code. I had to use this patch to get new arch to work but besides that, I have zero insights. Sorry!

@kinyoklion
Copy link
Member

Ok. Just be aware that if you are using auto-environment attributes for targeting, that this value could be missing with this change.

@kinyoklion
Copy link
Member

kinyoklion commented Jan 24, 2025

Filed internally as SDK-1048

@kinyoklion
Copy link
Member

@quinnturner Your change is released in 10.9.5.

Thank you,
Ryan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package: sdk/react-native Issues that affect the react native SDK.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants