Skip to content

Commit 166499e

Browse files
kesha-antonovchirag04
authored andcommitted
RN 0.50+ compat: main queue (chirag04#175)
* main queue * requiresMainQueueSetup: set to NO
1 parent dba6b21 commit 166499e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

InAppUtils/InAppUtils.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ - (instancetype)init
1919
return self;
2020
}
2121

22+
+ (BOOL)requiresMainQueueSetup {
23+
return NO;
24+
}
25+
2226
- (dispatch_queue_t)methodQueue
2327
{
2428
return dispatch_get_main_queue();
@@ -124,7 +128,7 @@ - (void)paymentQueue:(SKPaymentQueue *)queue
124128
callback(@[@"restore_failed"]);
125129
break;
126130
}
127-
131+
128132
[_callbacks removeObjectForKey:key];
129133
} else {
130134
RCTLogWarn(@"No callback registered for restore product request.");
@@ -252,7 +256,7 @@ - (NSDictionary *)getPurchaseData:(SKPaymentTransaction *)transaction {
252256
purchase[@"originalTransactionDate"] = @(originalTransaction.transactionDate.timeIntervalSince1970 * 1000);
253257
purchase[@"originalTransactionIdentifier"] = originalTransaction.transactionIdentifier;
254258
}
255-
259+
256260
return purchase;
257261
}
258262

0 commit comments

Comments
 (0)