Skip to content

Commit

Permalink
update to weakself
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Yang committed Feb 20, 2019
1 parent bdf3755 commit 431cbc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/in_app_purchase/ios/Classes/InAppPurchasePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,16 @@ - (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar
[weakSelf handleTransactionsRemoved:transactions];
}
restoreTransactionFailed:^(NSError *_Nonnull error) {
[self handleTransactionRestoreFailed:error];
[weakSelf handleTransactionRestoreFailed:error];
}
restoreCompletedTransactionsFinished:^{
[self restoreCompletedTransactionsFinished];
[weakSelf restoreCompletedTransactionsFinished];
}
shouldAddStorePayment:^BOOL(SKPayment *payment, SKProduct *product) {
return [self shouldAddStorePayment:payment product:product];
return [weakSelf shouldAddStorePayment:payment product:product];
}
updatedDownloads:^void(NSArray<SKDownload *> *_Nonnull downloads) {
[self updatedDownloads:downloads];
[weakSelf updatedDownloads:downloads];
}];
self.callbackChannel =
[FlutterMethodChannel methodChannelWithName:@"plugins.flutter.io/in_app_purchase_callback"
Expand Down

0 comments on commit 431cbc6

Please sign in to comment.