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

chore: migrate example to react-native-test-app #834

Merged
merged 11 commits into from
Aug 20, 2024

Conversation

szymonrybczak
Copy link
Contributor

@szymonrybczak szymonrybczak commented Jun 18, 2024

Summary

In this Pull Request I've migrated Example project to react-native-test-app.

Old arch New arch (Bridgeless)
Android CleanShot 2024-06-19 at 10 42 05@2x CleanShot 2024-06-19 at 10 31 45@2x
iOS CleanShot 2024-06-19 at 10 46 24@2x CleanShot 2024-06-19 at 10 32 11@2x

Test Plan

App should properly run and build on all platforms that react-native-pager-view supports.

Compatibility

OS Implemented
iOS
Android
visionOS

Checklist

  • 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 Jun 19, 2024

@szymonrybczak could you rebase your PR? 🙏

@szymonrybczak szymonrybczak marked this pull request as ready for review June 19, 2024 09:06
@szymonrybczak szymonrybczak changed the title feat!: migrate example to react-native-test-app chore: migrate example to react-native-test-app Jun 24, 2024
package.json Show resolved Hide resolved
@szymonrybczak szymonrybczak force-pushed the feat/migrate-example-to-rnta branch 5 times, most recently from 83db2d2 to 40ecedb Compare June 25, 2024 13:34
@szymonrybczak
Copy link
Contributor Author

CI is failing for iOS E2E tests because app built inside Release mode cannot grab .jsbundle, I tried also in a fresh project and it looks like something is broken:
CleanShot 2024-07-01 at 15 12 41@2x

npx --package react-native-test-app@latest init
yarn build:ios
yarn ios --mode "Release"

cc: @tido64 any ideas? Is there maybe anything that I'm missing in the config for app to run properly?

@tido64
Copy link

tido64 commented Jul 2, 2024

cc: @tido64 any ideas? Is there maybe anything that I'm missing in the config for app to run properly?

When is pod install run? It needs to be run after bundling so that CocoaPods can create an entry for it in the generated Xcode project files. You can check if it's present if you open .xcworkspace in Xcode.

@szymonrybczak
Copy link
Contributor Author

@tido64 I did give it a try, and it seems like the results is still the same :(

@tido64
Copy link

tido64 commented Jul 15, 2024

@szymonrybczak Do you have repro steps? Seems to work for me. This is what I ran:

yarn
cd example
yarn
yarn build:ios
pod install --project-directory=ios
yarn ios --no-packager --simulator 'iPhone 15 Pro'

image

example/package.json Outdated Show resolved Hide resolved
"ios": "react-native run-ios --list-devices",
"android": "react-native run-android --appId com.pagerviewexample",
"build:android": "npm run mkdist && react-native bundle --entry-file index.js --platform android --dev true --bundle-output dist/main.android.jsbundle --assets-dest dist/res",
"build:ios": "npm run mkdist && react-native bundle --entry-file index.js --platform ios --dev false --bundle-output dist/main.ios.jsbundle --assets-dest dist",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to add --dev false in .github/workflows/ios.yml instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this script will be only used for building on CI, since for development yarn ios already fires up packager.

@szymonrybczak szymonrybczak merged commit ea11c94 into master Aug 20, 2024
4 checks passed
@szymonrybczak szymonrybczak deleted the feat/migrate-example-to-rnta branch August 20, 2024 10:03
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.

5 participants