@metrixorg/react-native-plugin 1.2.0-beta14 → 1.2.0-beta15
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/android/build.gradle +2 -2
- package/ios/RNMetrixModule.m +17 -17
- package/package.json +1 -1
- package/react-native-metrix.podspec +1 -1
package/android/build.gradle
CHANGED
package/ios/RNMetrixModule.m
CHANGED
|
@@ -29,79 +29,79 @@ BOOL hasAttributionListener;
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
RCT_EXPORT_METHOD(initialize:(NSString *)appId) {
|
|
32
|
-
[
|
|
32
|
+
[MetrixClient initializeWithMetrixAppId:appId];
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
RCT_EXPORT_METHOD(setPushToken:(NSString *)token) {
|
|
36
|
-
[
|
|
36
|
+
[MetrixClient setPushTokenWithPushToken:token];
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
RCT_EXPORT_METHOD(setSessionNumberListener) {
|
|
40
|
-
[
|
|
40
|
+
[MetrixClient setSessionNumberListener:^(NSInteger sessionNumber) {
|
|
41
41
|
[self sendEventWithName:@"onSessionNumberChangedListener" body:[NSString stringWithFormat: @"%ld", (long)sessionNumber]];
|
|
42
42
|
}];
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
RCT_EXPORT_METHOD(setSessionIdListener) {
|
|
46
|
-
[
|
|
46
|
+
[MetrixClient setSessionIdListener:^(NSString *sessionId) {
|
|
47
47
|
[self sendEventWithName:@"onSessionIdChangedListener" body:sessionId];
|
|
48
48
|
}];
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
RCT_EXPORT_METHOD(newCustomEvent:(NSString *)eventName attributes:(NSDictionary *)attributes) {
|
|
52
|
-
[
|
|
52
|
+
[MetrixClient newEventWithSlug:eventName attributes:attributes];
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
RCT_EXPORT_METHOD(newEvent:(NSString *)eventName) {
|
|
56
|
-
[
|
|
56
|
+
[MetrixClient newEventWithSlug:eventName];
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
RCT_EXPORT_METHOD(newRevenueSimple:(NSString *)eventName revenue:(double)revenue) {
|
|
60
|
-
[
|
|
60
|
+
[MetrixClient newRevenueWithSlug:eventName revenue:revenue];
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
RCT_EXPORT_METHOD(newRevenueOrderId:(NSString *)eventName revenue:(double)revenue orderId:(NSString *)orderId) {
|
|
64
|
-
[
|
|
64
|
+
[MetrixClient newRevenueWithSlug:eventName revenue:revenue orderId:orderId];
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
RCT_EXPORT_METHOD(newRevenueCurrency:(NSString *)eventName revenue:(double)revenue currency:(int)currency) {
|
|
68
|
-
[
|
|
68
|
+
[MetrixClient newRevenueWithSlug:eventName revenue:revenue currency:currency];
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
RCT_EXPORT_METHOD(newRevenueFull:(NSString *)eventName revenue:(double)revenue currency:(int)currency orderId:(NSString *)orderId) {
|
|
72
|
-
[
|
|
72
|
+
[MetrixClient newRevenueWithSlug:eventName revenue:revenue currency:currency orderId:orderId];
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
RCT_EXPORT_METHOD(addUserAttributes:(NSDictionary *)attributes) {
|
|
76
|
-
[
|
|
76
|
+
[MetrixClient addUserAttributesWithUserAttrs:attributes];
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
RCT_EXPORT_METHOD(setStore:(NSString *)storeName) {
|
|
80
|
-
[
|
|
80
|
+
[MetrixClient setStoreWithStoreName:storeName];
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
RCT_EXPORT_METHOD(setAppSecret:(int)secretId info1:(NSInteger)info1 info2:(NSInteger)info2 info3:(NSInteger)info3 info4:(NSInteger)info4) {
|
|
84
|
-
[
|
|
84
|
+
[MetrixClient setAppSecretWithSecretId:secretId info1:info1 info2:info2 info3:info3 info4:info4];
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
RCT_EXPORT_METHOD(setDefaultTracker:(NSString *)trackerToken) {
|
|
88
|
-
[
|
|
88
|
+
[MetrixClient setDefaultTrackerWithTrackerToken:trackerToken];
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
RCT_EXPORT_METHOD(setOnAttributionChangedListener) {
|
|
92
|
-
[
|
|
92
|
+
[MetrixClient setOnAttributionChangedListener:^(AttributionData *data) {
|
|
93
93
|
[self sendEventWithName:@"onAttributionChangedListener" body:[self getAttributionInfoObject:data]];
|
|
94
94
|
}];
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
RCT_EXPORT_METHOD(setUserIdListener) {
|
|
98
|
-
[
|
|
98
|
+
[MetrixClient setUserIdListener:^(NSString *userId) {
|
|
99
99
|
[self sendEventWithName:@"onUserIdListener" body:userId];
|
|
100
100
|
}];
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
RCT_EXPORT_METHOD(setOnDeeplinkResponseListener:(BOOL)shouldLaunchDeferredDeeplink) {
|
|
104
|
-
[
|
|
104
|
+
[MetrixClient setOnDeeplinkResponseListener:^BOOL(NSString *deeplink) {
|
|
105
105
|
[self sendEventWithName:@"onDeeplinkResponseListener" body:deeplink];
|
|
106
106
|
return shouldLaunchDeferredDeeplink;
|
|
107
107
|
}];
|
package/package.json
CHANGED