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

Make RNQC compatible with Expo 48 and React-Native 0.71 #153

Closed
wants to merge 7 commits into from
Closed

Make RNQC compatible with Expo 48 and React-Native 0.71 #153

wants to merge 7 commits into from

Conversation

devYonz
Copy link

@devYonz devYonz commented Feb 26, 2023

The build scripts associated with RNQC prevent building due to the react-native package /android folder going away and restrictions on build information like AAR.

Change that caused this issue:
The issue with the maintained one react-native-quick-crypto has to deal with this react-native-community/discussions-and-proposals#508 change

Patch for this PR copied from issue: #143

Don't upgrade gradle, I faced failures when latest expo rebuild used Gradle 7.4. Tested and worked with gradle -classpath('com.android.tools.build:gradle:7.3.1'). Use this patch at your own discretion; solely meant to unblock people. Lots of messages, but the build works locally for my app.

@mrousavy
Copy link
Member

nice!! looks good I think

@devYonz
Copy link
Author

devYonz commented Mar 22, 2023

@mrousavy looks like lint and Android example app failed. I can take a look and fix it if you can share share details about the workflow.

I have to admit, I'm not familiar with GitHub / npm release processes.

@XantreDev
Copy link
Contributor

Any progress?

@ealeksandrov7
Copy link

By the way, I can confirm that this is indeed failing to build for android production apps with expo 48 (eas) even after adding a custom plugin for gradle 7.3.1. Working great for iOS though.

@ArtKullashi
Copy link

By the way, I can confirm that this is indeed failing to build for android production apps with expo 48 (eas) even after adding a custom plugin for gradle 7.3.1. Working great for iOS though.

Managed to get it to build in dev client with expo 48 but had errors when starting the dev server.

@ealeksandrov7
Copy link

Managed to get it to build in dev client with expo 48 but had errors when starting the dev server.

Yea, but if you set NODE_ENV=production the build fails saying something like can't find react-native-quick-crypto in the node_modules directory. Nevertheless I guess this is not to place to discuss this - we can do this in the Issues tab

@devYonz
Copy link
Author

devYonz commented Apr 3, 2023

If you are running into the error: ^ 'value' is unavailable: introduced in ios 12.0, here is how you go about fixing it:

    # NOTE: Change IPHONEOS_DEPLOYMENT_TARGET to 13.
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
      end
    end
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  • yarn add https://github.com/yfeleke/react-native-quick-crypto to re-install.

If you have a managed workflow, you will need a plugin : https://stackoverflow.com/a/75907530/4002037

Cause of the failure

After much debugging, RNQC fails if you don't set a deployment target 13.0 (12.4 didnt work for me) after Xcode upgrade. IOS >12.0 features are being used by RNQC, and something has recently caused this to start erroring out with RNQC target set at 11 (not sure why). The issue still persisted after upgrading the PR branch's react-native-quick-crypto.podspec to 12.4.
Similar RN Issue: facebook/react-native#34106
Fix example travis-mark/lrn@0158547
RN code: https://github.com/facebook/react-native/blob/cb88e75cf1f82af94e35f1647f6b6d0b0dbbe60f/packages/react-native/scripts/react_native_pods.rb#L371
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' to something >13

@thiennv-qng
Copy link

Any update? I have facing same issue. :(((

@mrousavy
Copy link
Member

Hey! We've merged a PR and will release a new version in a second! Thanks!

@devYonz
Copy link
Author

devYonz commented Apr 20, 2023

Working with 0.6.1

@devYonz devYonz closed this Apr 20, 2023
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.

10 participants