- When building, if you get an error that says
This error is caused by a @providesModule declaration with the same name across two different files.
Go to the node_modules/react-native-router-flux/node_modules and delete the react-native folder therein. - If you get an issue called
unable to resolve module ReactComponentTreeHook
you need to go into package.json and remove the^
infront of react and react-native. (and then yarn install)
- Make sure that the vars in vars.js are properly configured.
- Update info.plist from :
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSAllowsLocalNetworking</key>
<true/>
<key>NSExceptionDomains</key>
<dict/>
</dict>
to
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict/>
</dict>
- Update the IOS release number in /ios/AppTabCustomerApp/Info.plist. e.g.:
<key>CFBundleShortVersionString</key>
<string>1.6</string>
to
<key>CFBundleShortVersionString</key>
<string>1.7</string>
- Update the android build in /android/app/build.gradle and /android/app/src/main/AndroidManifest.xml
android {
...
defaultConfig {
...
versionCode 2
versionName "1.6.1"
...
}
...
}
to
android {
...
defaultConfig {
...
versionCode 3
versionName "1.7.0"
...
}
...
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.apptab.customerapp"
android:versionCode="2"
android:versionName="1.6.1"
to
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.apptab.customerapp"
android:versionCode="3"
android:versionName="1.7.0"
- If components get unmounted before some async request triggers a callback, there might be errors. See react-timer-mixin.
- If you get an error that says
config.h file not found
you need to:
- clean your project
- delete
node_modules
andyarn install
and/or
- navigate to
node_modules/react-native/third-party/glog-#.#.#
- run
../../scripts/ios-configure-glog.sh
- run
react-native run-android
- run
adb reverse tcp:8081 tcp:8081
- run
adb logcat | grep ReactNativeJS
to get the logs
Sometimes builds will fail because android packages aren't updated and agreed to. Run android sdk
to launch the
sdk manager and update.
Building android release version: cd android && ./gradlew assembleRelease
. Testing android release: react-native run-android --variant=release
run yo rn-toolbox:assets --icon <path to your icon>
brew cask install react-native-debugger
open "rndebugger://set-debugger-loc?host=localhost&port=8081"
set simulator/phone to 'remote debugging'
check out https://www.npmjs.com/package/react-native-icon