Skip to content

Instantly share code, notes, and snippets.

@wilsolutions
Last active June 25, 2021 20:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wilsolutions/a27e5078e9c0c0cc4e8153ed86ef185f to your computer and use it in GitHub Desktop.
Save wilsolutions/a27e5078e9c0c0cc4e8153ed86ef185f to your computer and use it in GitHub Desktop.
React Native Notes
# Issues:
- Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
Fix: watchman watch-del-all; react-native start --reset-cache
# IPA generation
1. Create the bundle
execAndLogCommand('Creating bundle...', `(npx react-native bundle \
--entry-file='index.js' \
--bundle-output=${bundleOutput} \
--dev=false \
--platform='${platform}' \
--assets-dest ${platform})`
);
2. Export the archive
execShell(`(export RCT_NO_LAUNCH_PACKAGER=true && xcodebuild clean archive -workspace ${platform}/${appName}.xcworkspace \
-scheme ${appName} \
-sdk iphoneos \
-configuration ${configuration} \
-archivePath ${archivePath})`,
{silent: false}
);
3. Export the .ipa pkg
execAndLogCommand('Exporting IPA...', `(xcodebuild -exportArchive \
-archivePath $PWD/build/${appName}.xcarchive \
-exportOptionsPlist ${exportOptionsPlist} \
-exportPath $PWD/build -allowProvisioningUpdates)`
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment