react-native-flyy 1.4.30 → 1.4.32
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/.project +1 -1
- package/android/.settings/org.eclipse.buildship.core.prefs +2 -5
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/reactnativeflyy/FlyyModule.kt +49 -155
- package/android/src/main/java/com/reactnativeflyy/FlyyRouteActivity.java +0 -16
- package/ios/ReactNativeFlyy.m +122 -276
- package/lib/commonjs/index.js +3 -592
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/index.js +3 -580
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/index.d.ts +0 -12
- package/package.json +1 -1
- package/react-native-flyy.podspec +1 -1
- package/src/index.tsx +1 -544
- package/ios/Montserrat-Bold.ttf +0 -0
- package/lib/commonjs/assets/images/check.png +0 -0
- package/lib/commonjs/assets/images/medal.png +0 -0
- package/lib/commonjs/assets/images/radio.png +0 -0
- package/lib/commonjs/assets/images/reward_flyy.png +0 -0
- package/lib/commonjs/assets/images/xmark.png +0 -0
- package/lib/commonjs/flyy_checkin_view.js +0 -379
- package/lib/commonjs/flyy_checkin_view.js.map +0 -1
- package/lib/module/assets/images/check.png +0 -0
- package/lib/module/assets/images/medal.png +0 -0
- package/lib/module/assets/images/radio.png +0 -0
- package/lib/module/assets/images/reward_flyy.png +0 -0
- package/lib/module/assets/images/xmark.png +0 -0
- package/lib/module/flyy_checkin_view.js +0 -365
- package/lib/module/flyy_checkin_view.js.map +0 -1
- package/lib/typescript/flyy_checkin_view.d.ts +0 -19
- package/src/assets/images/check.png +0 -0
- package/src/assets/images/medal.png +0 -0
- package/src/assets/images/radio.png +0 -0
- package/src/assets/images/reward_flyy.png +0 -0
- package/src/assets/images/xmark.png +0 -0
- package/src/flyy_checkin_view.tsx +0 -214
package/ios/ReactNativeFlyy.m
CHANGED
|
@@ -15,9 +15,6 @@ RCT_EXPORT_MODULE(Flyy)
|
|
|
15
15
|
static NSString * STAGE = @"STAGE";
|
|
16
16
|
static NSString * PRODUCTION = @"PRODUCTION";
|
|
17
17
|
NSString * themeColor = @"";
|
|
18
|
-
NSString * extPartnerId = @"";
|
|
19
|
-
NSString * extUserId = @"";
|
|
20
|
-
int extEnvironment = 0;
|
|
21
18
|
RCTResponseSenderBlock sdkClosedCallback;
|
|
22
19
|
|
|
23
20
|
-(void)set_navigation_controller:(UINavigationController*)navigation withCurrentViewController:(UIViewController*) controller
|
|
@@ -30,25 +27,25 @@ RCT_EXPORT_METHOD(setPackageName: (NSString *)packageName)
|
|
|
30
27
|
{
|
|
31
28
|
//Instance of flyy class
|
|
32
29
|
flyy = [Flyy sharedFlyyInstance];
|
|
33
|
-
|
|
30
|
+
|
|
34
31
|
[flyy setPackageWithPackageName:packageName];
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
//set stage Domain name
|
|
34
|
+
//set stage Domain name
|
|
38
35
|
RCT_EXPORT_METHOD(setBaseStageDomainName: (NSString *)domainName)
|
|
39
36
|
{
|
|
40
37
|
//Instance of flyy class
|
|
41
38
|
flyy = [Flyy sharedFlyyInstance];
|
|
42
|
-
|
|
39
|
+
|
|
43
40
|
[flyy setBaseStageFlyyDomainWithDomain:domainName];
|
|
44
41
|
}
|
|
45
42
|
|
|
46
|
-
//set production Domain name
|
|
43
|
+
//set production Domain name
|
|
47
44
|
RCT_EXPORT_METHOD(setBaseDomainName: (NSString *)domainName)
|
|
48
45
|
{
|
|
49
46
|
//Instance of flyy class
|
|
50
47
|
flyy = [Flyy sharedFlyyInstance];
|
|
51
|
-
|
|
48
|
+
|
|
52
49
|
[flyy setBaseFlyyDomainWithDomain:domainName];
|
|
53
50
|
}
|
|
54
51
|
|
|
@@ -56,79 +53,17 @@ RCT_EXPORT_METHOD(setBaseDomainName: (NSString *)domainName)
|
|
|
56
53
|
RCT_EXPORT_METHOD(initSDK: (NSString *)partnerToken :(int)environment)
|
|
57
54
|
{
|
|
58
55
|
//Instance of flyy class
|
|
59
|
-
extPartnerId = partnerToken;
|
|
60
|
-
extEnvironment = environment;
|
|
61
56
|
flyy = [Flyy sharedFlyyInstance];
|
|
62
|
-
|
|
57
|
+
|
|
63
58
|
[flyy initSDKWithPartnerToken:partnerToken environment: environment];
|
|
64
|
-
|
|
65
|
-
saveToUserDefaults();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
void saveToUserDefaults()
|
|
69
|
-
{
|
|
70
|
-
NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
|
|
71
|
-
|
|
72
|
-
if (standardUserDefaults)
|
|
73
|
-
{
|
|
74
|
-
NSInteger invalue = 1;
|
|
75
|
-
|
|
76
|
-
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
|
|
77
|
-
BOOL newUserExist = [prefs valueForKey:@"timestamps"];
|
|
78
|
-
|
|
79
|
-
if (newUserExist == YES) {
|
|
80
|
-
|
|
81
|
-
invalue = [prefs integerForKey:@"timestamps"];
|
|
82
|
-
invalue = invalue + 1;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
[standardUserDefaults setInteger:invalue forKey:@"timestamps"];
|
|
86
|
-
[standardUserDefaults synchronize];
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
//get user data
|
|
94
|
-
RCT_EXPORT_METHOD(getAppOccurence:(NSInteger *)type
|
|
95
|
-
resolver:(RCTPromiseResolveBlock)resolve
|
|
96
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
97
|
-
{
|
|
98
|
-
NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
|
|
99
|
-
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
|
|
100
|
-
|
|
101
|
-
if(type == 1){
|
|
102
|
-
[standardUserDefaults setInteger:1 forKey:@"timestamps"];
|
|
103
|
-
[standardUserDefaults synchronize];
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// getting an NSString
|
|
107
|
-
NSInteger myInt = [prefs integerForKey:@"timestamps"];
|
|
108
|
-
NSNumber *val = [NSNumber numberWithInteger:myInt];
|
|
109
|
-
resolve(val);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
//Init flyy with callback
|
|
113
|
-
RCT_EXPORT_METHOD(initSDKWithCallback: (NSString *)partnerToken :(int)environment: (RCTResponseSenderBlock)callback)
|
|
114
|
-
{
|
|
115
|
-
//Instance of flyy class
|
|
116
|
-
extPartnerId = partnerToken;
|
|
117
|
-
extEnvironment = environment;
|
|
118
|
-
flyy = [Flyy sharedFlyyInstance];
|
|
119
|
-
|
|
120
|
-
[flyy initSDKWithPartnerToken:partnerToken environment: environment];
|
|
121
|
-
callback(@"true");
|
|
122
59
|
}
|
|
123
60
|
|
|
124
61
|
//Init flyy sdk with referral callback
|
|
125
62
|
RCT_EXPORT_METHOD(initSDKWithReferralCallback: (NSString *)partnerToken :(int)environment :(RCTResponseSenderBlock)callback)
|
|
126
63
|
{
|
|
127
64
|
//Instance of flyy class
|
|
128
|
-
extPartnerId = partnerToken;
|
|
129
|
-
extEnvironment = environment;
|
|
130
65
|
flyy = [Flyy sharedFlyyInstance];
|
|
131
|
-
|
|
66
|
+
|
|
132
67
|
[flyy initSDKWithPartnerToken:partnerToken environment: environment onComplete: ^(BOOL success, NSString * referralData) {
|
|
133
68
|
if(success) {
|
|
134
69
|
callback(@[referralData]);
|
|
@@ -136,17 +71,6 @@ RCT_EXPORT_METHOD(initSDKWithReferralCallback: (NSString *)partnerToken :(int)en
|
|
|
136
71
|
}];
|
|
137
72
|
}
|
|
138
73
|
|
|
139
|
-
//set custom font
|
|
140
|
-
//RCT_EXPORT_METHOD(setCustomFontName: (NSString *)regularFont :(NSString *)mediumFont :(NSString *)boldFont)
|
|
141
|
-
//{
|
|
142
|
-
// flyy = [Flyy sharedFlyyInstance];
|
|
143
|
-
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
144
|
-
// dispatch_async(dispatch_get_main_queue(), ^(){
|
|
145
|
-
// [self->flyy setCustomFontNameWithRegularFont:regularFont mediumFont:mediumFont boldFont:boldFont];
|
|
146
|
-
// });
|
|
147
|
-
// });
|
|
148
|
-
//}
|
|
149
|
-
|
|
150
74
|
////Init flyy sdk with theme colors
|
|
151
75
|
//RCT_EXPORT_METHOD(initSDKWithThemeColors: (NSString *)partnerToken :(int)environment
|
|
152
76
|
// :(NSString *)colorPrimary :(NSString *)colorPrimaryDark)
|
|
@@ -161,9 +85,8 @@ RCT_EXPORT_METHOD(initSDKWithReferralCallback: (NSString *)partnerToken :(int)en
|
|
|
161
85
|
RCT_EXPORT_METHOD(setUser: (NSString *)userId)
|
|
162
86
|
{
|
|
163
87
|
//Instance of flyy class
|
|
164
|
-
extUserId = userId;
|
|
165
88
|
flyy = [Flyy sharedFlyyInstance];
|
|
166
|
-
|
|
89
|
+
|
|
167
90
|
[flyy setUserWithExternalUserId:userId];
|
|
168
91
|
}
|
|
169
92
|
|
|
@@ -172,8 +95,7 @@ RCT_EXPORT_METHOD(setUserWithSegment: (NSString *)userId :(NSString *)segmentId
|
|
|
172
95
|
{
|
|
173
96
|
//Instance of flyy class
|
|
174
97
|
flyy = [Flyy sharedFlyyInstance];
|
|
175
|
-
|
|
176
|
-
|
|
98
|
+
|
|
177
99
|
[flyy setUserWithExternalUserId:userId segmentId:segmentId onComplete: ^(BOOL success) {
|
|
178
100
|
if(success) {
|
|
179
101
|
}
|
|
@@ -181,18 +103,14 @@ RCT_EXPORT_METHOD(setUserWithSegment: (NSString *)userId :(NSString *)segmentId
|
|
|
181
103
|
}
|
|
182
104
|
|
|
183
105
|
//set user with callback
|
|
184
|
-
RCT_EXPORT_METHOD(setUserWithCallBack: (NSString *)userId
|
|
185
|
-
resolver:(RCTPromiseResolveBlock)resolve
|
|
186
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
106
|
+
RCT_EXPORT_METHOD(setUserWithCallBack: (NSString *)userId :(RCTResponseSenderBlock)callback)
|
|
187
107
|
{
|
|
188
108
|
//Instance of flyy class
|
|
189
|
-
extUserId = userId;
|
|
190
109
|
flyy = [Flyy sharedFlyyInstance];
|
|
191
|
-
|
|
192
|
-
|
|
110
|
+
|
|
193
111
|
[flyy setUserWithExternalUserId:userId onComplete: ^(BOOL success) {
|
|
194
112
|
if(success) {
|
|
195
|
-
|
|
113
|
+
callback(@[@("success")]);
|
|
196
114
|
}
|
|
197
115
|
}];
|
|
198
116
|
}
|
|
@@ -202,8 +120,7 @@ RCT_EXPORT_METHOD(setUserWithSegmentCallback: (NSString *)userId :(NSString *)se
|
|
|
202
120
|
{
|
|
203
121
|
//Instance of flyy class
|
|
204
122
|
flyy = [Flyy sharedFlyyInstance];
|
|
205
|
-
|
|
206
|
-
|
|
123
|
+
|
|
207
124
|
[flyy setUserWithExternalUserId:userId segmentId:segmentId onComplete: ^(BOOL success) {
|
|
208
125
|
if(success) {
|
|
209
126
|
callback(@[@("success")]);
|
|
@@ -216,7 +133,7 @@ RCT_EXPORT_METHOD(setNewUser: (NSString *)userId)
|
|
|
216
133
|
{
|
|
217
134
|
//Instance of flyy class
|
|
218
135
|
flyy = [Flyy sharedFlyyInstance];
|
|
219
|
-
|
|
136
|
+
|
|
220
137
|
[flyy setNewUserWithExternalUserId:userId];
|
|
221
138
|
}
|
|
222
139
|
|
|
@@ -225,7 +142,7 @@ RCT_EXPORT_METHOD(setNewUserWithSegment: (NSString *)userId :(NSString *)segment
|
|
|
225
142
|
{
|
|
226
143
|
//Instance of flyy class
|
|
227
144
|
flyy = [Flyy sharedFlyyInstance];
|
|
228
|
-
|
|
145
|
+
|
|
229
146
|
[flyy setNewUserWithExternalUserId:userId segmentId:segmentId onComplete: ^(BOOL success) {
|
|
230
147
|
if(success) {
|
|
231
148
|
}
|
|
@@ -237,7 +154,7 @@ RCT_EXPORT_METHOD(setNewUserWithSegmentCallback: (NSString *)userId :(NSString *
|
|
|
237
154
|
{
|
|
238
155
|
//Instance of flyy class
|
|
239
156
|
flyy = [Flyy sharedFlyyInstance];
|
|
240
|
-
|
|
157
|
+
|
|
241
158
|
[flyy setNewUserWithExternalUserId:userId segmentId:segmentId onComplete: ^(BOOL success) {
|
|
242
159
|
if(success) {
|
|
243
160
|
callback(@[@("success")]);
|
|
@@ -246,17 +163,14 @@ RCT_EXPORT_METHOD(setNewUserWithSegmentCallback: (NSString *)userId :(NSString *
|
|
|
246
163
|
}
|
|
247
164
|
|
|
248
165
|
//set new user with callback
|
|
249
|
-
RCT_EXPORT_METHOD(setNewUserWithCallBack: (NSString *)userId
|
|
250
|
-
resolver:(RCTPromiseResolveBlock)resolve
|
|
251
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
166
|
+
RCT_EXPORT_METHOD(setNewUserWithCallBack: (NSString *)userId :(RCTResponseSenderBlock)callback)
|
|
252
167
|
{
|
|
253
168
|
//Instance of flyy class
|
|
254
|
-
extUserId = userId;
|
|
255
169
|
flyy = [Flyy sharedFlyyInstance];
|
|
256
|
-
|
|
170
|
+
|
|
257
171
|
[flyy setNewUserWithExternalUserId:userId onComplete: ^(BOOL success) {
|
|
258
172
|
if(success) {
|
|
259
|
-
|
|
173
|
+
callback(@[@("success")]);
|
|
260
174
|
}
|
|
261
175
|
}];
|
|
262
176
|
}
|
|
@@ -266,7 +180,7 @@ RCT_EXPORT_METHOD(setNewUserWithSegment: (NSString *)userId :(NSString *)segment
|
|
|
266
180
|
{
|
|
267
181
|
//Instance of flyy class
|
|
268
182
|
flyy = [Flyy sharedFlyyInstance];
|
|
269
|
-
|
|
183
|
+
|
|
270
184
|
[flyy setNewUserWithExternalUserId:userId segmentId:segmentId onComplete: ^(BOOL success) {
|
|
271
185
|
if(success) {
|
|
272
186
|
callback(@[@("success")]);
|
|
@@ -279,7 +193,7 @@ RCT_EXPORT_METHOD(setUserName: (NSString *)userName)
|
|
|
279
193
|
{
|
|
280
194
|
//Instance of flyy class
|
|
281
195
|
flyy = [Flyy sharedFlyyInstance];
|
|
282
|
-
|
|
196
|
+
|
|
283
197
|
[flyy setUserNameWithUserName:userName];
|
|
284
198
|
}
|
|
285
199
|
|
|
@@ -288,7 +202,7 @@ RCT_EXPORT_METHOD(setUserNameWithCallBack: (NSString *)userName :(RCTResponseSen
|
|
|
288
202
|
{
|
|
289
203
|
//Instance of flyy class
|
|
290
204
|
flyy = [Flyy sharedFlyyInstance];
|
|
291
|
-
|
|
205
|
+
|
|
292
206
|
[flyy setUserNameWithUserName:userName onComplete: ^(BOOL success) {
|
|
293
207
|
if(success) {
|
|
294
208
|
callback(@[@("success")]);
|
|
@@ -301,7 +215,7 @@ RCT_EXPORT_METHOD(sendEvent: (NSString *)key withString:(NSString *)value)
|
|
|
301
215
|
{
|
|
302
216
|
//Instance of flyy class
|
|
303
217
|
flyy = [Flyy sharedFlyyInstance];
|
|
304
|
-
|
|
218
|
+
|
|
305
219
|
[flyy sendEventWithKey:key value:value];
|
|
306
220
|
}
|
|
307
221
|
|
|
@@ -310,7 +224,7 @@ RCT_EXPORT_METHOD(sendEventWithCallBack: (NSString *)key withString:(NSString *)
|
|
|
310
224
|
{
|
|
311
225
|
//Instance of flyy class
|
|
312
226
|
flyy = [Flyy sharedFlyyInstance];
|
|
313
|
-
|
|
227
|
+
|
|
314
228
|
[flyy sendEventWithKey:key value:value onComplete: ^(BOOL success) {
|
|
315
229
|
if(success) {
|
|
316
230
|
callback(@[@("success")]);
|
|
@@ -351,7 +265,7 @@ RCT_EXPORT_METHOD(addUserToSegment: (NSString *)segmentTitle withString:(NSStrin
|
|
|
351
265
|
{
|
|
352
266
|
//Instance of flyy class
|
|
353
267
|
flyy = [Flyy sharedFlyyInstance];
|
|
354
|
-
|
|
268
|
+
|
|
355
269
|
[flyy addUserToSegmentWithSegmentTitle:segmentTitle segmentKey:segmentKey onComplete: ^(BOOL success) {
|
|
356
270
|
if(success) {
|
|
357
271
|
// callback(@[@("success")]);
|
|
@@ -393,7 +307,7 @@ RCT_EXPORT_METHOD(getReferralCode: (RCTResponseSenderBlock)callback) {
|
|
|
393
307
|
RCT_EXPORT_METHOD(setSegmentId: (NSString *)segmentId) {
|
|
394
308
|
//Instance of flyy class
|
|
395
309
|
flyy = [Flyy sharedFlyyInstance];
|
|
396
|
-
|
|
310
|
+
|
|
397
311
|
[flyy setSegmentIdWithSegementId:segmentId];
|
|
398
312
|
}
|
|
399
313
|
|
|
@@ -402,7 +316,7 @@ RCT_EXPORT_METHOD(verifyReferralCode: (NSString *)referralCode :(RCTResponseSend
|
|
|
402
316
|
{
|
|
403
317
|
//Instance of flyy class
|
|
404
318
|
flyy = [Flyy sharedFlyyInstance];
|
|
405
|
-
|
|
319
|
+
|
|
406
320
|
[flyy verifyReferralCodeWithReferralCode:referralCode onComplete:^(bool isValid, NSString* referralUrl) {
|
|
407
321
|
if (isValid) {
|
|
408
322
|
callback(@[@"true", referralUrl]);
|
|
@@ -417,7 +331,7 @@ RCT_EXPORT_METHOD(getShareData: (RCTResponseSenderBlock)callback)
|
|
|
417
331
|
{
|
|
418
332
|
//Instance of flyy class
|
|
419
333
|
flyy = [Flyy sharedFlyyInstance];
|
|
420
|
-
|
|
334
|
+
|
|
421
335
|
[flyy getShareDataOnComplete: ^(BOOL success, NSArray<NSString *> *referralDetails) {
|
|
422
336
|
if (success) {
|
|
423
337
|
NSDictionary* jsonObject = @{ @"success": @true,
|
|
@@ -434,8 +348,8 @@ RCT_EXPORT_METHOD(getShareData: (RCTResponseSenderBlock)callback)
|
|
|
434
348
|
};
|
|
435
349
|
callback(@[jsonObject]);
|
|
436
350
|
}
|
|
437
|
-
|
|
438
|
-
|
|
351
|
+
|
|
352
|
+
|
|
439
353
|
}];
|
|
440
354
|
}
|
|
441
355
|
|
|
@@ -444,7 +358,7 @@ RCT_EXPORT_METHOD(getShareDataWithOfferId: (int)offerId :(RCTResponseSenderBlock
|
|
|
444
358
|
{
|
|
445
359
|
//Instance of flyy class
|
|
446
360
|
flyy = [Flyy sharedFlyyInstance];
|
|
447
|
-
|
|
361
|
+
|
|
448
362
|
[flyy getShareDataWithOfferId:offerId onComplete:^(BOOL success, NSArray<NSString *> *referralDetails) {
|
|
449
363
|
if (success) {
|
|
450
364
|
NSDictionary* jsonObject = @{ @"success": @true,
|
|
@@ -461,8 +375,8 @@ RCT_EXPORT_METHOD(getShareDataWithOfferId: (int)offerId :(RCTResponseSenderBlock
|
|
|
461
375
|
};
|
|
462
376
|
callback(@[jsonObject]);
|
|
463
377
|
}
|
|
464
|
-
|
|
465
|
-
|
|
378
|
+
|
|
379
|
+
|
|
466
380
|
}];
|
|
467
381
|
}
|
|
468
382
|
|
|
@@ -471,22 +385,22 @@ RCT_EXPORT_METHOD(getReferralCount:(RCTResponseSenderBlock)callback)
|
|
|
471
385
|
{
|
|
472
386
|
//Instance of flyy class
|
|
473
387
|
flyy = [Flyy sharedFlyyInstance];
|
|
474
|
-
|
|
388
|
+
|
|
475
389
|
[flyy getReferralCountOnComplete:^(BOOL success, NSInteger referralCount) {
|
|
476
390
|
callback(@[@(referralCount)]);
|
|
477
391
|
}];
|
|
478
|
-
|
|
392
|
+
|
|
479
393
|
}
|
|
480
394
|
|
|
481
395
|
//set theme color
|
|
482
396
|
RCT_EXPORT_METHOD(setThemeColor: (NSString *)colorPrimary :(NSString *)colorPrimaryDark)
|
|
483
397
|
{
|
|
484
398
|
themeColor = colorPrimary;
|
|
485
|
-
|
|
399
|
+
|
|
486
400
|
//Instance of flyy class
|
|
487
401
|
flyy = [Flyy sharedFlyyInstance];
|
|
488
402
|
[flyy setThemeColorWithColorPrimary:colorPrimary colorPrimaryDark:colorPrimaryDark];
|
|
489
|
-
|
|
403
|
+
|
|
490
404
|
}
|
|
491
405
|
|
|
492
406
|
//set user token
|
|
@@ -592,9 +506,9 @@ RCT_EXPORT_METHOD(getScratchCardCount: (RCTResponseSenderBlock)callback)
|
|
|
592
506
|
};
|
|
593
507
|
callback(@[jsonObject]);
|
|
594
508
|
}
|
|
595
|
-
|
|
509
|
+
|
|
596
510
|
}];
|
|
597
|
-
|
|
511
|
+
|
|
598
512
|
}
|
|
599
513
|
|
|
600
514
|
//get wallet balance
|
|
@@ -619,7 +533,7 @@ RCT_EXPORT_METHOD(getWalletBalance: (NSString *)walletLabel :(RCTResponseSenderB
|
|
|
619
533
|
callback(@[jsonObject]);
|
|
620
534
|
}
|
|
621
535
|
}];
|
|
622
|
-
|
|
536
|
+
|
|
623
537
|
}
|
|
624
538
|
|
|
625
539
|
//get referrer details
|
|
@@ -644,7 +558,7 @@ RCT_EXPORT_METHOD(getReferrerDetails: (RCTResponseSenderBlock)callback)
|
|
|
644
558
|
callback(@[jsonObject]);
|
|
645
559
|
}
|
|
646
560
|
}];
|
|
647
|
-
|
|
561
|
+
|
|
648
562
|
}
|
|
649
563
|
|
|
650
564
|
//TODO VISHAL
|
|
@@ -671,7 +585,7 @@ RCT_EXPORT_METHOD(getPreviousLeaderboardWinners: (NSString *)tag :(RCTResponseSe
|
|
|
671
585
|
};
|
|
672
586
|
callback(@[jsonObject]);
|
|
673
587
|
}
|
|
674
|
-
|
|
588
|
+
|
|
675
589
|
}];
|
|
676
590
|
}
|
|
677
591
|
|
|
@@ -698,7 +612,7 @@ RCT_EXPORT_METHOD(getLeaderboardParticipants: (NSString *)tag :(RCTResponseSende
|
|
|
698
612
|
};
|
|
699
613
|
callback(@[jsonObject]);
|
|
700
614
|
}
|
|
701
|
-
|
|
615
|
+
|
|
702
616
|
}];
|
|
703
617
|
}
|
|
704
618
|
|
|
@@ -724,16 +638,16 @@ RCT_EXPORT_METHOD(handleBackgroundNotification: (NSString *)remoteMessageString)
|
|
|
724
638
|
//Instance of flyy class
|
|
725
639
|
flyy = [Flyy sharedFlyyInstance];
|
|
726
640
|
NSLog(@"userinfo %@",remoteMessageString);
|
|
727
|
-
|
|
641
|
+
|
|
728
642
|
if (remoteMessageString != nil) {
|
|
729
|
-
|
|
643
|
+
|
|
730
644
|
NSError * err;
|
|
731
645
|
NSData *data = [remoteMessageString dataUsingEncoding:NSUTF8StringEncoding];
|
|
732
646
|
NSDictionary * userInfo;
|
|
733
647
|
if(data!=nil){
|
|
734
648
|
userInfo = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&err];
|
|
735
649
|
}
|
|
736
|
-
|
|
650
|
+
|
|
737
651
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
738
652
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
739
653
|
[self->flyy handleBackgroundNotificationWithUserInfo:userInfo];
|
|
@@ -747,7 +661,7 @@ RCT_EXPORT_METHOD(handleForegroundNotification: (NSString *)remoteMessageString)
|
|
|
747
661
|
//Instance of flyy class
|
|
748
662
|
flyy = [Flyy sharedFlyyInstance];
|
|
749
663
|
NSLog(@"userinfo %@",remoteMessageString);
|
|
750
|
-
|
|
664
|
+
|
|
751
665
|
if (remoteMessageString != nil) {
|
|
752
666
|
NSError * err;
|
|
753
667
|
NSData *data = [remoteMessageString dataUsingEncoding:NSUTF8StringEncoding];
|
|
@@ -755,7 +669,7 @@ RCT_EXPORT_METHOD(handleForegroundNotification: (NSString *)remoteMessageString)
|
|
|
755
669
|
if(data!=nil){
|
|
756
670
|
userInfo = (NSDictionary *)[NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&err];
|
|
757
671
|
}
|
|
758
|
-
|
|
672
|
+
|
|
759
673
|
[self->flyy handleForegroundNotificationWithUserInfo:userInfo];
|
|
760
674
|
|
|
761
675
|
// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
@@ -782,7 +696,7 @@ RCT_EXPORT_METHOD(getOffersCount: (RCTResponseSenderBlock)callback)
|
|
|
782
696
|
{
|
|
783
697
|
//Instance of flyy class
|
|
784
698
|
flyy = [Flyy sharedFlyyInstance];
|
|
785
|
-
|
|
699
|
+
|
|
786
700
|
[flyy getOffersCountOnComplete: ^(BOOL success, NSArray<NSNumber *> *offersCount) {
|
|
787
701
|
if (success) {
|
|
788
702
|
NSDictionary* jsonObject = @{ @"success": @true,
|
|
@@ -798,18 +712,18 @@ RCT_EXPORT_METHOD(getOffersCount: (RCTResponseSenderBlock)callback)
|
|
|
798
712
|
callback(@[jsonObject]);
|
|
799
713
|
}
|
|
800
714
|
}];
|
|
801
|
-
|
|
715
|
+
|
|
802
716
|
}
|
|
803
717
|
|
|
804
718
|
//open offers screen
|
|
805
719
|
RCT_EXPORT_METHOD(openOffersScreen)
|
|
806
720
|
{
|
|
807
721
|
flyy = [Flyy sharedFlyyInstance];
|
|
808
|
-
|
|
722
|
+
|
|
809
723
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
810
|
-
|
|
724
|
+
|
|
811
725
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
812
|
-
|
|
726
|
+
|
|
813
727
|
[self->flyy openOffersPage];
|
|
814
728
|
});
|
|
815
729
|
});
|
|
@@ -821,30 +735,30 @@ RCT_EXPORT_METHOD(openOffersScreenWithCallBack: (RCTResponseSenderBlock)callback
|
|
|
821
735
|
flyy = [Flyy sharedFlyyInstance];
|
|
822
736
|
sdkClosedCallback = callback;
|
|
823
737
|
[flyy setSDKClosedListenerWithFlyysdkclosedlistener:self];
|
|
824
|
-
|
|
738
|
+
|
|
825
739
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
826
|
-
|
|
740
|
+
|
|
827
741
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
828
|
-
|
|
742
|
+
|
|
829
743
|
[self->flyy openOffersPage];
|
|
830
744
|
});
|
|
831
745
|
});
|
|
832
|
-
|
|
746
|
+
|
|
833
747
|
}
|
|
834
748
|
|
|
835
749
|
//open offers screen with segemnt id
|
|
836
750
|
RCT_EXPORT_METHOD(openOffersScreenWithSegment: (NSString *)segmentId)
|
|
837
751
|
{
|
|
838
752
|
flyy = [Flyy sharedFlyyInstance];
|
|
839
|
-
|
|
753
|
+
|
|
840
754
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
841
|
-
|
|
755
|
+
|
|
842
756
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
843
|
-
|
|
757
|
+
|
|
844
758
|
[self->flyy openOffersPageWithSegmentId:segmentId];
|
|
845
759
|
});
|
|
846
760
|
});
|
|
847
|
-
|
|
761
|
+
|
|
848
762
|
}
|
|
849
763
|
|
|
850
764
|
//open offers screen with segment and callback
|
|
@@ -853,30 +767,30 @@ RCT_EXPORT_METHOD(openOffersScreenWithSegmentCallBack: (NSString *)segmentId :(R
|
|
|
853
767
|
flyy = [Flyy sharedFlyyInstance];
|
|
854
768
|
sdkClosedCallback = callback;
|
|
855
769
|
[flyy setSDKClosedListenerWithFlyysdkclosedlistener:self];
|
|
856
|
-
|
|
770
|
+
|
|
857
771
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
858
|
-
|
|
772
|
+
|
|
859
773
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
860
|
-
|
|
774
|
+
|
|
861
775
|
[self->flyy openOffersPageWithSegmentId:segmentId];
|
|
862
776
|
});
|
|
863
777
|
});
|
|
864
|
-
|
|
778
|
+
|
|
865
779
|
}
|
|
866
780
|
|
|
867
781
|
//open rewards screen
|
|
868
782
|
RCT_EXPORT_METHOD(openRewardsScreen)
|
|
869
783
|
{
|
|
870
784
|
flyy = [Flyy sharedFlyyInstance];
|
|
871
|
-
|
|
785
|
+
|
|
872
786
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
873
|
-
|
|
787
|
+
|
|
874
788
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
875
|
-
|
|
789
|
+
|
|
876
790
|
[self->flyy openRewardsPage];
|
|
877
791
|
});
|
|
878
792
|
});
|
|
879
|
-
|
|
793
|
+
|
|
880
794
|
}
|
|
881
795
|
|
|
882
796
|
//open rewards screen with callback
|
|
@@ -885,30 +799,30 @@ RCT_EXPORT_METHOD(openRewardsScreenWithCallBack: (RCTResponseSenderBlock)callbac
|
|
|
885
799
|
flyy = [Flyy sharedFlyyInstance];
|
|
886
800
|
sdkClosedCallback = callback;
|
|
887
801
|
[flyy setSDKClosedListenerWithFlyysdkclosedlistener:self];
|
|
888
|
-
|
|
802
|
+
|
|
889
803
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
890
|
-
|
|
804
|
+
|
|
891
805
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
892
|
-
|
|
806
|
+
|
|
893
807
|
[self->flyy openRewardsPage];
|
|
894
808
|
});
|
|
895
809
|
});
|
|
896
|
-
|
|
810
|
+
|
|
897
811
|
}
|
|
898
812
|
|
|
899
813
|
//open wallet screen
|
|
900
814
|
RCT_EXPORT_METHOD(openWalletScreen)
|
|
901
815
|
{
|
|
902
816
|
flyy = [Flyy sharedFlyyInstance];
|
|
903
|
-
|
|
817
|
+
|
|
904
818
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
905
|
-
|
|
819
|
+
|
|
906
820
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
907
|
-
|
|
821
|
+
|
|
908
822
|
[self->flyy openWalletPage];
|
|
909
823
|
});
|
|
910
824
|
});
|
|
911
|
-
|
|
825
|
+
|
|
912
826
|
}
|
|
913
827
|
|
|
914
828
|
//open wallet screen with callback
|
|
@@ -917,15 +831,15 @@ RCT_EXPORT_METHOD(openWalletScreenWithCallBack: (RCTResponseSenderBlock)callback
|
|
|
917
831
|
flyy = [Flyy sharedFlyyInstance];
|
|
918
832
|
sdkClosedCallback = callback;
|
|
919
833
|
[flyy setSDKClosedListenerWithFlyysdkclosedlistener:self];
|
|
920
|
-
|
|
834
|
+
|
|
921
835
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
922
|
-
|
|
836
|
+
|
|
923
837
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
924
|
-
|
|
838
|
+
|
|
925
839
|
[self->flyy openWalletPage];
|
|
926
840
|
});
|
|
927
841
|
});
|
|
928
|
-
|
|
842
|
+
|
|
929
843
|
}
|
|
930
844
|
|
|
931
845
|
//open gift cards screen
|
|
@@ -933,24 +847,24 @@ RCT_EXPORT_METHOD(openGiftCardScreen)
|
|
|
933
847
|
{
|
|
934
848
|
flyy = [Flyy sharedFlyyInstance];
|
|
935
849
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
936
|
-
|
|
850
|
+
|
|
937
851
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
938
|
-
|
|
852
|
+
|
|
939
853
|
[self->flyy openGiftCardPage];
|
|
940
854
|
});
|
|
941
855
|
});
|
|
942
|
-
|
|
856
|
+
|
|
943
857
|
}
|
|
944
858
|
|
|
945
859
|
//open referral history screen
|
|
946
860
|
RCT_EXPORT_METHOD(openReferralHistory)
|
|
947
861
|
{
|
|
948
862
|
flyy = [Flyy sharedFlyyInstance];
|
|
949
|
-
|
|
863
|
+
|
|
950
864
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
951
|
-
|
|
865
|
+
|
|
952
866
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
953
|
-
|
|
867
|
+
|
|
954
868
|
[self->flyy openReferralHistoryPage];
|
|
955
869
|
});
|
|
956
870
|
});
|
|
@@ -960,11 +874,11 @@ RCT_EXPORT_METHOD(openReferralHistory)
|
|
|
960
874
|
RCT_EXPORT_METHOD(openFlyyQuizPage: (NSInteger)quizId)
|
|
961
875
|
{
|
|
962
876
|
flyy = [Flyy sharedFlyyInstance];
|
|
963
|
-
|
|
877
|
+
|
|
964
878
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
965
|
-
|
|
879
|
+
|
|
966
880
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
967
|
-
|
|
881
|
+
|
|
968
882
|
[self->flyy openQuizListDetailPageWithQuizId:quizId];
|
|
969
883
|
});
|
|
970
884
|
});
|
|
@@ -974,26 +888,26 @@ RCT_EXPORT_METHOD(openFlyyQuizPage: (NSInteger)quizId)
|
|
|
974
888
|
RCT_EXPORT_METHOD(openFlyyQuizHistoryPage)
|
|
975
889
|
{
|
|
976
890
|
flyy = [Flyy sharedFlyyInstance];
|
|
977
|
-
|
|
891
|
+
|
|
978
892
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
979
|
-
|
|
893
|
+
|
|
980
894
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
981
|
-
|
|
895
|
+
|
|
982
896
|
[self->flyy openQuizHistoryPage];
|
|
983
897
|
});
|
|
984
898
|
});
|
|
985
|
-
|
|
899
|
+
|
|
986
900
|
}
|
|
987
901
|
|
|
988
902
|
//open quiz list screen
|
|
989
903
|
RCT_EXPORT_METHOD(openFlyyQuizListPage)
|
|
990
904
|
{
|
|
991
905
|
flyy = [Flyy sharedFlyyInstance];
|
|
992
|
-
|
|
906
|
+
|
|
993
907
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
994
|
-
|
|
908
|
+
|
|
995
909
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
996
|
-
|
|
910
|
+
|
|
997
911
|
[self->flyy openQuizListPage];
|
|
998
912
|
});
|
|
999
913
|
});
|
|
@@ -1002,18 +916,18 @@ RCT_EXPORT_METHOD(openFlyyQuizListPage)
|
|
|
1002
916
|
//open stamps screen
|
|
1003
917
|
RCT_EXPORT_METHOD(openFlyyStampsPage)
|
|
1004
918
|
{
|
|
1005
|
-
|
|
919
|
+
|
|
1006
920
|
}
|
|
1007
921
|
|
|
1008
922
|
//open invite details screen
|
|
1009
923
|
RCT_EXPORT_METHOD(openFlyyInviteDetailsPage: (NSInteger *)offerId)
|
|
1010
924
|
{
|
|
1011
925
|
flyy = [Flyy sharedFlyyInstance];
|
|
1012
|
-
|
|
926
|
+
|
|
1013
927
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1014
|
-
|
|
928
|
+
|
|
1015
929
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1016
|
-
|
|
930
|
+
|
|
1017
931
|
[self->flyy openInviteDetailsPageWithOfferId:*offerId];
|
|
1018
932
|
});
|
|
1019
933
|
});
|
|
@@ -1023,11 +937,11 @@ RCT_EXPORT_METHOD(openFlyyInviteDetailsPage: (NSInteger *)offerId)
|
|
|
1023
937
|
RCT_EXPORT_METHOD(openFlyyChallengeDetailPage: (NSInteger *)offerId)
|
|
1024
938
|
{
|
|
1025
939
|
flyy = [Flyy sharedFlyyInstance];
|
|
1026
|
-
|
|
940
|
+
|
|
1027
941
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1028
|
-
|
|
942
|
+
|
|
1029
943
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1030
|
-
|
|
944
|
+
|
|
1031
945
|
[self->flyy openFlyyChallengesPageWithOfferId:offerId];
|
|
1032
946
|
});
|
|
1033
947
|
});
|
|
@@ -1037,53 +951,25 @@ RCT_EXPORT_METHOD(openFlyyChallengeDetailPage: (NSInteger *)offerId)
|
|
|
1037
951
|
RCT_EXPORT_METHOD(openFlyyBonanzaPage)
|
|
1038
952
|
{
|
|
1039
953
|
flyy = [Flyy sharedFlyyInstance];
|
|
1040
|
-
|
|
954
|
+
|
|
1041
955
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1042
|
-
|
|
956
|
+
|
|
1043
957
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1044
|
-
|
|
958
|
+
|
|
1045
959
|
[self->flyy openBonanzaPage];
|
|
1046
960
|
});
|
|
1047
961
|
});
|
|
1048
962
|
}
|
|
1049
963
|
|
|
1050
|
-
//open games screen
|
|
1051
|
-
RCT_EXPORT_METHOD(openFlyyGamesPage)
|
|
1052
|
-
{
|
|
1053
|
-
flyy = [Flyy sharedFlyyInstance];
|
|
1054
|
-
|
|
1055
|
-
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1056
|
-
|
|
1057
|
-
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1058
|
-
|
|
1059
|
-
[self->flyy openGameListPage];
|
|
1060
|
-
});
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
//open games history screen
|
|
1065
|
-
RCT_EXPORT_METHOD(openFlyyGamesHistory)
|
|
1066
|
-
{
|
|
1067
|
-
flyy = [Flyy sharedFlyyInstance];
|
|
1068
|
-
|
|
1069
|
-
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1070
|
-
|
|
1071
|
-
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1072
|
-
|
|
1073
|
-
[self->flyy openGameHistoryPage];
|
|
1074
|
-
});
|
|
1075
|
-
});
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
964
|
//open custom invite and earn screen
|
|
1079
965
|
RCT_EXPORT_METHOD(openFlyyCustomInviteAndEarnPage: (NSInteger *)offerId :(NSString *)headerColor)
|
|
1080
966
|
{
|
|
1081
967
|
flyy = [Flyy sharedFlyyInstance];
|
|
1082
|
-
|
|
968
|
+
|
|
1083
969
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1084
|
-
|
|
970
|
+
|
|
1085
971
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1086
|
-
|
|
972
|
+
|
|
1087
973
|
[self->flyy openFlyyCustomInviteAndEarnVCWithOfferId:offerId headerColor:headerColor];
|
|
1088
974
|
});
|
|
1089
975
|
});
|
|
@@ -1093,11 +979,11 @@ RCT_EXPORT_METHOD(openFlyyCustomInviteAndEarnPage: (NSInteger *)offerId :(NSStri
|
|
|
1093
979
|
RCT_EXPORT_METHOD(openFlyyInviteAndEarnPage: (NSInteger *)offerId)
|
|
1094
980
|
{
|
|
1095
981
|
flyy = [Flyy sharedFlyyInstance];
|
|
1096
|
-
|
|
982
|
+
|
|
1097
983
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1098
|
-
|
|
984
|
+
|
|
1099
985
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1100
|
-
|
|
986
|
+
|
|
1101
987
|
[self->flyy openInviteAndEarnPageWithOfferId:offerId];
|
|
1102
988
|
});
|
|
1103
989
|
});
|
|
@@ -1107,9 +993,9 @@ RCT_EXPORT_METHOD(openFlyyInviteAndEarnPage: (NSInteger *)offerId)
|
|
|
1107
993
|
RCT_EXPORT_METHOD(openFlyySpinTheWheelPage: (NSInteger)wheelId)
|
|
1108
994
|
{
|
|
1109
995
|
flyy = [Flyy sharedFlyyInstance];
|
|
1110
|
-
|
|
996
|
+
|
|
1111
997
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1112
|
-
|
|
998
|
+
|
|
1113
999
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1114
1000
|
[self->flyy openSpinTheWheelPageWithSpinWheelId:wheelId];
|
|
1115
1001
|
});
|
|
@@ -1120,24 +1006,10 @@ RCT_EXPORT_METHOD(openFlyySpinTheWheelPage: (NSInteger)wheelId)
|
|
|
1120
1006
|
RCT_EXPORT_METHOD(openFlyyCheckinPage)
|
|
1121
1007
|
{
|
|
1122
1008
|
flyy = [Flyy sharedFlyyInstance];
|
|
1123
|
-
|
|
1124
|
-
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1125
|
-
|
|
1126
|
-
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1127
|
-
[self->flyy openDailyCheckinPage];
|
|
1128
|
-
});
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
//open Checkin screen
|
|
1133
|
-
RCT_EXPORT_METHOD(openCheckinScreen)
|
|
1134
|
-
{
|
|
1135
|
-
flyy = [Flyy sharedFlyyInstance];
|
|
1136
|
-
|
|
1009
|
+
|
|
1137
1010
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1138
|
-
|
|
1011
|
+
|
|
1139
1012
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1140
|
-
|
|
1141
1013
|
[self->flyy openDailyCheckinPage];
|
|
1142
1014
|
});
|
|
1143
1015
|
});
|
|
@@ -1147,46 +1019,20 @@ RCT_EXPORT_METHOD(openCheckinScreen)
|
|
|
1147
1019
|
RCT_EXPORT_METHOD(openFlyyRafflePage: (NSInteger *)raffleId)
|
|
1148
1020
|
{
|
|
1149
1021
|
flyy = [Flyy sharedFlyyInstance];
|
|
1150
|
-
|
|
1022
|
+
|
|
1151
1023
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
1152
|
-
|
|
1024
|
+
|
|
1153
1025
|
dispatch_async(dispatch_get_main_queue(), ^(){
|
|
1154
|
-
|
|
1155
|
-
|
|
1026
|
+
|
|
1027
|
+
|
|
1156
1028
|
});
|
|
1157
1029
|
});
|
|
1158
1030
|
}
|
|
1159
1031
|
|
|
1160
|
-
//get user data
|
|
1161
|
-
RCT_EXPORT_METHOD(getUserData:(RCTPromiseResolveBlock)resolve
|
|
1162
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
1163
|
-
{
|
|
1164
|
-
NSDictionary* jsonObject = @{ @"partner_id": extPartnerId,
|
|
1165
|
-
@"user_id": extUserId,
|
|
1166
|
-
@"environment": [NSNumber numberWithInt: extEnvironment]
|
|
1167
|
-
};
|
|
1168
|
-
|
|
1169
|
-
resolve(jsonObject);
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
// get App data
|
|
1173
|
-
RCT_EXPORT_METHOD(getAppData:(RCTPromiseResolveBlock)resolve
|
|
1174
|
-
rejecter:(RCTPromiseRejectBlock)reject)
|
|
1175
|
-
{
|
|
1176
|
-
//Instance of flyy class
|
|
1177
|
-
flyy = [Flyy sharedFlyyInstance];
|
|
1178
|
-
[flyy getFlyyAppDataOnComplete:^(NSString * _Nonnull data) {
|
|
1179
|
-
resolve(data);
|
|
1180
|
-
}];
|
|
1181
|
-
// resolve(@"Hello");
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
1032
|
//our internal protocol stub method
|
|
1187
1033
|
- (void)onSDKClosedWithScreenName:(NSString * _Nonnull)screenName {
|
|
1188
1034
|
NSLog(@"%@", screenName);
|
|
1189
|
-
|
|
1035
|
+
|
|
1190
1036
|
if(sdkClosedCallback != nil) {
|
|
1191
1037
|
sdkClosedCallback(@[@("success")]);
|
|
1192
1038
|
sdkClosedCallback = nil;
|