Written by Tal Kain tal@kain.net
Based on SegmentIO (https://segment.com) Analytics project. The iOS SDK can be found here: https://github.com/segmentio/analytics-ios
- Get the project by cloning it from its GitHub repository into
node_modules/react-native/Libraries/RNSegmentIOAnalytics/
OR download the npm package (if exist) using npm install. - In your Podfile, add
pod "Analytics"
to your project. - Make sure your project links to libAnalytics.a and libRNSegmentIOAnalytics.a (The libraries should be listed under Build Phases -> Link Binary With Libraries".
var RNSegmentIOAnalytics = require('RNSegmentIOAnalytics');
var segmentIOWriteKey = "SEGMENT_IO_WRITE_KEY"
var flushEverySecondsCount = 1
RNSegmentIOAnalytics.setup(segmentIOWriteKey, flushEverySecondsCount);
RNSegmentIOAnalytics.identifyUser("testing", {"name":"test name"});
RNSegmentIOAnalytics.track("test track", {"name":"test track with name"});
RNSegmentIOAnalytics.screen("test screen", {"screenType":"SCREEN NAME"});
RNSegmentIOAnalytics.flush();
RNSegmentIOAnalytics.reset();
https://segment.com/docs/libraries/ios/#getting-started
ld: '......./Pods/GoogleIDFASupport/Libraries/libAdIdAccessLibrary.a(TAGActualAdIdAccess.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
There are instructions for fixing it here: https://stackoverflow.com/questions/31395260/google-analytics-libadidaccess-a-does-not-contain-bitcode
This project is released under the MIT License.
The copyright notice from Segment's project is in the analytics-ios.LICENSE file