Taplytics is a native mobile A/B testing and push notification platform that helps you optimize your React Native app!
Current Version: 1.4.0
If you haven't yet set up a React-Native project, do the following:
First install node and react.
brew install node
brew install watchman
npm install -g react-native-cli
Then, initialize a new project.
react-native init projectname
cd projectname
npm install
Install the taplytics-react-native package:
- Install
taplytics-react-native
npm package:npm install taplytics-react-native --save
- Then link the
taplytics-react-native
native module. (for iOS you will need to manually link the module to your XCode project as described below)react-native link taplytics-react-native
-
Follow the react-native manual linking native library instructions
- project to import is located in
/node_modules/taplytics-react-native/ios/RNTaplyticsReact.xcodeproj
- you can skip step 3 of the instructions.
- project to import is located in
-
Simply follow part 1 of the install instructions to install the Native Taplytics iOS SDK. Use CocoaPods if you use it for your project or the manual install instructions. iOS SDK installation docs here.
-
Append the
taplytics-react-native
projectsettings.gradle
include line:include 'app:', ':taplytics-react-native'
-
add the following line to
settings.gradle
project(':taplytics-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/taplytics-react-native/android')
-
In your app-level
build.gradle
add the following your dependencies:compile project(':taplytics-react-native')
Note that React Native is packaged with an older version of OkHttp, so an older version of socketio is required:
debugCompile ('io.socket:socket.io-client:0.8.0') { exclude group: 'org.json', module: 'json' }
-
In your app-level
build.gradle
, add this the taplytics url to your repositories:repositories { maven { url "https://github.com/taplytics/Taplytics-Android-SDK/raw/master/AndroidStudio/" } }
-
In your Application Class (default is
MainApplication
), add Taplytics to your app's packages:@Override protected List<ReactPackage> getPackages() { return Arrays.asList( new MainReactPackage(), new TaplyticsReactPackage() ); }
-
Follow part 1. Install and part 2. Setup from the Android SDK docs here.
This module wraps most native SDK methods in Javascript, allowing you to access features such as dynamic variables, code blocks and event logging in the React Native environment.
Be sure to import Taplytics into your react application:
import Taplytics from 'taplytics-react-native';
Then follow the Experiment guide and the Push Notification guide to get started.
Current: 1.4.0
- Added call
registerPushNotifications
for iOS
- Changed
setUserAttributes
to return promise.
- Added getRunningFeatureFlags and featureFlagEnabled methods.
- Add push open listener compatability for cold open after force close on Android.
- Push listener backwards compatibility for react native
<0.50.0
- Remove erroneous log
- Fix registering for push on iOS
- Allow for push notification hooks in iOS
- Add error states for various async calls
- RN 0.47+ Support
- Update reference to iOS push register method.
- Fixed json attributes passed into logEvent and logRevenue causing crash.
- Fixed search paths for non-cocoapods import
- Fixed getSessionInfo crash
- Added push ID to value sent to BroadcastReceiver
- Added safety in broadcastReceiver
- Fixed broadcastreceiver sending wrong push event types.
- Updated android package name from com.react to com.taplytics.react
- Updated search paths
- Fixed npm references not pointing to the right project.
- Cleaned up many iOS functions.
- Fixed react native minimum version number.
- Initial version of React Native SDK. Please contact us with any questions or use git issues.