localytics-react-native v3.3.3
react-native-template-apps
Sample apps demonstrating the usage of the Localytics React Native SDK.
Included apps
LocalyticsReactTest
Tests all of localytics-react-native
APIs
LocalyticsInbox
Sample of a Localytics Inbox implementation
LocalyticsPush
Sample of a Localytics Push implementation
Developer Setup
brew install node
brew install watchman
brew install yarn
npm install -g react-native-cli
Creating your own app
Using Facebook's docs (https://facebook.github.io/react-native/docs/getting-started.html), setup a new React Native app:
npm install -g create-react-native-app
create-react-native-app SampleProjectName
cd SampleProjectName
npm start
You can use this app to get familiar with React Native. Once you're ready to write native code for each platform (iOS/Android) and integrate Localytics, you'll need to eject from Create React Native App:
cd SampleProjectName
npm run eject
- Select
React Native: I'd like a regular React Native project.
- Name your app (should be same as directory name)
Next, follow the instructions to integrate Localytics.
Localytics Documentaion
https://docs.localytics.com/dev/react-native.html
Running Project
iOS
cd SampleProjectName
react-native run-ios
Note: If you see the ":CFBundleIdentifier", Does Not Exist
error, you can just open
and run the project directly from Xcode (path ios/LocalyicsReactTest.xcworkspace
). See this
issue for some possible fixes: https://github.com/facebook/react-native/issues/7308.
Android
Define SDK location
Without defining the SDK location, you'll likely see this error:
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
Example of how to add local.properties file:
1. cd SampleProjectName
2. cd android
3. touch local.properties
Add the following line:
sdk.dir = /Users/YOUR_USERNAME_HERE/Library/Android/sdk
Run
You may want to clean your android project after configuration and before running:
cd SampleProjectName
cd android
./gradlew clean
Ensure you have a physical device in debugging mode connected to your computer, or an Android emulator running.
cd SampleProjectName
react-native run-android
Note: Java 8 is required to build the project.
11 days ago
26 days ago
2 months ago
2 months ago
6 months ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
7 years ago
7 years ago
7 years ago