urbanairship / react-native-airship

Airship React Native module
Other
87 stars 62 forks source link

Update react-native-airship.podspec #544

Closed WoLewicki closed 9 months ago

WoLewicki commented 9 months ago

What do these changes do?

They make the new arch work in this library for newest RN versions, as recommended by Meta. Similar to other PRs such as: https://github.com/react-native-cameraroll/react-native-cameraroll/pull/577 or https://github.com/react-native-webview/react-native-webview/pull/3231 which was approved by Meta member.

Why are these changes necessary?

Without them, new arch does not work on newest RN version.

How did you verify these changes?

We use this code in our app running on new arch: https://github.com/Expensify/App/pull/13767/files#diff-e4eb696f711269bf62811c2d5bc2500655ae6cd589e1b84b520a68b32e7fd05f

Verification Screenshots:

Anything else a reviewer should know?

WoLewicki commented 9 months ago

@crow could we get this merged and released? It should work just right on newer RN versions 🚀

rlepinski commented 9 months ago

@WoLewicki Does this break new arch for react versions RN < 0.73 ? Do we need to extend the if else to fallback to old new arch check or will that break things?

If thats not possible and we need to require a newer RN version thats fine, we just need to do a major plugin release with this change.

rlepinski commented 9 months ago

Ok, so i think we want to do this -https://github.com/react-native-webview/react-native-webview/pull/3231/files so we can avoid breaking new arch users that are on .68 - .71

WoLewicki commented 9 months ago

install_modules_dependencies method is available from RN 0.71 iirc, and there is no sense in supporting new arch on lower versions since there were so many breaking changes to it already that is it unusable there. If this methods is not found, it fallbacks to the old behavior on old arch also, so it should be backward compatible on all versions of RN on old arch, and enough versions on new arch, so I think there is no breaking change in it.