Skip to content

Commit 3af3b9e

Browse files
authored
[in_app_purchase_storekit] Remove unneeded platform annotations (#7914)
Fixes flutter/flutter#155213
1 parent d1992a4 commit 3af3b9e

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

packages/in_app_purchase/in_app_purchase_storekit/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.19+1
2+
3+
* Removes unneeded platform availability annotations.
4+
15
## 0.3.19
26

37
* Adds StoreKit2 Transaction expiration date.

packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ NS_ASSUME_NONNULL_BEGIN
1414

1515
/// A list of SKPaymentTransactions, which each represents a single transaction
1616
@property(nonatomic, strong) NSArray<SKPaymentTransaction *> *transactions API_AVAILABLE(
17-
ios(3.0), macos(10.7), watchos(6.2), visionos(1.0));
17+
ios(3.0), macos(10.7), watchos(6.2));
1818

1919
/// An object that provides information needed to complete transactions.
2020
@property(nonatomic, weak, nullable) id<SKPaymentQueueDelegate> delegate API_AVAILABLE(
21-
ios(13.0), macos(10.15), watchos(6.2), visionos(1.0));
21+
ios(13.0), macos(10.15), watchos(6.2));
2222

2323
/// Remove a finished (i.e. failed or completed) transaction from the queue. Attempting to finish a
2424
/// purchasing transaction will throw an exception.
@@ -40,19 +40,17 @@ NS_ASSUME_NONNULL_BEGIN
4040
/// Will add completed transactions for the current user back to the queue to be re-completed. This
4141
/// version requires an identifier to the user's account.
4242
- (void)restoreCompletedTransactionsWithApplicationUsername:(nullable NSString *)username
43-
API_AVAILABLE(ios(7.0), macos(10.9), watchos(6.2), visionos(1.0));
43+
API_AVAILABLE(ios(7.0), macos(10.9), watchos(6.2));
4444

4545
/// Call this method to have StoreKit present a sheet enabling the user to redeem codes provided by
4646
/// your app. Only for iOS.
47-
- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0), visionos(1.0))
48-
API_UNAVAILABLE(tvos, macos, watchos);
47+
- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos);
4948

5049
/// If StoreKit has called your SKPaymentQueueDelegate's "paymentQueueShouldShowPriceConsent:"
5150
/// method and you returned NO, you can use this method to show the price consent UI at a later time
5251
/// that is more appropriate for your app. If there is no pending price consent, this method will do
5352
/// nothing.
54-
- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4), visionos(1.0))
55-
API_UNAVAILABLE(tvos, macos, watchos);
53+
- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos);
5654

5755
@end
5856

packages/in_app_purchase/in_app_purchase_storekit/darwin/Classes/Protocols/FLTPaymentQueueProtocol.m

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,12 @@ - (void)restoreCompletedTransactionsWithApplicationUsername:(nullable NSString *
4343
[self.queue restoreCompletedTransactionsWithApplicationUsername:username];
4444
}
4545

46-
- (id<SKPaymentQueueDelegate>)delegate API_AVAILABLE(ios(13.0), macos(10.15), watchos(6.2),
47-
visionos(1.0)) {
46+
- (id<SKPaymentQueueDelegate>)delegate API_AVAILABLE(ios(13.0), macos(10.15), watchos(6.2)) {
4847
return self.queue.delegate;
4948
}
5049

51-
- (NSArray<SKPaymentTransaction *> *)transactions API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2),
52-
visionos(1.0)) {
50+
- (NSArray<SKPaymentTransaction *> *)transactions API_AVAILABLE(ios(3.0), macos(10.7),
51+
watchos(6.2)) {
5352
return self.queue.transactions;
5453
}
5554

@@ -58,15 +57,13 @@ - (SKStorefront *)storefront API_AVAILABLE(ios(13.0)) {
5857
}
5958

6059
#if TARGET_OS_IOS
61-
- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0), visionos(1.0))
62-
API_UNAVAILABLE(tvos, macos, watchos) {
60+
- (void)presentCodeRedemptionSheet API_AVAILABLE(ios(14.0))API_UNAVAILABLE(tvos, macos, watchos) {
6361
[self.queue presentCodeRedemptionSheet];
6462
}
6563
#endif
6664

6765
#if TARGET_OS_IOS
68-
- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4), visionos(1.0))
69-
API_UNAVAILABLE(tvos, macos, watchos) {
66+
- (void)showPriceConsentIfNeeded API_AVAILABLE(ios(13.4))API_UNAVAILABLE(tvos, macos, watchos) {
7067
[self.queue showPriceConsentIfNeeded];
7168
}
7269
#endif

packages/in_app_purchase/in_app_purchase_storekit/example/shared/RunnerTests/Stubs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ API_AVAILABLE(ios(13.0), macos(10.15))
8383
@property(nonatomic, strong, nullable) id<SKPaymentTransactionObserver> observer;
8484
@property(nonatomic, strong, readwrite) SKStorefront *storefront API_AVAILABLE(ios(13.0));
8585
@property(nonatomic, strong, readwrite) NSArray<SKPaymentTransaction *> *transactions API_AVAILABLE(
86-
ios(3.0), macos(10.7), watchos(6.2), visionos(1.0));
86+
ios(3.0), macos(10.7), watchos(6.2));
8787

8888
// Test Properties
8989
@property(nonatomic, assign)

packages/in_app_purchase/in_app_purchase_storekit/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: in_app_purchase_storekit
22
description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
33
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_storekit
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
5-
version: 0.3.19
5+
version: 0.3.19+1
66

77
environment:
88
sdk: ^3.3.0

0 commit comments

Comments
 (0)