@@ -54,26 +54,25 @@ - (instancetype)initWithRegistrar:(NSObject<FlutterPluginRegistrar> *)registrar
5454 _messenger = [registrar messenger ];
5555
5656 __weak typeof (self) weakSelf = self;
57- _paymentQueueHandler =
58- [[FIAPaymentQueueHandler alloc ] initWithQueue: [SKPaymentQueue defaultQueue ]
59- transactionsUpdated: ^(NSArray <SKPaymentTransaction *> *_Nonnull transactions) {
60- [weakSelf handleTransactionsUpdated: transactions];
61- }
62- transactionRemoved: ^(NSArray <SKPaymentTransaction *> *_Nonnull transactions) {
63- [weakSelf handleTransactionsRemoved: transactions];
64- }
65- restoreTransactionFailed: ^(NSError *_Nonnull error) {
66- [weakSelf handleTransactionRestoreFailed: error];
67- }
68- restoreCompletedTransactionsFinished: ^{
69- [weakSelf restoreCompletedTransactionsFinished ];
70- }
71- shouldAddStorePayment: ^BOOL (SKPayment *payment, SKProduct *product) {
72- return [weakSelf shouldAddStorePayment: payment product: product];
73- }
74- updatedDownloads: ^void (NSArray <SKDownload *> *_Nonnull downloads) {
75- [weakSelf updatedDownloads: downloads];
76- }];
57+ _paymentQueueHandler = [[FIAPaymentQueueHandler alloc ] initWithQueue: [SKPaymentQueue defaultQueue ]
58+ transactionsUpdated: ^(NSArray <SKPaymentTransaction *> *_Nonnull transactions) {
59+ [weakSelf handleTransactionsUpdated: transactions];
60+ }
61+ transactionRemoved: ^(NSArray <SKPaymentTransaction *> *_Nonnull transactions) {
62+ [weakSelf handleTransactionsRemoved: transactions];
63+ }
64+ restoreTransactionFailed: ^(NSError *_Nonnull error) {
65+ [weakSelf handleTransactionRestoreFailed: error];
66+ }
67+ restoreCompletedTransactionsFinished: ^{
68+ [weakSelf restoreCompletedTransactionsFinished ];
69+ }
70+ shouldAddStorePayment: ^BOOL (SKPayment *payment, SKProduct *product) {
71+ return [weakSelf shouldAddStorePayment: payment product: product];
72+ }
73+ updatedDownloads: ^void (NSArray <SKDownload *> *_Nonnull downloads) {
74+ [weakSelf updatedDownloads: downloads];
75+ }];
7776 _callbackChannel =
7877 [FlutterMethodChannel methodChannelWithName: @" plugins.flutter.io/in_app_purchase_callback"
7978 binaryMessenger: [registrar messenger ]];
0 commit comments