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

fix: autolinking when using Xcode 12 #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

i1skn
Copy link

@i1skn i1skn commented Oct 1, 2020

Latest Xcode 12 fails to build while without a module to depend on React-Core directly instead of React. This change requires React Native 0.60.2 or newer. For more details please check: facebook/react-native#29633 (comment)

mergify bot pushed a commit to valora-inc/wallet that referenced this pull request Jan 17, 2022
### Description

The purpose of this PR is to enable us to use "dependency order" for the "build order". This is the default setting for xcode 13 and also since RN 0.62. The benefits include better build performance through more parallelisation and reduced dependency cycle errors.

<img width="1119" alt="Screenshot 2022-01-06 at 15 26 55" src="https://user-images.githubusercontent.com/20150449/148398069-443a0ef7-37b1-430a-aba0-d9813eb3cd3f.png">

To build in this way, dependencies need to require the `React-Core` pod instead of `React` . For this reason, many dependencies needed to be updated. Where possible I have updated to the latest versions, some libs were deprecated so I have updated to the new recommended option. 

Of note:
- react-native-camera has been deprecated in favour of [react-native-vision-camera](https://github.com/mrousavy/react-native-vision-camera), however react-native-vision-camera seems to serve a different purpose and doesn't have the QR barcode scanning functionalities we are needing. I opted to upgrade to the latest version of react-native-camera even though it is deprecated, as we were one major version behind and the latest version did have the podspec change we need for this piece of work.
- react-native-exit-app also seems a little abandoned, i used a commit hash because wumke/react-native-exit-app#45 (comment)

New patches:
- react-native-keep-awake is deprecated in favour of [expo-keep-awake](https://www.npmjs.com/package/expo-keep-awake), i opted to patch react-native-keep-awake since we don't have/want expo 
- react-native-sms/react-native-fast-crypto seem abandoned, i opted to patch instead of waiting for a new release with these 14 month old PRs [here](tkporter/react-native-sms#90) and [here](EdgeApp/react-native-fast-crypto#32)
- clevertap-react-native doesn't have the podspec change we need in the latest release, so i have patched the existing version for now
- react-native-securerandom seems abandoned, we are on the latest version. 
- react-native-svg we are on the latest version, there is a new pre-release that contains the fix we need but it has been on pre-release since 08/2021. there is an open [issue](software-mansion/react-native-svg#1683) to publish the pre-release so for now i have patched.
- react-native-netinfo - after upgrading to the latest, the android CI started failing due to not correctly detecting the network connection status. rather than holding up the rest of this work, patch for now and investigate later. more context [here](https://valora-app.slack.com/archives/CL7BVQPHB/p1642086517037100)


### Other changes

Unlink react-native-geth and react-native-securerandom to resolve the below build warning. This was actually pretty straightforward, didn't cause any problems.

<img width="1292" alt="Screenshot 2022-01-07 at 14 23 48" src="https://user-images.githubusercontent.com/20150449/148552630-7fc1357e-fbd0-47fe-8367-54e98f0766bb.png">


### Tested

Manually


### How others should test

A regression to see that app functionality hasn't been affected. e.g. QR scanning, app data persistence when force closing/opening the app.


### Backwards compatibility

Yes
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.

1 participant