See the instructions to run on (Windows)[./WINDOWS.md].
npm install
Cocoapods is an iOS package manager. Sentry needs to add some native codes, so we must install an iOS native lib of Sentry.
Actually Apple already released a new package manager 'Swift Package Manager' but it's not supported for the React native version we use.
sudo gem install cocoapods
cd ios && pod install
We use Sentry to allow users to send crash reports.
There is one file that must be created on ios and android folders. This file has a token used to upload some symbols to Sentry. getsentry/sentry-react-native#112 (comment)
This token is only used when releasing an app version, no need to have it for development.
So you must create ios/sentry.properties
and android/sentry.properties
files with the following content in both:
defaults.url=https://sentry.io/
defaults.org=ORG-NAME
defaults.project=PROJECT-NAME
auth.token=YOUR-SENTRY-TOKEN
First start the Metro bundler:
npm start
or npm run start:clean
to invalidate the cache before run.
Then build the app for iOS:
npm run ios
to open on iOS simulator, or npm run ios -- --simulator "iPhone 11"
to run it by name.
To list all available simulators, use xcrun simctl list devices
.
If you want to run in your physical device, you should first get its UDID by running the list of all possible devices:
xcrun xctrace list devices
You should see an output like this:
== Devices ==
Alex’s ... (490613AE-...)
Alex’s ... (16.3.1) (3198...)
== Simulators ==
...
The code inside the last parenteses is your UDID. Then, deploy the app to your device with:
npm run ios -- --udid=3198...
INFO: To be able to deploy to your physical device you can use
ios-deploy
, it can be downloaded from https://github.com/ios-control/ios-deploy:ios-deploy --version
The Firebase package uses the credentials of GoogleService-Info.plist
to initialize the device in the FCM automatically. You should generate and install this resource in your Xcode environment. Read Generating iOS credentials.
First start the Metro bundler:
npm start
Then build the app for Android. Make sure you have a device ready, be it on Android Studio's Emulator or a real device.
npm run android
If you need to open the Dev Menu on Android Studio Emulator, use Ctrl + M
or run adb shell input keyevent 82
in a terminal.
Obs: To run on your device some configuration may need to be done (see running on device)
The Firebase package uses the credentials of google-services.json
to initialize the device in the FCM automatically. You should generate and install this resource in your Android Studio environment. Read Generating Android credentials.
npm run lint
We use the ttag
lib for i18n. Check out the docs here.
Run npm run locale-update-pot
to update the pot file (locale/texts.pot
).
Run msgmerge pt-br/texts.po texts.pot -o pt-br/texts.po
to merge a pot file with a po file.
Finally, run make i18n
to compile all po files to json files.
Code released under the MIT license.