Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 2a4047e

Browse files
committed
Format
1 parent 95a51ae commit 2a4047e

3 files changed

Lines changed: 22 additions & 22 deletions

File tree

packages/in_app_purchase/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## 0.2.1+5
22

33
* Define clang module for iOS.
4-
* Fix iOS build warning
4+
* Fix iOS build warning.
55

66
## 0.2.1+4
77

packages/in_app_purchase/ios/Classes/InAppPurchasePlugin.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
@property(strong, nonatomic) FIAPaymentQueueHandler *paymentQueueHandler;
1212

13-
- (instancetype)initWithReceiptManager:(FIAPReceiptManager *)receiptManager NS_DESIGNATED_INITIALIZER;
13+
- (instancetype)initWithReceiptManager:(FIAPReceiptManager *)receiptManager
14+
NS_DESIGNATED_INITIALIZER;
1415
- (instancetype)init NS_UNAVAILABLE;
1516

1617
@end

packages/in_app_purchase/ios/Classes/InAppPurchasePlugin.m

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)