@customerglu/react-native-customerglu 3.0.0-beta-1.0 → 3.0.0-beta-1.2
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/ReactNativeCustomerglu.podspec +6 -1
- package/android/generated/java/com/customerglu/reactnativecustomerglu/NativeReactNativeCustomergluSpec.java +2 -2
- package/android/generated/jni/CMakeLists.txt +5 -5
- package/android/generated/jni/{RNReactNativeCustomergluSpec-generated.cpp → RNCustomergluSpec-generated.cpp} +3 -3
- package/android/generated/jni/{RNReactNativeCustomergluSpec.h → RNCustomergluSpec.h} +1 -1
- package/android/generated/jni/react/renderer/components/{RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpecJSI-generated.cpp → RNCustomergluSpec/RNCustomergluSpecJSI-generated.cpp} +2 -2
- package/{ios/generated/RNReactNativeCustomergluSpecJSI.h → android/generated/jni/react/renderer/components/RNCustomergluSpec/RNCustomergluSpecJSI.h} +6 -6
- package/ios/IosBannerView.h +16 -0
- package/ios/IosBannerView.mm +126 -0
- package/ios/IosBannerViewManager.mm +24 -0
- package/ios/ReactNativeCustomerglu-Bridging-Header.h +19 -0
- package/ios/Rncustomerglu.h +5 -2
- package/ios/Rncustomerglu.mm +487 -6
- package/ios/generated/{RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpec-generated.mm → RNCustomergluSpec/RNCustomergluSpec-generated.mm} +1 -1
- package/ios/generated/{RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpec.h → RNCustomergluSpec/RNCustomergluSpec.h} +6 -6
- package/ios/generated/{RNReactNativeCustomergluSpecJSI-generated.cpp → RNCustomergluSpecJSI-generated.cpp} +2 -2
- package/{android/generated/jni/react/renderer/components/RNReactNativeCustomergluSpec/RNReactNativeCustomergluSpecJSI.h → ios/generated/RNCustomergluSpecJSI.h} +6 -6
- package/lib/commonjs/index.js +4 -4
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/commonjs/src/NativeReactNativeCustomerglu.d.ts +2 -2
- package/lib/typescript/commonjs/src/NativeReactNativeCustomerglu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeReactNativeCustomerglu.d.ts +2 -2
- package/lib/typescript/module/src/NativeReactNativeCustomerglu.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +2 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/NativeReactNativeCustomerglu.ts +2 -2
- package/src/index.tsx +9 -5
package/ios/Rncustomerglu.mm
CHANGED
|
@@ -1,18 +1,499 @@
|
|
|
1
1
|
#import "Rncustomerglu.h"
|
|
2
|
+
#import "CustomerGlu/CustomerGlu-Swift.h"
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
#import <WebKit/WebKit.h>
|
|
5
|
+
#import <UserNotifications/UserNotifications.h>
|
|
6
|
+
#import <UserNotifications/UNNotification.h>
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
@implementation Rncustomerglu {
|
|
9
|
+
bool hasListeners;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
RCT_EXPORT_MODULE(Rncustomerglu);
|
|
13
|
+
- (NSArray<NSString *> *)supportedEvents {
|
|
14
|
+
return @[
|
|
15
|
+
@"CUSTOMERGLU_ANALYTICS_EVENT",
|
|
16
|
+
@"CUSTOMERGLU_DEEPLINK_EVENT",
|
|
17
|
+
@"CGBANNER_FINAL_HEIGHT",
|
|
18
|
+
@"CUSTOMERGLU_BANNER_LOADED",
|
|
19
|
+
@"CGEMBED_FINAL_HEIGHT",
|
|
20
|
+
@"CG_INVALID_CAMPAIGN_ID",
|
|
21
|
+
@"CG_UNI_DEEPLINK_EVENT"
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Test method to verify event emission is working
|
|
26
|
+
RCT_EXPORT_METHOD(testEventEmission) {
|
|
27
|
+
NSDictionary *testData = @{@"message": @"Test event from native",
|
|
28
|
+
@"timestamp": @([[NSDate date] timeIntervalSince1970])};
|
|
29
|
+
NSLog(@"[CustomerGlu] Testing event emission with data: %@", testData);
|
|
30
|
+
|
|
31
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
32
|
+
[self sendEventWithName:@"CUSTOMERGLU_ANALYTICS_EVENT" body:testData];
|
|
33
|
+
});
|
|
34
|
+
}
|
|
8
35
|
|
|
9
|
-
|
|
36
|
+
// Generic event handler method
|
|
37
|
+
- (void)handleEvent:(NSNotification *)notification {
|
|
38
|
+
NSString *eventName = notification.name;
|
|
39
|
+
NSDictionary *eventData = notification.userInfo;
|
|
40
|
+
|
|
41
|
+
NSLog(@"[CustomerGlu] Event received: %@ with data: %@", eventName, eventData);
|
|
42
|
+
|
|
43
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
44
|
+
if (self->hasListeners) {
|
|
45
|
+
NSLog(@"[CustomerGlu] hasListeners is YES, sending event: %@", eventName);
|
|
46
|
+
[self sendEventWithName:eventName body:eventData];
|
|
47
|
+
} else {
|
|
48
|
+
NSLog(@"[CustomerGlu] hasListeners is NO, not sending event");
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Start observing events
|
|
54
|
+
- (void)startObserving {
|
|
55
|
+
hasListeners = YES;
|
|
56
|
+
NSLog(@"[CustomerGlu] Started observing for events - hasListeners is now YES");
|
|
57
|
+
|
|
58
|
+
NSArray *events = @[
|
|
59
|
+
@"CUSTOMERGLU_ANALYTICS_EVENT",
|
|
60
|
+
@"CUSTOMERGLU_DEEPLINK_EVENT",
|
|
61
|
+
@"CGBANNER_FINAL_HEIGHT",
|
|
62
|
+
@"CUSTOMERGLU_BANNER_LOADED",
|
|
63
|
+
@"CGEMBED_FINAL_HEIGHT",
|
|
64
|
+
@"CG_INVALID_CAMPAIGN_ID",
|
|
65
|
+
@"CG_UNI_DEEPLINK_EVENT"
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
for (NSString *event in events) {
|
|
69
|
+
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
70
|
+
selector:@selector(handleEvent:)
|
|
71
|
+
name:event
|
|
72
|
+
object:nil];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Stop observing events
|
|
77
|
+
- (void)stopObserving {
|
|
78
|
+
hasListeners = NO;
|
|
79
|
+
NSLog(@"[CustomerGlu] Stopped observing for events - hasListeners is now NO");
|
|
80
|
+
|
|
81
|
+
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
10
82
|
}
|
|
11
83
|
|
|
12
84
|
- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
|
|
13
85
|
(const facebook::react::ObjCTurboModule::InitParams &)params
|
|
14
86
|
{
|
|
15
|
-
return std::make_shared<facebook::react::
|
|
87
|
+
return std::make_shared<facebook::react::NativeReactNativeCustomergluSpecJSI>(params);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
- (void)DisplayCGBackgroundNotification:(nonnull NSDictionary *)obj autoclosewebview:(nonnull NSNumber *)autoclosewebview {
|
|
91
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
92
|
+
|
|
93
|
+
@try {
|
|
94
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
95
|
+
[sdk displayBackgroundNotificationWithRemoteMessage:obj auto_close_webview:autoclosewebview];
|
|
96
|
+
|
|
97
|
+
});
|
|
98
|
+
} @catch (NSException *exception) {
|
|
99
|
+
NSLog(@"CustomerGlu displayBackgroundNotificationWithRemoteMessage failed: %@", exception.reason);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
- (void)DisplayCGNotification:(nonnull NSDictionary *)obj autoclosewebview:(nonnull NSNumber *)autoclosewebview {
|
|
104
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
105
|
+
|
|
106
|
+
@try {
|
|
107
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
108
|
+
[sdk displayBackgroundNotificationWithRemoteMessage:obj auto_close_webview:autoclosewebview];
|
|
109
|
+
|
|
110
|
+
});
|
|
111
|
+
} @catch (NSException *exception) {
|
|
112
|
+
NSLog(@"CustomerGlu DisplayCGNotification failed: %@", exception.reason);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
- (void)DisplayCustomerGluNotification {
|
|
117
|
+
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
- (void)SetCurrentClassName:(nonnull NSString *)clname resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
121
|
+
|
|
122
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
123
|
+
|
|
124
|
+
@try {
|
|
125
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
126
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
127
|
+
[sdk setCurrentClassNameWithClassName:clname];
|
|
128
|
+
resolve(clname);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
} @catch (NSException *exception) {
|
|
132
|
+
NSLog(@"CustomerGlu clearGluData failed: %@", exception.reason);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
- (void)UpdateProfile:(nonnull NSDictionary *)obj {
|
|
138
|
+
|
|
139
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
140
|
+
|
|
141
|
+
@try {
|
|
142
|
+
[sdk updateProfileWithUserdata:obj];
|
|
143
|
+
|
|
144
|
+
} @catch (NSException *exception) {
|
|
145
|
+
NSLog(@"CustomerGlu updateProfileWithUserdata failed: %@", exception.reason);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
- (void)UpdateUserAttributes:(nonnull NSDictionary *)userdata {
|
|
152
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
153
|
+
|
|
154
|
+
@try {
|
|
155
|
+
[sdk updateUserAttributesWithCustomAttributes:userdata];
|
|
156
|
+
|
|
157
|
+
} @catch (NSException *exception) {
|
|
158
|
+
NSLog(@"CustomerGlu UpdateUserAttributes failed: %@", exception.reason);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
- (void)addDelayForPIP:(double)delay {
|
|
163
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
164
|
+
|
|
165
|
+
@try {
|
|
166
|
+
[sdk addDelayForPIPWithDelay:delay];
|
|
167
|
+
} @catch (NSException *exception) {
|
|
168
|
+
NSLog(@"CustomerGlu addDelayForPIPWithDelay failed: %@", exception.reason);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
- (void)addListener:(nonnull NSString *)eventType {
|
|
173
|
+
[super addListener:eventType];
|
|
174
|
+
NSLog(@"[CustomerGlu] JS added listener for %@", eventType);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
- (void)addMarginsForPIP:(double)horizontal vertical:(double)vertical type:(nonnull NSString *)type {
|
|
178
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
179
|
+
|
|
180
|
+
@try {
|
|
181
|
+
[sdk addMarginForPIPWithHorizontal:horizontal vertical:vertical];
|
|
182
|
+
} @catch (NSException *exception) {
|
|
183
|
+
NSLog(@"CustomerGlu clearGluData failed: %@", exception.reason);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
- (void)allowAnonymousRegistration:(BOOL)b {
|
|
188
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
189
|
+
|
|
190
|
+
@try {
|
|
191
|
+
[sdk allowAnonymousRegistrationWithEnabled:b];
|
|
192
|
+
} @catch (NSException *exception) {
|
|
193
|
+
NSLog(@"CustomerGlu allowAnonymousRegistrationWithEnabled failed: %@", exception.reason);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
- (void)dataClear {
|
|
198
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
199
|
+
|
|
200
|
+
@try {
|
|
201
|
+
[sdk clearGluData];
|
|
202
|
+
} @catch (NSException *exception) {
|
|
203
|
+
NSLog(@"CustomerGlu clearGluData failed: %@", exception.reason);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
- (void)enableAnalytic:(BOOL)b {
|
|
208
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
209
|
+
|
|
210
|
+
@try {
|
|
211
|
+
[sdk enableAnalyticsEventWithEvent:b];
|
|
212
|
+
} @catch (NSException *exception) {
|
|
213
|
+
NSLog(@"CustomerGlu enableAnalyticsEventWithEvent failed: %@", exception.reason);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
- (void)enableEntryPoints:(BOOL)b {
|
|
218
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
219
|
+
|
|
220
|
+
@try {
|
|
221
|
+
[sdk enableEntryPointsWithEnabled:b];
|
|
222
|
+
} @catch (NSException *exception) {
|
|
223
|
+
NSLog(@"CustomerGlu enableEntryPoints failed: %@", exception.reason);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
- (void)getBannerHeight:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
228
|
+
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
- (void)getCampaignStatus:(nonnull NSString *)campaignId dataFlag:(nonnull NSString *)dataFlag resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
232
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
233
|
+
|
|
234
|
+
@try {
|
|
235
|
+
// Convert NSString to CAMPAIGNDATA enum value
|
|
236
|
+
CAMPAIGNDATA dataFlagEnum;
|
|
237
|
+
|
|
238
|
+
if ([dataFlag caseInsensitiveCompare:@"API"] == NSOrderedSame) {
|
|
239
|
+
dataFlagEnum = CAMPAIGNDATAAPI;
|
|
240
|
+
} else if ([dataFlag caseInsensitiveCompare:@"CACHE"] == NSOrderedSame) {
|
|
241
|
+
dataFlagEnum = CAMPAIGNDATACACHE;
|
|
242
|
+
} else {
|
|
243
|
+
// Default to API if unknown value is provided
|
|
244
|
+
dataFlagEnum = CAMPAIGNDATAAPI;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
[sdk getCampaignStatusWithCampaignId:campaignId dataType:dataFlagEnum completion:^(CAMPAIGN_STATE campaignStatus) {
|
|
248
|
+
NSString *statusString;
|
|
249
|
+
|
|
250
|
+
// Convert enum value to string based on the typedef
|
|
251
|
+
switch (campaignStatus) {
|
|
252
|
+
case CAMPAIGN_STATEIN_PROGRESS:
|
|
253
|
+
statusString = @"IN_PROGRESS";
|
|
254
|
+
break;
|
|
255
|
+
case CAMPAIGN_STATEPRISTINE:
|
|
256
|
+
statusString = @"PRISTINE";
|
|
257
|
+
break;
|
|
258
|
+
case CAMPAIGN_STATECOMPLETED:
|
|
259
|
+
statusString = @"COMPLETED";
|
|
260
|
+
break;
|
|
261
|
+
case CAMPAIGN_STATENOT_ELIGIBLE:
|
|
262
|
+
statusString = @"NOT_ELIGIBLE";
|
|
263
|
+
break;
|
|
264
|
+
default:
|
|
265
|
+
statusString = @"UNKNOWN";
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
resolve(statusString);
|
|
272
|
+
}];
|
|
273
|
+
} @catch (NSException *exception) {
|
|
274
|
+
NSLog(@"CustomerGlu getCampaignStatus failed: %@", exception.reason);
|
|
275
|
+
reject(@"campaign_status_error", exception.reason, nil);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
- (void)gluSDKDebuggingMode:(BOOL)b {
|
|
281
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
282
|
+
|
|
283
|
+
@try {
|
|
284
|
+
[sdk gluSDKDebuggingModeWithEnabled:YES];
|
|
285
|
+
} @catch (NSException *exception) {
|
|
286
|
+
NSLog(@"CustomerGlu initialization failed: %@", exception.reason);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
- (void)initCGSDK:(nonnull NSString *)obj {
|
|
291
|
+
NSLog(@"[CustomerGlu] start init sdk");
|
|
292
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
293
|
+
|
|
294
|
+
@try {
|
|
295
|
+
[self startObserving];
|
|
296
|
+
[sdk initializeSdkWithMyenv:obj];
|
|
297
|
+
} @catch (NSException *exception) {
|
|
298
|
+
NSLog(@"CustomerGlu initialization failed: %@", exception.reason);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
- (void)isCampaignValid:(nonnull NSString *)campaignId dataFlag:(nonnull NSString *)dataFlag resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
304
|
+
|
|
305
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
306
|
+
|
|
307
|
+
@try {
|
|
308
|
+
// Convert NSString to CAMPAIGNDATA enum value
|
|
309
|
+
CAMPAIGNDATA dataFlagEnum;
|
|
310
|
+
|
|
311
|
+
if ([dataFlag caseInsensitiveCompare:@"API"] == NSOrderedSame) {
|
|
312
|
+
dataFlagEnum = CAMPAIGNDATAAPI;
|
|
313
|
+
} else if ([dataFlag caseInsensitiveCompare:@"CACHE"] == NSOrderedSame) {
|
|
314
|
+
dataFlagEnum = CAMPAIGNDATACACHE;
|
|
315
|
+
} else {
|
|
316
|
+
// Default to API if unknown value is provided
|
|
317
|
+
dataFlagEnum = CAMPAIGNDATAAPI;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
[sdk isCampaignValidWithCampaignId:campaignId dataType:dataFlagEnum completion:^(BOOL success) {
|
|
321
|
+
if (success) {
|
|
322
|
+
resolve(@(YES));
|
|
323
|
+
} else {
|
|
324
|
+
resolve(@(NO));
|
|
325
|
+
}
|
|
326
|
+
}];
|
|
327
|
+
} @catch (NSException *exception) {
|
|
328
|
+
NSLog(@"CustomerGlu getCampaignValid failed: %@", exception.reason);
|
|
329
|
+
reject(@"campaign_status_error", exception.reason, nil);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
- (void)isFcmApn:(NSString *) value {
|
|
334
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
335
|
+
|
|
336
|
+
@try {
|
|
337
|
+
[sdk isFcmApnWithFcmApn:value];
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
} @catch (NSException *exception) {
|
|
341
|
+
NSLog(@"CustomerGlu isFcm failed: %@", exception.reason);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
- (void)loadCampaignById:(nonnull NSString *)campid obj:(nonnull NSDictionary *)obj {
|
|
346
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
347
|
+
|
|
348
|
+
@try {
|
|
349
|
+
// Extract values from the dictionary with appropriate defaults
|
|
350
|
+
CGNudgeConfiguration *config = [[CGNudgeConfiguration alloc] init];
|
|
351
|
+
|
|
352
|
+
if (obj.count == 0) {
|
|
353
|
+
// If the dictionary is empty, just call the method without a configuration
|
|
354
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
355
|
+
[sdk loadCampaignByIdWithCampaign_id:campid nudgeConfiguration:config auto_close_webview:YES];
|
|
356
|
+
|
|
357
|
+
});
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Set values using KVC (Key-Value Coding)
|
|
362
|
+
for (NSString *key in obj) {
|
|
363
|
+
@try {
|
|
364
|
+
[config setValue:obj[key] forKey:key];
|
|
365
|
+
} @catch (NSException *exception) {
|
|
366
|
+
NSLog(@"Failed to set %@ on CGNudgeConfiguration: %@", key, exception.reason);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
// Call the method with the created configuration
|
|
372
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
373
|
+
[sdk loadCampaignByIdWithCampaign_id:campid nudgeConfiguration:config auto_close_webview:YES];
|
|
374
|
+
|
|
375
|
+
});
|
|
376
|
+
} @catch (NSException *exception) {
|
|
377
|
+
NSLog(@"CustomerGlu loadCampaignById failed: %@", exception.reason);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
- (void)loadCampaignWithUrl:(nonnull NSString *)url obj:(nonnull NSDictionary *)obj {
|
|
384
|
+
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
- (void)openWallet:(nonnull NSDictionary *)obj {
|
|
388
|
+
|
|
389
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
390
|
+
|
|
391
|
+
@try {
|
|
392
|
+
// Extract values from the dictionary with appropriate defaults
|
|
393
|
+
CGNudgeConfiguration *config = [[CGNudgeConfiguration alloc] init];
|
|
394
|
+
|
|
395
|
+
if (obj.count == 0) {
|
|
396
|
+
// If the dictionary is empty, just call the method without a configuration
|
|
397
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
398
|
+
[sdk openWalletWithNudgeConfiguration:config];
|
|
399
|
+
|
|
400
|
+
});
|
|
401
|
+
return;
|
|
402
|
+
|
|
403
|
+
}
|
|
404
|
+
// Set values using KVC (Key-Value Coding)
|
|
405
|
+
for (NSString *key in obj) {
|
|
406
|
+
@try {
|
|
407
|
+
[config setValue:obj[key] forKey:key];
|
|
408
|
+
} @catch (NSException *exception) {
|
|
409
|
+
NSLog(@"Failed to set %@ on CGNudgeConfiguration: %@", key, exception.reason);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
// Call the method with the created configuration
|
|
415
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
416
|
+
[sdk openWalletWithNudgeConfiguration:config];
|
|
417
|
+
|
|
418
|
+
});
|
|
419
|
+
} @catch (NSException *exception) {
|
|
420
|
+
NSLog(@"CustomerGlu openWallet failed: %@", exception.reason);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
- (void)registerDevice:(nonnull NSDictionary *)data resolve:(nonnull RCTPromiseResolveBlock)resolve reject:(nonnull RCTPromiseRejectBlock)reject {
|
|
426
|
+
|
|
427
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
@try {
|
|
431
|
+
[sdk registerDeviceWithUserdata:data completion:^(BOOL success) {
|
|
432
|
+
if (success) {
|
|
433
|
+
resolve(@(YES));
|
|
434
|
+
} else {
|
|
435
|
+
resolve(@(NO));
|
|
436
|
+
}
|
|
437
|
+
}];
|
|
438
|
+
} @catch (NSException *exception) {
|
|
439
|
+
NSLog(@"CustomerGlu registration failed: %@", exception.reason);
|
|
440
|
+
reject(@"registration_error", exception.reason, nil);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
- (void)removeListeners:(double)count {
|
|
446
|
+
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
- (void)sendData:(nonnull NSDictionary *)obj {
|
|
450
|
+
|
|
451
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
452
|
+
|
|
453
|
+
@try {
|
|
454
|
+
// Extract event name from the dictionary - required parameter
|
|
455
|
+
NSString *eventName = obj[@"eventName"];
|
|
456
|
+
|
|
457
|
+
// Make sure eventName is present
|
|
458
|
+
if (!eventName || ![eventName isKindOfClass:[NSString class]]) {
|
|
459
|
+
NSLog(@"CustomerGlu sendData failed: eventName is required and must be a string");
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
// Extract event properties if present, otherwise use empty dictionary
|
|
464
|
+
NSDictionary *eventProperties = obj[@"eventProperties"];
|
|
465
|
+
if (!eventProperties || ![eventProperties isKindOfClass:[NSDictionary class]]) {
|
|
466
|
+
eventProperties = @{};
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// Call the method with extracted values
|
|
470
|
+
[sdk sendEventDataWithEventName:eventName eventProperties:eventProperties];
|
|
471
|
+
} @catch (NSException *exception) {
|
|
472
|
+
NSLog(@"CustomerGlu sendEvent failed: %@", exception.reason);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
- (void)setApnFcmToken:(nonnull NSString *)a b:(nonnull NSString *)b {
|
|
477
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
478
|
+
|
|
479
|
+
@try {
|
|
480
|
+
sdk.apnToken = a;
|
|
481
|
+
sdk.fcmToken = b;
|
|
482
|
+
} @catch (NSException *exception) {
|
|
483
|
+
NSLog(@"CustomerGlu setApnFcmToken failed: %@", exception.reason);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
- (void)setOpenWalletAsFallback:(BOOL)value {
|
|
488
|
+
CustomerGlu *sdk = [CustomerGlu getInstance];
|
|
489
|
+
|
|
490
|
+
@try {
|
|
491
|
+
[sdk setOpenWalletAsFallback:value];
|
|
492
|
+
|
|
493
|
+
} @catch (NSException *exception) {
|
|
494
|
+
NSLog(@"CustomerGlu isFcm failed: %@", exception.reason);
|
|
495
|
+
}
|
|
496
|
+
|
|
16
497
|
}
|
|
17
498
|
|
|
18
499
|
@end
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
|
16
16
|
#endif
|
|
17
17
|
|
|
18
|
-
// Avoid multiple includes of
|
|
19
|
-
#ifndef
|
|
20
|
-
#define
|
|
18
|
+
// Avoid multiple includes of RNCustomergluSpec symbols
|
|
19
|
+
#ifndef RNCustomergluSpec_H
|
|
20
|
+
#define RNCustomergluSpec_H
|
|
21
21
|
|
|
22
22
|
#import <Foundation/Foundation.h>
|
|
23
23
|
#import <RCTRequired/RCTRequired.h>
|
|
@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
45
45
|
- (void)sendData:(NSDictionary *)obj;
|
|
46
46
|
- (void)openWallet:(NSDictionary *)obj;
|
|
47
47
|
- (void)initCGSDK:(NSString *)obj;
|
|
48
|
-
- (void)loadCampaignById:(NSString *)
|
|
48
|
+
- (void)loadCampaignById:(NSString *)campid
|
|
49
49
|
obj:(NSDictionary *)obj;
|
|
50
50
|
- (void)loadCampaignWithUrl:(NSString *)url
|
|
51
51
|
obj:(NSDictionary *)obj;
|
|
@@ -53,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
53
53
|
- (void)allowAnonymousRegistration:(BOOL)b;
|
|
54
54
|
- (void)gluSDKDebuggingMode:(BOOL)b;
|
|
55
55
|
- (void)enableEntryPoints:(BOOL)b;
|
|
56
|
-
- (void)isFcmApn:(
|
|
56
|
+
- (void)isFcmApn:(NSString *)value;
|
|
57
57
|
- (void)UpdateProfile:(NSDictionary *)obj;
|
|
58
58
|
- (void)DisplayCustomerGluNotification;
|
|
59
59
|
- (void)DisplayCGNotification:(NSDictionary *)obj
|
|
@@ -103,4 +103,4 @@ namespace facebook::react {
|
|
|
103
103
|
} // namespace facebook::react
|
|
104
104
|
|
|
105
105
|
NS_ASSUME_NONNULL_END
|
|
106
|
-
#endif //
|
|
106
|
+
#endif // RNCustomergluSpec_H
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
#include "
|
|
10
|
+
#include "RNCustomergluSpecJSI.h"
|
|
11
11
|
|
|
12
12
|
namespace facebook::react {
|
|
13
13
|
|
|
@@ -112,7 +112,7 @@ static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_enableEn
|
|
|
112
112
|
static jsi::Value __hostFunction_NativeReactNativeCustomergluCxxSpecJSI_isFcmApn(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
113
113
|
static_cast<NativeReactNativeCustomergluCxxSpecJSI *>(&turboModule)->isFcmApn(
|
|
114
114
|
rt,
|
|
115
|
-
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].
|
|
115
|
+
count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt)
|
|
116
116
|
);
|
|
117
117
|
return jsi::Value::undefined();
|
|
118
118
|
}
|
|
@@ -28,13 +28,13 @@ public:
|
|
|
28
28
|
virtual void sendData(jsi::Runtime &rt, jsi::Object obj) = 0;
|
|
29
29
|
virtual void openWallet(jsi::Runtime &rt, std::optional<jsi::Object> obj) = 0;
|
|
30
30
|
virtual void initCGSDK(jsi::Runtime &rt, jsi::String obj) = 0;
|
|
31
|
-
virtual void loadCampaignById(jsi::Runtime &rt, jsi::String
|
|
31
|
+
virtual void loadCampaignById(jsi::Runtime &rt, jsi::String campid, std::optional<jsi::Object> obj) = 0;
|
|
32
32
|
virtual void loadCampaignWithUrl(jsi::Runtime &rt, jsi::String url, jsi::Object obj) = 0;
|
|
33
33
|
virtual void enableAnalytic(jsi::Runtime &rt, bool b) = 0;
|
|
34
34
|
virtual void allowAnonymousRegistration(jsi::Runtime &rt, bool b) = 0;
|
|
35
35
|
virtual void gluSDKDebuggingMode(jsi::Runtime &rt, bool b) = 0;
|
|
36
36
|
virtual void enableEntryPoints(jsi::Runtime &rt, bool b) = 0;
|
|
37
|
-
virtual void isFcmApn(jsi::Runtime &rt,
|
|
37
|
+
virtual void isFcmApn(jsi::Runtime &rt, jsi::String value) = 0;
|
|
38
38
|
virtual void UpdateProfile(jsi::Runtime &rt, jsi::Object obj) = 0;
|
|
39
39
|
virtual void DisplayCustomerGluNotification(jsi::Runtime &rt) = 0;
|
|
40
40
|
virtual void DisplayCGNotification(jsi::Runtime &rt, jsi::Object obj, std::optional<bool> autoclosewebview) = 0;
|
|
@@ -141,13 +141,13 @@ private:
|
|
|
141
141
|
return bridging::callFromJs<void>(
|
|
142
142
|
rt, &T::initCGSDK, jsInvoker_, instance_, std::move(obj));
|
|
143
143
|
}
|
|
144
|
-
void loadCampaignById(jsi::Runtime &rt, jsi::String
|
|
144
|
+
void loadCampaignById(jsi::Runtime &rt, jsi::String campid, std::optional<jsi::Object> obj) override {
|
|
145
145
|
static_assert(
|
|
146
146
|
bridging::getParameterCount(&T::loadCampaignById) == 3,
|
|
147
147
|
"Expected loadCampaignById(...) to have 3 parameters");
|
|
148
148
|
|
|
149
149
|
return bridging::callFromJs<void>(
|
|
150
|
-
rt, &T::loadCampaignById, jsInvoker_, instance_, std::move(
|
|
150
|
+
rt, &T::loadCampaignById, jsInvoker_, instance_, std::move(campid), std::move(obj));
|
|
151
151
|
}
|
|
152
152
|
void loadCampaignWithUrl(jsi::Runtime &rt, jsi::String url, jsi::Object obj) override {
|
|
153
153
|
static_assert(
|
|
@@ -189,13 +189,13 @@ private:
|
|
|
189
189
|
return bridging::callFromJs<void>(
|
|
190
190
|
rt, &T::enableEntryPoints, jsInvoker_, instance_, std::move(b));
|
|
191
191
|
}
|
|
192
|
-
void isFcmApn(jsi::Runtime &rt,
|
|
192
|
+
void isFcmApn(jsi::Runtime &rt, jsi::String value) override {
|
|
193
193
|
static_assert(
|
|
194
194
|
bridging::getParameterCount(&T::isFcmApn) == 2,
|
|
195
195
|
"Expected isFcmApn(...) to have 2 parameters");
|
|
196
196
|
|
|
197
197
|
return bridging::callFromJs<void>(
|
|
198
|
-
rt, &T::isFcmApn, jsInvoker_, instance_, std::move(
|
|
198
|
+
rt, &T::isFcmApn, jsInvoker_, instance_, std::move(value));
|
|
199
199
|
}
|
|
200
200
|
void UpdateProfile(jsi::Runtime &rt, jsi::Object obj) override {
|
|
201
201
|
static_assert(
|
package/lib/commonjs/index.js
CHANGED
|
@@ -52,8 +52,8 @@ function openWallet(obj = {}) {
|
|
|
52
52
|
function initCGSDK(obj) {
|
|
53
53
|
return _NativeReactNativeCustomerglu.default.initCGSDK(obj);
|
|
54
54
|
}
|
|
55
|
-
function loadCampaignById(
|
|
56
|
-
return _NativeReactNativeCustomerglu.default.loadCampaignById(
|
|
55
|
+
function loadCampaignById(campid, obj = {}) {
|
|
56
|
+
return _NativeReactNativeCustomerglu.default.loadCampaignById(campid, obj);
|
|
57
57
|
}
|
|
58
58
|
function loadCampaignWithUrl(url, obj) {
|
|
59
59
|
return _NativeReactNativeCustomerglu.default.loadCampaignWithUrl(url, obj);
|
|
@@ -67,8 +67,8 @@ function allowAnonymousRegistration(b) {
|
|
|
67
67
|
function gluSDKDebuggingMode(b) {
|
|
68
68
|
return _NativeReactNativeCustomerglu.default.gluSDKDebuggingMode(b);
|
|
69
69
|
}
|
|
70
|
-
function isFcmApn(
|
|
71
|
-
return _NativeReactNativeCustomerglu.default.isFcmApn(
|
|
70
|
+
function isFcmApn(value) {
|
|
71
|
+
return _NativeReactNativeCustomerglu.default.isFcmApn(value);
|
|
72
72
|
}
|
|
73
73
|
function UpdateProfile(obj) {
|
|
74
74
|
return _NativeReactNativeCustomerglu.default.UpdateProfile(obj);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_NativeReactNativeCustomerglu","_interopRequireDefault","require","_reactNative","e","__esModule","default","BannerWidget","exports","requireNativeComponent","EmbedBannerWidget","RegisterDevice","userdata","ReactNativeCustomerglu","registerDevice","UpdateUserAttributes","dataClear","sendData","obj","openWallet","initCGSDK","loadCampaignById","
|
|
1
|
+
{"version":3,"names":["_NativeReactNativeCustomerglu","_interopRequireDefault","require","_reactNative","e","__esModule","default","BannerWidget","exports","requireNativeComponent","EmbedBannerWidget","RegisterDevice","userdata","ReactNativeCustomerglu","registerDevice","UpdateUserAttributes","dataClear","sendData","obj","openWallet","initCGSDK","loadCampaignById","campid","loadCampaignWithUrl","url","enableAnalytic","b","allowAnonymousRegistration","gluSDKDebuggingMode","isFcmApn","value","UpdateProfile","DisplayCustomerGluNotification","DisplayCGNotification","autoclosewebview","DisplayCGBackgroundNotification","SetCurrentClassName","clname","setApnFcmToken","a","getBannerHeight","addMarginsForPIP","horizontal","vertical","type","addDelayForPIP","delay","setOpenWalletAsFallback","isCampaignValid","campaignId","dataFlag","getCampaignStatus"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"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","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -22,8 +22,8 @@ export function openWallet(obj = {}) {
|
|
|
22
22
|
export function initCGSDK(obj) {
|
|
23
23
|
return ReactNativeCustomerglu.initCGSDK(obj);
|
|
24
24
|
}
|
|
25
|
-
export function loadCampaignById(
|
|
26
|
-
return ReactNativeCustomerglu.loadCampaignById(
|
|
25
|
+
export function loadCampaignById(campid, obj = {}) {
|
|
26
|
+
return ReactNativeCustomerglu.loadCampaignById(campid, obj);
|
|
27
27
|
}
|
|
28
28
|
export function loadCampaignWithUrl(url, obj) {
|
|
29
29
|
return ReactNativeCustomerglu.loadCampaignWithUrl(url, obj);
|
|
@@ -37,8 +37,8 @@ export function allowAnonymousRegistration(b) {
|
|
|
37
37
|
export function gluSDKDebuggingMode(b) {
|
|
38
38
|
return ReactNativeCustomerglu.gluSDKDebuggingMode(b);
|
|
39
39
|
}
|
|
40
|
-
export function isFcmApn(
|
|
41
|
-
return ReactNativeCustomerglu.isFcmApn(
|
|
40
|
+
export function isFcmApn(value) {
|
|
41
|
+
return ReactNativeCustomerglu.isFcmApn(value);
|
|
42
42
|
}
|
|
43
43
|
export function UpdateProfile(obj) {
|
|
44
44
|
return ReactNativeCustomerglu.UpdateProfile(obj);
|