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

[iOS] Use install_modules_dependencies in .podspec file #796

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

cipolleschi
Copy link
Contributor

Summary

In RN 0.70, the core team introduced the install_modules_dependencies function to properly configure the iOS dependencies in the podspec.
This allow the Core team to add/remove flags and restructure the internal Cocoapods' structure of React Native and limiting the chances to break 3rd parties dependencies, as those changes will be captured by the function.

By not using this function, all the 3rd party libraries would have to chase and manually reimplement the same changes that the RN Core team applies to the Cocoapods structure.

Test Plan

npx react-native@next init NewApp --version next --skip-install
cd NewApp
yarn add react-native-pager-view
yarn install
cd ios
bundle install
RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
open NewApp.xcworkspace

Build and observe the failure.

Screenshot 2023-11-30 at 09 58 10

Apply this patch to the NewApp/node_modules/react-native-pager-view/react-native-pager-view.podspec file and rerun

RCT_NEW_ARCH_ENABLED=1 bundle exec pod install
open NewApp.xcworkspace

Build and observe the app build successfully:

Screenshot 2023-11-30 at 10 03 31

What's required for testing (prerequisites)?

Nothing

What are the steps to reproduce (after prerequisites)?

See test plan

Compatibility

OS Implemented
iOS
Android N/A

Checklist

The below items are not needed:

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I updated the typed files (TS and Flow)

@troZee
Copy link
Member

troZee commented Nov 30, 2023

Thank you @cipolleschi so much for your effort into improving this library 🙏 I will merge it once the iOS pipeline passes (unfortunately I have to run it manually)

@troZee troZee merged commit 8dee28a into callstack:master Nov 30, 2023
2 checks passed
@troZee
Copy link
Member

troZee commented Nov 30, 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.

3 participants