From 17ae19556e0e7d9786feb05daf316e783ab3fcdd Mon Sep 17 00:00:00 2001 From: louisehsu Date: Wed, 23 Oct 2024 12:59:26 -0700 Subject: [PATCH 1/8] boop --- .../darwin/Classes/FIAObjectTranslator.h | 4 ++-- .../Classes/Protocols/FLTPaymentQueueHandlerProtocol.h | 4 ++-- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.h | 10 +++++----- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.m | 10 ++++------ .../example/shared/RunnerTests/Stubs.h | 2 +- 5 files changed, 14 insertions(+), 16 deletions(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h index bca07a58653..80a9d292734 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h @@ -45,12 +45,12 @@ NS_ASSUME_NONNULL_BEGIN // Converts an instance of SKStorefront into a dictionary. + (NSDictionary *)getMapFromSKStorefront:(SKStorefront *)storefront - API_AVAILABLE(ios(13), macos(10.15), watchos(6.2)); + API_AVAILABLE(ios(13), macos(10.15)); // Converts the supplied instances of SKStorefront and SKPaymentTransaction into a dictionary. + (NSDictionary *)getMapFromSKStorefront:(SKStorefront *)storefront andSKPaymentTransaction:(SKPaymentTransaction *)transaction - API_AVAILABLE(ios(13), macos(10.15), watchos(6.2)); + API_AVAILABLE(ios(13), macos(10.15)); // Creates an instance of the SKPaymentDiscount class based on the supplied dictionary. + (nullable SKPaymentDiscount *)getSKPaymentDiscountFromMap:(NSDictionary *)map diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h index f11b1a09ce4..3442b16f97f 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h @@ -19,10 +19,10 @@ typedef void (^UpdatedDownloads)(NSArray *downloads); @protocol FLTPaymentQueueHandlerProtocol /// An object that provides information needed to complete transactions. @property(nonatomic, weak, nullable) id delegate API_AVAILABLE( - ios(13.0), macos(10.15), watchos(6.2)); + ios(13.0), macos(10.15)); /// An object containing the location and unique identifier of an Apple App Store storefront. @property(nonatomic, readonly, nullable) - SKStorefront *storefront API_AVAILABLE(ios(13.0), macos(10.15), watchos(6.2)); + SKStorefront *storefront API_AVAILABLE(ios(13.0), macos(10.15)); /// Creates a new FIAPaymentQueueHandler. /// diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h index 40476471200..1bbf02cb97d 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h @@ -14,11 +14,11 @@ NS_ASSUME_NONNULL_BEGIN /// A list of SKPaymentTransactions, which each represents a single transaction @property(nonatomic, strong) NSArray *transactions API_AVAILABLE( - ios(3.0), macos(10.7), watchos(6.2), visionos(1.0)); + ios(3.0), macos(10.7)); /// An object that provides information needed to complete transactions. @property(nonatomic, weak, nullable) id delegate API_AVAILABLE( - ios(13.0), macos(10.15), watchos(6.2), visionos(1.0)); + ios(13.0), macos(10.15)); /// Remove a finished (i.e. failed or completed) transaction from the queue. Attempting to finish a /// purchasing transaction will throw an exception. @@ -40,18 +40,18 @@ NS_ASSUME_NONNULL_BEGIN /// Will add completed transactions for the current user back to the queue to be re-completed. This /// version requires an identifier to the user's account. - (void)restoreCompletedTransactionsWithApplicationUsername:(nullable NSString *)username - API_AVAILABLE(ios(7.0), macos(10.9), watchos(6.2), visionos(1.0)); + API_AVAILABLE(ios(7.0), macos(10.9)); /// Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by /// your app. Only for iOS. -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0), visionos(1.0)) +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(tvos, macos, watchos); /// If StoreKit has called your SKPaymentQueueDelegate's "paymentQueueShouldShowPriceConsent:" /// method and you returned NO, you can use this method to show the price consent UI at a later time /// that is more appropriate for your app. If there is no pending price consent, this method will do /// nothing. -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4), visionos(1.0)) +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) API_UNAVAILABLE(tvos, macos, watchos); @end diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m index fd97794bae8..719abb186ab 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m @@ -43,13 +43,11 @@ - (void)restoreCompletedTransactionsWithApplicationUsername:(nullable NSString * [self.queue restoreCompletedTransactionsWithApplicationUsername:username]; } -- (id)delegate API_AVAILABLE(ios(13.0), macos(10.15), watchos(6.2), - visionos(1.0)) { +- (id)delegate API_AVAILABLE(ios(13.0), macos(10.15)) { return self.queue.delegate; } -- (NSArray *)transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2), - visionos(1.0)) { +- (NSArray *)transactions API_AVAILABLE(ios(3.0), macos(10.7)) { return self.queue.transactions; } @@ -58,14 +56,14 @@ - (SKStorefront *)storefront API_AVAILABLE(ios(13.0)) { } #if TARGET_OS_IOS -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0), visionos(1.0)) +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(tvos, macos, watchos) { [self.queue presentCodeRedemptionSheet]; } #endif #if TARGET_OS_IOS -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4), visionos(1.0)) +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) API_UNAVAILABLE(tvos, macos, watchos) { [self.queue showPriceConsentIfNeeded]; } diff --git a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h index bfdec37d394..ecc5fa5681c 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h @@ -83,7 +83,7 @@ API_AVAILABLE(ios(13.0), macos(10.15)) @property(nonatomic, strong, nullable) id observer; @property(nonatomic, strong, readwrite) SKStorefront *storefront API_AVAILABLE(ios(13.0)); @property(nonatomic, strong, readwrite) NSArray *transactions API_AVAILABLE( - ios(3.0), macos(10.7), watchos(6.2), visionos(1.0)); + ios(3.0), macos(10.7)); // Test Properties @property(nonatomic, assign) From 7fa84ceb069644bddb43ea37630de8e96eb384ab Mon Sep 17 00:00:00 2001 From: louisehsu Date: Wed, 23 Oct 2024 13:04:05 -0700 Subject: [PATCH 2/8] oops versioning --- .../in_app_purchase/in_app_purchase_storekit/CHANGELOG.md | 4 ++++ .../in_app_purchase/in_app_purchase_storekit/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md index e34d332e942..af565e3369a 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.18+4 + +* Removes unneeded platform availability annotations. + ## 0.3.18+3 * Updates Pigeon for non-nullable collection type support. diff --git a/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml b/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml index 4c6da54a5a8..317bc8d0e10 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase_storekit description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework. repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_storekit issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 0.3.18+3 +version: 0.3.18+4 environment: sdk: ^3.3.0 From 80b201a6d55b37c80da979f3a65f5cd4d5e2b177 Mon Sep 17 00:00:00 2001 From: louisehsu Date: Wed, 23 Oct 2024 13:42:51 -0700 Subject: [PATCH 3/8] format --- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.h | 10 ++++------ .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.m | 6 ++---- .../example/shared/RunnerTests/Stubs.h | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h index 1bbf02cb97d..1900966eef0 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h @@ -13,8 +13,8 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, strong) SKStorefront *storefront API_AVAILABLE(ios(13.0)); /// A list of SKPaymentTransactions, which each represents a single transaction -@property(nonatomic, strong) NSArray *transactions API_AVAILABLE( - ios(3.0), macos(10.7)); +@property(nonatomic, strong) + NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7)); /// An object that provides information needed to complete transactions. @property(nonatomic, weak, nullable) id delegate API_AVAILABLE( @@ -44,15 +44,13 @@ NS_ASSUME_NONNULL_BEGIN /// Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by /// your app. Only for iOS. -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) - API_UNAVAILABLE(tvos, macos, watchos); +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos); /// If StoreKit has called your SKPaymentQueueDelegate's "paymentQueueShouldShowPriceConsent:" /// method and you returned NO, you can use this method to show the price consent UI at a later time /// that is more appropriate for your app. If there is no pending price consent, this method will do /// nothing. -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) - API_UNAVAILABLE(tvos, macos, watchos); +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos); @end diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m index 719abb186ab..fcde095cd23 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m @@ -56,15 +56,13 @@ - (SKStorefront *)storefront API_AVAILABLE(ios(13.0)) { } #if TARGET_OS_IOS -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) - API_UNAVAILABLE(tvos, macos, watchos) { +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos) { [self.queue presentCodeRedemptionSheet]; } #endif #if TARGET_OS_IOS -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) - API_UNAVAILABLE(tvos, macos, watchos) { +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos) { [self.queue showPriceConsentIfNeeded]; } #endif diff --git a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h index ecc5fa5681c..ea887b8bb4b 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h @@ -82,8 +82,8 @@ API_AVAILABLE(ios(13.0), macos(10.15)) @property(nonatomic, assign) SKPaymentTransactionState paymentState; @property(nonatomic, strong, nullable) id observer; @property(nonatomic, strong, readwrite) SKStorefront *storefront API_AVAILABLE(ios(13.0)); -@property(nonatomic, strong, readwrite) NSArray *transactions API_AVAILABLE( - ios(3.0), macos(10.7)); +@property(nonatomic, strong, readwrite) + NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7)); // Test Properties @property(nonatomic, assign) From e2d4ba4bb628d643ac8470113606b222708d5db7 Mon Sep 17 00:00:00 2001 From: louisehsu Date: Tue, 12 Nov 2024 16:45:55 -0800 Subject: [PATCH 4/8] put back watchos annotations --- .../darwin/Classes/FIAObjectTranslator.h | 4 ++-- .../darwin/Classes/FIAPPaymentQueueDelegate.h | 1 - .../Protocols/FLTPaymentQueueHandlerProtocol.h | 8 ++++---- .../Classes/Protocols/FLTPaymentQueueProtocol.h | 11 ++++++----- .../Classes/Protocols/FLTPaymentQueueProtocol.m | 4 ++-- .../example/shared/RunnerTests/Stubs.h | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h index 80a9d292734..bca07a58653 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAObjectTranslator.h @@ -45,12 +45,12 @@ NS_ASSUME_NONNULL_BEGIN // Converts an instance of SKStorefront into a dictionary. + (NSDictionary *)getMapFromSKStorefront:(SKStorefront *)storefront - API_AVAILABLE(ios(13), macos(10.15)); + API_AVAILABLE(ios(13), macos(10.15), watchos(6.2)); // Converts the supplied instances of SKStorefront and SKPaymentTransaction into a dictionary. + (NSDictionary *)getMapFromSKStorefront:(SKStorefront *)storefront andSKPaymentTransaction:(SKPaymentTransaction *)transaction - API_AVAILABLE(ios(13), macos(10.15)); + API_AVAILABLE(ios(13), macos(10.15), watchos(6.2)); // Creates an instance of the SKPaymentDiscount class based on the supplied dictionary. + (nullable SKPaymentDiscount *)getSKPaymentDiscountFromMap:(NSDictionary *)map diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h index 522c081923d..32776833d94 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h @@ -14,7 +14,6 @@ NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(13), macos(10.15)) -API_UNAVAILABLE(tvos, watchos) @interface FIAPPaymentQueueDelegate : NSObject - (id)initWithMethodChannel:(id)methodChannel; @end diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h index 3442b16f97f..d6c272658f5 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h @@ -19,10 +19,10 @@ typedef void (^UpdatedDownloads)(NSArray *downloads); @protocol FLTPaymentQueueHandlerProtocol /// An object that provides information needed to complete transactions. @property(nonatomic, weak, nullable) id delegate API_AVAILABLE( - ios(13.0), macos(10.15)); + ios(13.0), macos(10.15), watchos(6.2)); /// An object containing the location and unique identifier of an Apple App Store storefront. @property(nonatomic, readonly, nullable) - SKStorefront *storefront API_AVAILABLE(ios(13.0), macos(10.15)); + SKStorefront *storefront API_AVAILABLE(ios(13.0), macos(10.15), watchos(6.2)); /// Creates a new FIAPaymentQueueHandler. /// @@ -77,7 +77,7 @@ typedef void (^UpdatedDownloads)(NSArray *downloads); - (void)restoreTransactions:(nullable NSString *)applicationName; /// Displays a sheet that enables users to redeem subscription offer codes. -- (void)presentCodeRedemptionSheet API_UNAVAILABLE(tvos, macos, watchos); +- (void)presentCodeRedemptionSheet API_UNAVAILABLE(macos); /// Return all transactions that are not marked as complete. - (NSArray *)getUnfinishedTransactions; @@ -101,7 +101,7 @@ typedef void (^UpdatedDownloads)(NSArray *downloads); /// - You have increased the price of the subscription in App Store Connect. /// - The subscriber has not yet responded to a price consent query. /// Otherwise the method has no effect. -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos); +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(macos); @end NS_ASSUME_NONNULL_END diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h index 1900966eef0..9d6a0ab0351 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h @@ -13,12 +13,12 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, strong) SKStorefront *storefront API_AVAILABLE(ios(13.0)); /// A list of SKPaymentTransactions, which each represents a single transaction -@property(nonatomic, strong) - NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7)); +@property(nonatomic, strong) NSArray *transactions API_AVAILABLE( + ios(3.0), macos(10.7), watchos(6.2)); /// An object that provides information needed to complete transactions. @property(nonatomic, weak, nullable) id delegate API_AVAILABLE( - ios(13.0), macos(10.15)); + ios(13.0), macos(10.15), watchos(6.2)); /// Remove a finished (i.e. failed or completed) transaction from the queue. Attempting to finish a /// purchasing transaction will throw an exception. @@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN /// Will add completed transactions for the current user back to the queue to be re-completed. This /// version requires an identifier to the user's account. - (void)restoreCompletedTransactionsWithApplicationUsername:(nullable NSString *)username - API_AVAILABLE(ios(7.0), macos(10.9)); + API_AVAILABLE(ios(7.0), macos(10.9), watchos(6.2)); /// Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by /// your app. Only for iOS. @@ -50,7 +50,8 @@ NS_ASSUME_NONNULL_BEGIN /// method and you returned NO, you can use this method to show the price consent UI at a later time /// that is more appropriate for your app. If there is no pending price consent, this method will do /// nothing. -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos); +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) + API_UNAVAILABLE(tvos, macos, watchos); @end diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m index fcde095cd23..76487f8d5c1 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m @@ -43,11 +43,11 @@ - (void)restoreCompletedTransactionsWithApplicationUsername:(nullable NSString * [self.queue restoreCompletedTransactionsWithApplicationUsername:username]; } -- (id)delegate API_AVAILABLE(ios(13.0), macos(10.15)) { +- (id)delegate API_AVAILABLE(ios(13.0), macos(10.15), watchos(6.2)) { return self.queue.delegate; } -- (NSArray *)transactions API_AVAILABLE(ios(3.0), macos(10.7)) { +- (NSArray *)transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2)) { return self.queue.transactions; } diff --git a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h index ea887b8bb4b..8811a753071 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h @@ -83,7 +83,7 @@ API_AVAILABLE(ios(13.0), macos(10.15)) @property(nonatomic, strong, nullable) id observer; @property(nonatomic, strong, readwrite) SKStorefront *storefront API_AVAILABLE(ios(13.0)); @property(nonatomic, strong, readwrite) - NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7)); + NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2)); // Test Properties @property(nonatomic, assign) From 25a5d7c64b653a23715248eec825b02402601bde Mon Sep 17 00:00:00 2001 From: louisehsu Date: Tue, 12 Nov 2024 16:49:12 -0800 Subject: [PATCH 5/8] whitespace --- .../darwin/Classes/FIAPPaymentQueueDelegate.h | 1 + .../Classes/Protocols/FLTPaymentQueueHandlerProtocol.h | 4 ++-- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.h | 3 ++- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.m | 6 ++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h index 32776833d94..522c081923d 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/FIAPPaymentQueueDelegate.h @@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(13), macos(10.15)) +API_UNAVAILABLE(tvos, watchos) @interface FIAPPaymentQueueDelegate : NSObject - (id)initWithMethodChannel:(id)methodChannel; @end diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h index d6c272658f5..f11b1a09ce4 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueHandlerProtocol.h @@ -77,7 +77,7 @@ typedef void (^UpdatedDownloads)(NSArray *downloads); - (void)restoreTransactions:(nullable NSString *)applicationName; /// Displays a sheet that enables users to redeem subscription offer codes. -- (void)presentCodeRedemptionSheet API_UNAVAILABLE(macos); +- (void)presentCodeRedemptionSheet API_UNAVAILABLE(tvos, macos, watchos); /// Return all transactions that are not marked as complete. - (NSArray *)getUnfinishedTransactions; @@ -101,7 +101,7 @@ typedef void (^UpdatedDownloads)(NSArray *downloads); /// - You have increased the price of the subscription in App Store Connect. /// - The subscriber has not yet responded to a price consent query. /// Otherwise the method has no effect. -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(macos); +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos); @end NS_ASSUME_NONNULL_END diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h index 9d6a0ab0351..8a8564506e5 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h @@ -44,7 +44,8 @@ NS_ASSUME_NONNULL_BEGIN /// Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by /// your app. Only for iOS. -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos); +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) +API_UNAVAILABLE(tvos, macos, watchos); /// If StoreKit has called your SKPaymentQueueDelegate's "paymentQueueShouldShowPriceConsent:" /// method and you returned NO, you can use this method to show the price consent UI at a later time diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m index 76487f8d5c1..2a5dd212df9 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m @@ -56,13 +56,15 @@ - (SKStorefront *)storefront API_AVAILABLE(ios(13.0)) { } #if TARGET_OS_IOS -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos) { +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) +API_UNAVAILABLE(tvos, macos, watchos) { [self.queue presentCodeRedemptionSheet]; } #endif #if TARGET_OS_IOS -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos) { +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) +API_UNAVAILABLE(tvos, macos, watchos) { [self.queue showPriceConsentIfNeeded]; } #endif From f11c61cc59a4cf26cc986cd4eeade35d65f0a155 Mon Sep 17 00:00:00 2001 From: louisehsu Date: Tue, 12 Nov 2024 16:53:16 -0800 Subject: [PATCH 6/8] white space --- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.h | 2 +- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.m | 4 ++-- .../example/shared/RunnerTests/Stubs.h | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h index 8a8564506e5..176f1e985a6 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h @@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN /// Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by /// your app. Only for iOS. - (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) -API_UNAVAILABLE(tvos, macos, watchos); + API_UNAVAILABLE(tvos, macos, watchos); /// If StoreKit has called your SKPaymentQueueDelegate's "paymentQueueShouldShowPriceConsent:" /// method and you returned NO, you can use this method to show the price consent UI at a later time diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m index 2a5dd212df9..68003aab47a 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m @@ -57,14 +57,14 @@ - (SKStorefront *)storefront API_AVAILABLE(ios(13.0)) { #if TARGET_OS_IOS - (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) -API_UNAVAILABLE(tvos, macos, watchos) { + API_UNAVAILABLE(tvos, macos, watchos) { [self.queue presentCodeRedemptionSheet]; } #endif #if TARGET_OS_IOS - (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) -API_UNAVAILABLE(tvos, macos, watchos) { + API_UNAVAILABLE(tvos, macos, watchos) { [self.queue showPriceConsentIfNeeded]; } #endif diff --git a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h index 8811a753071..df459a92bcb 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h @@ -82,8 +82,7 @@ API_AVAILABLE(ios(13.0), macos(10.15)) @property(nonatomic, assign) SKPaymentTransactionState paymentState; @property(nonatomic, strong, nullable) id observer; @property(nonatomic, strong, readwrite) SKStorefront *storefront API_AVAILABLE(ios(13.0)); -@property(nonatomic, strong, readwrite) - NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2)); +@property(nonatomic, strong, readwrite) NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2)); // Test Properties @property(nonatomic, assign) From e776df4f01c3fa194293667446192ef435decc79 Mon Sep 17 00:00:00 2001 From: louisehsu Date: Tue, 12 Nov 2024 16:55:02 -0800 Subject: [PATCH 7/8] . --- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m index 68003aab47a..3584e97f7ff 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m @@ -57,14 +57,14 @@ - (SKStorefront *)storefront API_AVAILABLE(ios(13.0)) { #if TARGET_OS_IOS - (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) - API_UNAVAILABLE(tvos, macos, watchos) { + API_UNAVAILABLE(tvos, macos, watchos) { [self.queue presentCodeRedemptionSheet]; } #endif #if TARGET_OS_IOS - (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) - API_UNAVAILABLE(tvos, macos, watchos) { + API_UNAVAILABLE(tvos, macos, watchos) { [self.queue showPriceConsentIfNeeded]; } #endif From a627812b82f2a8f311531d49cd28ed5a0ef3852d Mon Sep 17 00:00:00 2001 From: louisehsu Date: Wed, 13 Nov 2024 11:11:02 -0800 Subject: [PATCH 8/8] format --- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.h | 6 ++---- .../darwin/Classes/Protocols/FLTPaymentQueueProtocol.m | 9 ++++----- .../example/shared/RunnerTests/Stubs.h | 3 ++- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h index 176f1e985a6..77edd7553e2 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h @@ -44,15 +44,13 @@ NS_ASSUME_NONNULL_BEGIN /// Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by /// your app. Only for iOS. -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) - API_UNAVAILABLE(tvos, macos, watchos); +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos); /// If StoreKit has called your SKPaymentQueueDelegate's "paymentQueueShouldShowPriceConsent:" /// method and you returned NO, you can use this method to show the price consent UI at a later time /// that is more appropriate for your app. If there is no pending price consent, this method will do /// nothing. -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) - API_UNAVAILABLE(tvos, macos, watchos); +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos); @end diff --git a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m index 3584e97f7ff..943bdc2cf39 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m +++ b/packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m @@ -47,7 +47,8 @@ - (void)restoreCompletedTransactionsWithApplicationUsername:(nullable NSString * return self.queue.delegate; } -- (NSArray *)transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2)) { +- (NSArray *)transactions API_AVAILABLE(ios(3.0), macos(10.7), + watchos(6.2)) { return self.queue.transactions; } @@ -56,15 +57,13 @@ - (SKStorefront *)storefront API_AVAILABLE(ios(13.0)) { } #if TARGET_OS_IOS -- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0)) - API_UNAVAILABLE(tvos, macos, watchos) { +- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos) { [self.queue presentCodeRedemptionSheet]; } #endif #if TARGET_OS_IOS -- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4)) - API_UNAVAILABLE(tvos, macos, watchos) { +- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos) { [self.queue showPriceConsentIfNeeded]; } #endif diff --git a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h index df459a92bcb..14bbed8ceea 100644 --- a/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h +++ b/packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h @@ -82,7 +82,8 @@ API_AVAILABLE(ios(13.0), macos(10.15)) @property(nonatomic, assign) SKPaymentTransactionState paymentState; @property(nonatomic, strong, nullable) id observer; @property(nonatomic, strong, readwrite) SKStorefront *storefront API_AVAILABLE(ios(13.0)); -@property(nonatomic, strong, readwrite) NSArray *transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2)); +@property(nonatomic, strong, readwrite) NSArray *transactions API_AVAILABLE( + ios(3.0), macos(10.7), watchos(6.2)); // Test Properties @property(nonatomic, assign)