File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed
android/src/main/java/com/segment/analytics/reactnative/core Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,8 @@ class RNAnalyticsModule(context: ReactApplicationContext): ReactContextBaseJavaM
4242
4343 @ReactMethod
4444 fun setup (options : ReadableMap ) {
45- val android = options.getMap(" android" )
4645 val builder = Analytics
47- .Builder (reactApplicationContext, android .getString(" writeKey" ))
46+ .Builder (reactApplicationContext, options .getString(" writeKey" ))
4847 .flushQueueSize(options.getInt(" flushAt" ))
4948
5049 if (options.getBoolean(" recordScreenViews" )) {
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ +(void)initialize {
3333@synthesize bridge = _bridge;
3434
3535RCT_EXPORT_METHOD (setup:(NSDictionary *)options) {
36- SEGAnalyticsConfiguration* config = [SEGAnalyticsConfiguration configurationWithWriteKey: options[@" ios " ][ @" writeKey" ]];
36+ SEGAnalyticsConfiguration* config = [SEGAnalyticsConfiguration configurationWithWriteKey: options[@" writeKey" ]];
3737
3838 config.recordScreenViews = [options[@" recordScreenViews" ] boolValue ];
3939 config.trackApplicationLifecycleEvents = [options[@" trackAppLifecycleEvents" ] boolValue ];
Original file line number Diff line number Diff line change @@ -26,11 +26,12 @@ cat << EOF >> App.js
2626buildId = '$CIRCLE_WORKFLOW_ID '
2727
2828analytics
29- .configure()
30- .using($integrations_require )
31- .debug()
32- .setup('$SEGMENT_WRITE_TOKEN ')
33- .then(() => console.log('Analytics ready'))
29+ .setup('$SEGMENT_WRITE_TOKEN ', {
30+ using: [$integrations_require ],
31+ debug: true
32+ })
33+ .then(() => console.log('Analytics ready'))
34+ .catch(err => console.error('Analytics error', err))
3435EOF
3536
3637../android-workaround.js
You can’t perform that action at this time.
0 commit comments