@snowplow/react-native-tracker 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNSnowplowTracker.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/src/main/java/com/snowplowanalytics/react/tracker/RNSnowplowTrackerModule.java +63 -32
- package/android/src/main/java/com/snowplowanalytics/react/util/ConfigUtil.java +6 -0
- package/android/src/main/java/com/snowplowanalytics/react/util/TrackerVersion.java +1 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +80 -3
- package/dist/index.js.map +1 -1
- package/ios/RNSnowplowTracker.m +43 -31
- package/ios/RNSnowplowTracker.xcodeproj/project.pbxproj +0 -8
- package/ios/Util/RNConfigUtils.m +2 -0
- package/ios/Util/RNTrackerVersion.m +1 -1
- package/package.json +6 -6
- package/CHANGELOG +0 -144
package/ios/RNSnowplowTracker.m
CHANGED
|
@@ -63,20 +63,28 @@ RCT_EXPORT_METHOD(createTracker:
|
|
|
63
63
|
NSString *method = [networkConfig rnsp_stringForKey:@"method" defaultValue:nil];
|
|
64
64
|
SPHttpMethod httpMethod = [@"get" isEqualToString:method] ? SPHttpMethodGet : SPHttpMethodPost;
|
|
65
65
|
SPNetworkConfiguration *networkConfiguration = [[SPNetworkConfiguration alloc] initWithEndpoint:networkConfig[@"endpoint"] method:httpMethod];
|
|
66
|
+
NSString *customPostPath = [networkConfig rnsp_stringForKey:@"customPostPath" defaultValue:nil];
|
|
67
|
+
if (customPostPath != nil) {
|
|
68
|
+
networkConfiguration.customPostPath = customPostPath;
|
|
69
|
+
}
|
|
70
|
+
NSObject *requestHeaders = [networkConfig objectForKey:@"requestHeaders"];
|
|
71
|
+
if (requestHeaders != nil && [requestHeaders isKindOfClass:NSDictionary.class]) {
|
|
72
|
+
networkConfiguration.requestHeaders = (NSDictionary *)requestHeaders;
|
|
73
|
+
}
|
|
66
74
|
|
|
67
75
|
// Configurations
|
|
68
76
|
NSMutableArray *controllers = [NSMutableArray array];
|
|
69
77
|
|
|
70
78
|
// TrackerConfiguration
|
|
71
79
|
NSObject *trackerArg = [argmap objectForKey:@"trackerConfig"];
|
|
72
|
-
if (trackerArg !=nil && [trackerArg isKindOfClass:NSDictionary.class]) {
|
|
80
|
+
if (trackerArg != nil && [trackerArg isKindOfClass:NSDictionary.class]) {
|
|
73
81
|
SPTrackerConfiguration *trackerConfiguration = [RNConfigUtils mkTrackerConfig:(NSDictionary *)trackerArg];
|
|
74
82
|
[controllers addObject:trackerConfiguration];
|
|
75
83
|
}
|
|
76
84
|
|
|
77
85
|
// SessionConfiguration
|
|
78
86
|
NSObject *sessionArg = [argmap objectForKey:@"sessionConfig"];
|
|
79
|
-
if (sessionArg !=nil && [sessionArg isKindOfClass:NSDictionary.class]) {
|
|
87
|
+
if (sessionArg != nil && [sessionArg isKindOfClass:NSDictionary.class]) {
|
|
80
88
|
SPSessionConfiguration *sessionConfiguration = [RNConfigUtils mkSessionConfig:(NSDictionary *)sessionArg];
|
|
81
89
|
[controllers addObject:sessionConfiguration];
|
|
82
90
|
}
|
|
@@ -123,7 +131,7 @@ RCT_EXPORT_METHOD(removeTracker: (NSDictionary *)details
|
|
|
123
131
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
124
132
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
125
133
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
126
|
-
id<SPTrackerController> trackerController = [
|
|
134
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
127
135
|
BOOL removed = [SPSnowplow removeTracker:trackerController];
|
|
128
136
|
resolve(@(removed));
|
|
129
137
|
}
|
|
@@ -138,7 +146,7 @@ RCT_EXPORT_METHOD(trackSelfDescribingEvent:
|
|
|
138
146
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
139
147
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
140
148
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
141
|
-
id<SPTrackerController> trackerController = [
|
|
149
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
142
150
|
|
|
143
151
|
if (trackerController != nil) {
|
|
144
152
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -162,7 +170,7 @@ RCT_EXPORT_METHOD(trackStructuredEvent:
|
|
|
162
170
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
163
171
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
164
172
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
165
|
-
id<SPTrackerController> trackerController = [
|
|
173
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
166
174
|
|
|
167
175
|
if (trackerController != nil) {
|
|
168
176
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -199,7 +207,7 @@ RCT_EXPORT_METHOD(trackScreenViewEvent:
|
|
|
199
207
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
200
208
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
201
209
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
202
|
-
id<SPTrackerController> trackerController = [
|
|
210
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
203
211
|
|
|
204
212
|
if (trackerController != nil) {
|
|
205
213
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -250,7 +258,7 @@ RCT_EXPORT_METHOD(trackPageViewEvent:
|
|
|
250
258
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
251
259
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
252
260
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
253
|
-
id<SPTrackerController> trackerController = [
|
|
261
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
254
262
|
|
|
255
263
|
if (trackerController != nil) {
|
|
256
264
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -282,7 +290,7 @@ RCT_EXPORT_METHOD(trackTimingEvent:
|
|
|
282
290
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
283
291
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
284
292
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
285
|
-
id<SPTrackerController> trackerController = [
|
|
293
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
286
294
|
|
|
287
295
|
if (trackerController != nil) {
|
|
288
296
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -313,7 +321,7 @@ RCT_EXPORT_METHOD(trackConsentGrantedEvent:
|
|
|
313
321
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
314
322
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
315
323
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
316
|
-
id<SPTrackerController> trackerController = [
|
|
324
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
317
325
|
|
|
318
326
|
if (trackerController != nil) {
|
|
319
327
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -349,7 +357,7 @@ RCT_EXPORT_METHOD(trackConsentWithdrawnEvent:
|
|
|
349
357
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
350
358
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
351
359
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
352
|
-
id<SPTrackerController> trackerController = [
|
|
360
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
353
361
|
|
|
354
362
|
if (trackerController != nil) {
|
|
355
363
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -386,7 +394,7 @@ RCT_EXPORT_METHOD(trackEcommerceTransactionEvent:
|
|
|
386
394
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
387
395
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
388
396
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
389
|
-
id<SPTrackerController> trackerController = [
|
|
397
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
390
398
|
|
|
391
399
|
if (trackerController != nil) {
|
|
392
400
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -439,7 +447,7 @@ RCT_EXPORT_METHOD(trackDeepLinkReceivedEvent:
|
|
|
439
447
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
440
448
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
441
449
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
442
|
-
id<SPTrackerController> trackerController = [
|
|
450
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
443
451
|
|
|
444
452
|
if (trackerController != nil) {
|
|
445
453
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -467,7 +475,7 @@ RCT_EXPORT_METHOD(trackMessageNotificationEvent:
|
|
|
467
475
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
468
476
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
469
477
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
470
|
-
id<SPTrackerController> trackerController = [
|
|
478
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
471
479
|
|
|
472
480
|
if (trackerController != nil) {
|
|
473
481
|
NSDictionary *argmap = [details objectForKey:@"eventData"];
|
|
@@ -581,7 +589,7 @@ RCT_EXPORT_METHOD(removeGlobalContexts:
|
|
|
581
589
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
582
590
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
583
591
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
584
|
-
id<SPTrackerController> trackerController = [
|
|
592
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
585
593
|
|
|
586
594
|
if (trackerController != nil) {
|
|
587
595
|
NSString *tag = [details objectForKey:@"removeTag"];
|
|
@@ -598,7 +606,7 @@ RCT_EXPORT_METHOD(addGlobalContexts:
|
|
|
598
606
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
599
607
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
600
608
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
601
|
-
id<SPTrackerController> trackerController = [
|
|
609
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
602
610
|
|
|
603
611
|
if (trackerController != nil) {
|
|
604
612
|
NSDictionary *gcArg = [details objectForKey:@"addGlobalContext"];
|
|
@@ -621,7 +629,7 @@ RCT_EXPORT_METHOD(setUserId:
|
|
|
621
629
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
622
630
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
623
631
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
624
|
-
id<SPTrackerController> trackerController = [
|
|
632
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
625
633
|
|
|
626
634
|
if (trackerController != nil) {
|
|
627
635
|
NSString *newUid = [details rnsp_stringForKey:@"userId" defaultValue:nil];
|
|
@@ -638,7 +646,7 @@ RCT_EXPORT_METHOD(setNetworkUserId:
|
|
|
638
646
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
639
647
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
640
648
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
641
|
-
id<SPTrackerController> trackerController = [
|
|
649
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
642
650
|
|
|
643
651
|
if (trackerController != nil) {
|
|
644
652
|
NSString *newNuid = [details rnsp_stringForKey:@"networkUserId" defaultValue:nil];
|
|
@@ -655,7 +663,7 @@ RCT_EXPORT_METHOD(setDomainUserId:
|
|
|
655
663
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
656
664
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
657
665
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
658
|
-
id<SPTrackerController> trackerController = [
|
|
666
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
659
667
|
|
|
660
668
|
if (trackerController != nil) {
|
|
661
669
|
NSString *newDuid = [details rnsp_stringForKey:@"domainUserId" defaultValue:nil];
|
|
@@ -672,7 +680,7 @@ RCT_EXPORT_METHOD(setIpAddress:
|
|
|
672
680
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
673
681
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
674
682
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
675
|
-
id<SPTrackerController> trackerController = [
|
|
683
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
676
684
|
|
|
677
685
|
if (trackerController != nil) {
|
|
678
686
|
NSString *newIp = [details rnsp_stringForKey:@"ipAddress" defaultValue:nil];
|
|
@@ -689,7 +697,7 @@ RCT_EXPORT_METHOD(setUseragent:
|
|
|
689
697
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
690
698
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
691
699
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
692
|
-
id<SPTrackerController> trackerController = [
|
|
700
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
693
701
|
|
|
694
702
|
if (trackerController != nil) {
|
|
695
703
|
NSString *newUagent = [details rnsp_stringForKey:@"useragent" defaultValue:nil];
|
|
@@ -706,7 +714,7 @@ RCT_EXPORT_METHOD(setTimezone:
|
|
|
706
714
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
707
715
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
708
716
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
709
|
-
id<SPTrackerController> trackerController = [
|
|
717
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
710
718
|
|
|
711
719
|
if (trackerController != nil) {
|
|
712
720
|
NSString *newTz = [details rnsp_stringForKey:@"timezone" defaultValue:nil];
|
|
@@ -723,7 +731,7 @@ RCT_EXPORT_METHOD(setLanguage:
|
|
|
723
731
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
724
732
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
725
733
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
726
|
-
id<SPTrackerController> trackerController = [
|
|
734
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
727
735
|
|
|
728
736
|
if (trackerController != nil) {
|
|
729
737
|
NSString *newLang = [details rnsp_stringForKey:@"language" defaultValue:nil];
|
|
@@ -740,7 +748,7 @@ RCT_EXPORT_METHOD(setScreenResolution:
|
|
|
740
748
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
741
749
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
742
750
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
743
|
-
id<SPTrackerController> trackerController = [
|
|
751
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
744
752
|
|
|
745
753
|
if (trackerController != nil) {
|
|
746
754
|
NSObject *newRes = [details objectForKey:@"screenResolution"];
|
|
@@ -764,7 +772,7 @@ RCT_EXPORT_METHOD(setScreenViewport:
|
|
|
764
772
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
765
773
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
766
774
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
767
|
-
id<SPTrackerController> trackerController = [
|
|
775
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
768
776
|
|
|
769
777
|
if (trackerController != nil) {
|
|
770
778
|
NSObject *newView = [details objectForKey:@"screenViewport"];
|
|
@@ -788,7 +796,7 @@ RCT_EXPORT_METHOD(setColorDepth:
|
|
|
788
796
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
789
797
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
790
798
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
791
|
-
id<SPTrackerController> trackerController = [
|
|
799
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
792
800
|
|
|
793
801
|
if (trackerController != nil) {
|
|
794
802
|
NSNumber *newColorD = [details rnsp_numberForKey:@"colorDepth" defaultValue:nil];
|
|
@@ -805,7 +813,7 @@ RCT_EXPORT_METHOD(getSessionUserId:
|
|
|
805
813
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
806
814
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
807
815
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
808
|
-
id<SPTrackerController> trackerController = [
|
|
816
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
809
817
|
|
|
810
818
|
if (trackerController != nil) {
|
|
811
819
|
NSString *suid = [trackerController.session userId];
|
|
@@ -821,7 +829,7 @@ RCT_EXPORT_METHOD(getSessionId:
|
|
|
821
829
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
822
830
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
823
831
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
824
|
-
id<SPTrackerController> trackerController = [
|
|
832
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
825
833
|
|
|
826
834
|
if (trackerController != nil) {
|
|
827
835
|
NSString *sid = [trackerController.session sessionId];
|
|
@@ -837,7 +845,7 @@ RCT_EXPORT_METHOD(getSessionIndex:
|
|
|
837
845
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
838
846
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
839
847
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
840
|
-
id<SPTrackerController> trackerController = [
|
|
848
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
841
849
|
|
|
842
850
|
if (trackerController != nil) {
|
|
843
851
|
NSInteger sidx = [trackerController.session sessionIndex];
|
|
@@ -853,7 +861,7 @@ RCT_EXPORT_METHOD(getIsInBackground:
|
|
|
853
861
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
854
862
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
855
863
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
856
|
-
id<SPTrackerController> trackerController = [
|
|
864
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
857
865
|
|
|
858
866
|
if (trackerController != nil) {
|
|
859
867
|
BOOL isInBg = [trackerController.session isInBackground];
|
|
@@ -869,7 +877,7 @@ RCT_EXPORT_METHOD(getBackgroundIndex:
|
|
|
869
877
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
870
878
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
871
879
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
872
|
-
id<SPTrackerController> trackerController = [
|
|
880
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
873
881
|
|
|
874
882
|
if (trackerController != nil) {
|
|
875
883
|
NSInteger bgIdx = [trackerController.session backgroundIndex];
|
|
@@ -885,7 +893,7 @@ RCT_EXPORT_METHOD(getForegroundIndex:
|
|
|
885
893
|
resolver:(RCTPromiseResolveBlock)resolve
|
|
886
894
|
rejecter:(RCTPromiseRejectBlock)reject) {
|
|
887
895
|
NSString *namespace = [details objectForKey:@"tracker"];
|
|
888
|
-
id<SPTrackerController> trackerController = [
|
|
896
|
+
id<SPTrackerController> trackerController = [self trackerByNamespace:namespace];
|
|
889
897
|
|
|
890
898
|
if (trackerController != nil) {
|
|
891
899
|
NSInteger fgIdx = [trackerController.session foregroundIndex];
|
|
@@ -896,4 +904,8 @@ RCT_EXPORT_METHOD(getForegroundIndex:
|
|
|
896
904
|
}
|
|
897
905
|
}
|
|
898
906
|
|
|
907
|
+
- (nullable id<SPTrackerController>)trackerByNamespace:(NSString *)namespace {
|
|
908
|
+
return [namespace isEqual:[NSNull null]] ? [SPSnowplow defaultTracker] : [SPSnowplow trackerByNamespace:namespace];
|
|
909
|
+
}
|
|
910
|
+
|
|
899
911
|
@end
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
|
|
9
9
|
/* Begin PBXBuildFile section */
|
|
10
10
|
0562F54E146600A44BDEF45D /* libPods-RNSnowplowTracker.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8E15379B78A468FF69B0BDCA /* libPods-RNSnowplowTracker.a */; };
|
|
11
|
-
75D5EB7C2293B157005C8629 /* RCTConvert+Snowplow.m in Sources */ = {isa = PBXBuildFile; fileRef = 75D5EB7B2293B157005C8629 /* RCTConvert+Snowplow.m */; };
|
|
12
|
-
75D5EB7E2293B206005C8629 /* RCTConvert+Snowplow.h in Headers */ = {isa = PBXBuildFile; fileRef = 75D5EB7A2293B157005C8629 /* RCTConvert+Snowplow.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
13
11
|
75D5EB7F2293B206005C8629 /* RNSnowplowTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = B3E7B5881CC2AC0600A0062D /* RNSnowplowTracker.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
|
14
12
|
B3E7B58A1CC2AC0600A0062D /* RNSnowplowTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNSnowplowTracker.m */; };
|
|
15
13
|
/* End PBXBuildFile section */
|
|
@@ -29,8 +27,6 @@
|
|
|
29
27
|
/* Begin PBXFileReference section */
|
|
30
28
|
134814201AA4EA6300B7C361 /* libRNSnowplowTracker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNSnowplowTracker.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
31
29
|
4D25182CF98251495D063E8A /* Pods-RNSnowplowTracker.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNSnowplowTracker.release.xcconfig"; path = "Target Support Files/Pods-RNSnowplowTracker/Pods-RNSnowplowTracker.release.xcconfig"; sourceTree = "<group>"; };
|
|
32
|
-
75D5EB7A2293B157005C8629 /* RCTConvert+Snowplow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+Snowplow.h"; sourceTree = "<group>"; };
|
|
33
|
-
75D5EB7B2293B157005C8629 /* RCTConvert+Snowplow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+Snowplow.m"; sourceTree = "<group>"; };
|
|
34
30
|
7D2A97B8BEC452B270B0AA54 /* Pods-RNSnowplowTracker.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNSnowplowTracker.debug.xcconfig"; path = "Target Support Files/Pods-RNSnowplowTracker/Pods-RNSnowplowTracker.debug.xcconfig"; sourceTree = "<group>"; };
|
|
35
31
|
8E15379B78A468FF69B0BDCA /* libPods-RNSnowplowTracker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-RNSnowplowTracker.a"; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
36
32
|
B3E7B5881CC2AC0600A0062D /* RNSnowplowTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNSnowplowTracker.h; sourceTree = "<group>"; };
|
|
@@ -68,8 +64,6 @@
|
|
|
68
64
|
58B511D21A9E6C8500147676 = {
|
|
69
65
|
isa = PBXGroup;
|
|
70
66
|
children = (
|
|
71
|
-
75D5EB7A2293B157005C8629 /* RCTConvert+Snowplow.h */,
|
|
72
|
-
75D5EB7B2293B157005C8629 /* RCTConvert+Snowplow.m */,
|
|
73
67
|
B3E7B5881CC2AC0600A0062D /* RNSnowplowTracker.h */,
|
|
74
68
|
B3E7B5891CC2AC0600A0062D /* RNSnowplowTracker.m */,
|
|
75
69
|
134814211AA4EA7D00B7C361 /* Products */,
|
|
@@ -94,7 +88,6 @@
|
|
|
94
88
|
isa = PBXHeadersBuildPhase;
|
|
95
89
|
buildActionMask = 2147483647;
|
|
96
90
|
files = (
|
|
97
|
-
75D5EB7E2293B206005C8629 /* RCTConvert+Snowplow.h in Headers */,
|
|
98
91
|
75D5EB7F2293B206005C8629 /* RNSnowplowTracker.h in Headers */,
|
|
99
92
|
);
|
|
100
93
|
runOnlyForDeploymentPostprocessing = 0;
|
|
@@ -183,7 +176,6 @@
|
|
|
183
176
|
isa = PBXSourcesBuildPhase;
|
|
184
177
|
buildActionMask = 2147483647;
|
|
185
178
|
files = (
|
|
186
|
-
75D5EB7C2293B157005C8629 /* RCTConvert+Snowplow.m in Sources */,
|
|
187
179
|
B3E7B58A1CC2AC0600A0062D /* RNSnowplowTracker.m in Sources */,
|
|
188
180
|
);
|
|
189
181
|
runOnlyForDeploymentPostprocessing = 0;
|
package/ios/Util/RNConfigUtils.m
CHANGED
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
trackerConfiguration.installAutotracking = [trackerConfig rnsp_boolForKey:@"installAutotracking" defaultValue:YES];
|
|
71
71
|
trackerConfiguration.exceptionAutotracking = [trackerConfig rnsp_boolForKey:@"exceptionAutotracking" defaultValue:YES];
|
|
72
72
|
trackerConfiguration.diagnosticAutotracking = [trackerConfig rnsp_boolForKey:@"diagnosticAutotracking" defaultValue:NO];
|
|
73
|
+
trackerConfiguration.userAnonymisation = [trackerConfig rnsp_boolForKey:@"userAnonymisation" defaultValue:NO];
|
|
73
74
|
|
|
74
75
|
return trackerConfiguration;
|
|
75
76
|
}
|
|
@@ -98,6 +99,7 @@
|
|
|
98
99
|
emitterConfiguration.threadPoolSize = [[emitterConfig rnsp_numberForKey:@"threadPoolSize" defaultValue:@15] integerValue];
|
|
99
100
|
emitterConfiguration.byteLimitGet = [[emitterConfig rnsp_numberForKey:@"byteLimitGet" defaultValue:@40000] integerValue];
|
|
100
101
|
emitterConfiguration.byteLimitPost = [[emitterConfig rnsp_numberForKey:@"byteLimitPost" defaultValue:@40000] integerValue];
|
|
102
|
+
emitterConfiguration.serverAnonymisation = [emitterConfig rnsp_boolForKey:@"serverAnonymisation" defaultValue:NO];
|
|
101
103
|
|
|
102
104
|
return emitterConfiguration;
|
|
103
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snowplow/react-native-tracker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "A library for tracking Snowplow events in React Native",
|
|
5
5
|
"homepage": "https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/react-native-tracker/",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -43,20 +43,20 @@
|
|
|
43
43
|
"react-native": ">=0.65.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@types/jest": "^
|
|
46
|
+
"@types/jest": "^28.1.8",
|
|
47
47
|
"@types/react": "^16.8.25",
|
|
48
48
|
"@types/react-native": "^0.65.21",
|
|
49
49
|
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
50
50
|
"@typescript-eslint/parser": "^5.13.0",
|
|
51
|
-
"eslint": "^8.
|
|
52
|
-
"eslint-plugin-jest": "^
|
|
51
|
+
"eslint": "^8.23.1",
|
|
52
|
+
"eslint-plugin-jest": "^27.0.4",
|
|
53
53
|
"eslint-plugin-promise": "^6.0.0",
|
|
54
|
-
"jest": "^
|
|
54
|
+
"jest": "^28.1.3",
|
|
55
55
|
"rimraf": "^3.0.2",
|
|
56
56
|
"rollup": "^2.69.0",
|
|
57
57
|
"rollup-plugin-dts": "^4.2.0",
|
|
58
58
|
"rollup-plugin-sourcemaps": "^0.6.3",
|
|
59
|
-
"ts-jest": "^
|
|
59
|
+
"ts-jest": "^28.0.8",
|
|
60
60
|
"typescript": "^4.6.2"
|
|
61
61
|
},
|
|
62
62
|
"jest": {
|
package/CHANGELOG
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
Version 1.2.1 (2022-04-12)
|
|
2
|
-
--------------------------
|
|
3
|
-
Fix import of non-published NSDictionary helpers from SnowplowTracker on iOS (#161)
|
|
4
|
-
|
|
5
|
-
Version 1.2.0 (2022-03-25)
|
|
6
|
-
--------------------------
|
|
7
|
-
Add support for React Native for tvOS (#154)
|
|
8
|
-
Bump min RN version supported to v0.65+ (#153)
|
|
9
|
-
Add generic type for SelfDescribing event data (#156)
|
|
10
|
-
|
|
11
|
-
Version 1.1.0 (2022-02-07)
|
|
12
|
-
--------------------------
|
|
13
|
-
Update mobile tracker dependencies to v3 (#141)
|
|
14
|
-
Add deep link and message notification events (#142)
|
|
15
|
-
Update demo app to show accessing tracker instance from platform native code (#136)
|
|
16
|
-
Fix compilation error for iOS build on ARM macs (#140)
|
|
17
|
-
Fix check for byteLimitGet when reading emitter configuration (#138)
|
|
18
|
-
Fix check for Android version in GitHub Actions (#134)
|
|
19
|
-
Update year in all copyright notices (#148)
|
|
20
|
-
Update dependencies (#150)
|
|
21
|
-
|
|
22
|
-
Version 1.0.0 (2021-08-09)
|
|
23
|
-
--------------------------
|
|
24
|
-
Fix action-gh-release to specific commit (#133)
|
|
25
|
-
Update devDependencies (#132)
|
|
26
|
-
Publish sourcemaps (#131)
|
|
27
|
-
Lint DemoApp separately (#130)
|
|
28
|
-
Get Session Context Data (#53)
|
|
29
|
-
Update version in podspec (#110)
|
|
30
|
-
Set amended v_tracker indicating react-native (#18)
|
|
31
|
-
Add global contexts (#104)
|
|
32
|
-
Upgrade iOS Tracker and Android Tracker to v2 (#113)
|
|
33
|
-
Add test suite (#60)
|
|
34
|
-
|
|
35
|
-
Version 0.2.0 (2021-06-21)
|
|
36
|
-
--------------------------
|
|
37
|
-
Bump dependencies in DemoApp (#114)
|
|
38
|
-
Port to TypeScript (#115)
|
|
39
|
-
Handle asyncronous issues internally (#78)
|
|
40
|
-
Use ESLint (#126)
|
|
41
|
-
Add homepage and repository in package.json (#125)
|
|
42
|
-
Remove unused files (#124)
|
|
43
|
-
|
|
44
|
-
Version 0.1.7 (2021-05-24)
|
|
45
|
-
--------------------------
|
|
46
|
-
Remove waitForEventStore method and upgrade Android tracker (#92)
|
|
47
|
-
Automate deploy process (#61)
|
|
48
|
-
Fix null transitionType resulting in screen view event failing validation for ios (#122)
|
|
49
|
-
Fix Xcode 12.5 build breaks (#119)
|
|
50
|
-
Fix typo in CHANGELOG (#116)
|
|
51
|
-
Remove JCenter and add MavenCentral (#121)
|
|
52
|
-
Update build.gradle to match rootProject extra properties (#120)
|
|
53
|
-
Fix assembleAndroidTest builds (#118)
|
|
54
|
-
|
|
55
|
-
Version 0.1.6 (2021-04-06)
|
|
56
|
-
--------------------------
|
|
57
|
-
Bump iOS Tracker to 1.7.0 (#111)
|
|
58
|
-
|
|
59
|
-
Version 0.1.5 (2021-03-22)
|
|
60
|
-
--------------------------
|
|
61
|
-
Update DemoApp versions (#106)
|
|
62
|
-
Loosen peer dependency requirements (#105)
|
|
63
|
-
|
|
64
|
-
Note: v0.1.4 was skipped due to an error in publishing process.
|
|
65
|
-
---------------------------------------------------------------
|
|
66
|
-
|
|
67
|
-
Version 0.1.3 (2021-02-12)
|
|
68
|
-
--------------------------
|
|
69
|
-
Fix Xcode 12 compatibility (#102)
|
|
70
|
-
|
|
71
|
-
Version 0.1.2 (2021-01-15)
|
|
72
|
-
--------------------------
|
|
73
|
-
Upgrade obj-c tracker to 1.6.2 (#98)
|
|
74
|
-
|
|
75
|
-
Version 0.1.1 (2020-09-03)
|
|
76
|
-
--------------------------
|
|
77
|
-
Fix Android tracker version to 1.5.x (#91)
|
|
78
|
-
|
|
79
|
-
Version 0.1.0 (2020-07-10)
|
|
80
|
-
--------------------------
|
|
81
|
-
Add issue templates (#89)
|
|
82
|
-
Add CONTRIBUTING.md (#80)
|
|
83
|
-
Use recommended config as defaults (#86)
|
|
84
|
-
Fix iOS null comparison warnings (#85)
|
|
85
|
-
Return after promise rejection on Android (#84)
|
|
86
|
-
Update arguments and var names for consistency (#83)
|
|
87
|
-
Update DemoApp (#82)
|
|
88
|
-
Use fast fail on iOS (#87)
|
|
89
|
-
Update README (#77)
|
|
90
|
-
Dynamically use latest minor version of native tracker (#19)
|
|
91
|
-
Cleanup code formatting (#75)
|
|
92
|
-
Add Snyk Github Action (#71)
|
|
93
|
-
Add license (#62)
|
|
94
|
-
Handle setSubjectData values appropriately (#70)
|
|
95
|
-
Return promise on intialize() (#66)
|
|
96
|
-
Remove deprecated options (#69)
|
|
97
|
-
Expand testing scripts (#72)
|
|
98
|
-
Refactor method instrumentation (#58)
|
|
99
|
-
Fix compile warnings caused by unsafe comparison (#73)
|
|
100
|
-
Fix double self calls (#74)
|
|
101
|
-
Remove screen_id workaround (#57)
|
|
102
|
-
|
|
103
|
-
Version 0.1.0-alpha.17 (2020-05-04)
|
|
104
|
-
-----------------------------------
|
|
105
|
-
Use yarn everywhere for testing (#55)
|
|
106
|
-
Update ios tracker version to 1.3.0 (#54)
|
|
107
|
-
|
|
108
|
-
Version 0.1.0-alpha.16 (2020-04-16)
|
|
109
|
-
-----------------------------------
|
|
110
|
-
Update .npmignore and .gitignore (#51)
|
|
111
|
-
Update README (#50)
|
|
112
|
-
Update Demo App (#48)
|
|
113
|
-
Add trackPageView (#33)
|
|
114
|
-
Add script for clean build (#47)
|
|
115
|
-
Add setSubjectData method (#46)
|
|
116
|
-
Update android tracker version (#45)
|
|
117
|
-
Add Standard Settings (#34)
|
|
118
|
-
|
|
119
|
-
Version 0.1.0-alpha.15 (2020-02-06)
|
|
120
|
-
-----------------------------------
|
|
121
|
-
Cleanup Repo (#29)
|
|
122
|
-
Update DemoApp (#21)
|
|
123
|
-
Update ios Tracker dependency to remove mandatory dynamic build (#22)
|
|
124
|
-
|
|
125
|
-
Version 0.1.0-alpha.14 (2019-10-22)
|
|
126
|
-
----------------------------------
|
|
127
|
-
Update iOS to incorporate patch release (#23)
|
|
128
|
-
|
|
129
|
-
Version 0.1.0-alpha.13 (2019-10-14)
|
|
130
|
-
-----------------------------------
|
|
131
|
-
Make optional StructEvent parameters nullable for iOS (#12)
|
|
132
|
-
Add ScreenViews (#14)
|
|
133
|
-
Fix bug in android getContexts (#16)
|
|
134
|
-
Add mobile context (#13)
|
|
135
|
-
Update README.md (#5)
|
|
136
|
-
Fix path in Android package export (#8)
|
|
137
|
-
Fix high severity vulnerabilities in DemoApp (#7)
|
|
138
|
-
Bump DemoApp react-native version (#6)
|
|
139
|
-
Fix import in Demo Application (#3)
|
|
140
|
-
Fix Android Numeric type bug (#4)
|
|
141
|
-
|
|
142
|
-
Version 0.1.0-alpha.9 (2019-08-08)
|
|
143
|
-
----------------------------------
|
|
144
|
-
Initial Release
|