File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -426,8 +426,6 @@ export class SegmentClient {
426426 async process ( incomingEvent : SegmentEvent ) {
427427 const event = this . applyRawEventData ( incomingEvent ) ;
428428
429- console . log ( `Process: ${ this . isReady . value } ` ) ;
430-
431429 if ( this . isReady . value ) {
432430 return this . startTimelineProcessing ( event ) ;
433431 } else {
@@ -479,9 +477,6 @@ export class SegmentClient {
479477 * @param isReady
480478 */
481479 private async onReady ( ) {
482- console . log (
483- `onReady, pendingEvents=${ this . store . pendingEvents . get ( ) . length } `
484- ) ;
485480 // Add all plugins awaiting store
486481 if ( this . pluginsToAdd . length > 0 && ! this . isAddingPlugins ) {
487482 this . isAddingPlugins = true ;
Original file line number Diff line number Diff line change @@ -135,7 +135,6 @@ describe('sovranStorage', () => {
135135
136136 it ( 'adds/removes pending events' , async ( ) => {
137137 const sovran = new SovranStorage ( { storeId : 'test' } ) ;
138- console . log ( sovran . pendingEvents . get ( ) ) ;
139138
140139 // expect(sovran.pendingEvents.get().length).toBe(0);
141140
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ import {
22 ErrorType ,
33 Plugin ,
44 PluginType ,
5+ SegmentClient ,
56 SegmentError ,
67} from '@segment/analytics-react-native' ;
78import type { IdfaData } from './types' ;
89import { AnalyticsReactNativePluginIdfa } from './AnalyticsReactNativePluginIdfa' ;
10+ import { Platform } from 'react-native' ;
911
1012const { getTrackingAuthorizationStatus } = AnalyticsReactNativePluginIdfa ;
1113
@@ -20,10 +22,20 @@ const { getTrackingAuthorizationStatus } = AnalyticsReactNativePluginIdfa;
2022export class IdfaPlugin extends Plugin {
2123 type = PluginType . enrichment ;
2224
25+ private shouldAskPermission = true ;
26+
2327 constructor ( shouldAskPermission = true ) {
2428 super ( ) ;
29+ this . shouldAskPermission = shouldAskPermission ;
30+ }
31+
32+ configure ( analytics : SegmentClient ) : void {
33+ this . analytics = analytics ;
34+ if ( Platform . OS !== 'ios' ) {
35+ return ;
36+ }
2537
26- if ( shouldAskPermission === true ) {
38+ if ( this . shouldAskPermission === true ) {
2739 this . getTrackingStatus ( ) ;
2840 }
2941 }
You can’t perform that action at this time.
0 commit comments