Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
3f22950
init
LouiseHsu May 13, 2024
b3ae498
Merge remote-tracking branch 'upstream/main'
LouiseHsu May 15, 2024
750d5d6
wip
LouiseHsu May 29, 2024
60a1cfe
tests are passing
LouiseHsu Jun 4, 2024
07d1fa9
NOW tests are passing
LouiseHsu Jun 4, 2024
e055868
PaymentQueue tests
LouiseHsu Jun 4, 2024
27bc9dc
remove some incidental files
LouiseHsu Jun 4, 2024
86fe875
remove files 2
LouiseHsu Jun 4, 2024
f0440fa
.
LouiseHsu Jun 4, 2024
77821d0
.
LouiseHsu Jun 4, 2024
c4ba598
.
LouiseHsu Jun 4, 2024
4337a30
.
LouiseHsu Jun 5, 2024
3331f6b
Merge branch 'main' into remove-ocmock
LouiseHsu Jun 5, 2024
710f892
remove testing files
LouiseHsu Jun 5, 2024
dd54781
Merge branch 'remove-ocmock' of github.com:LouiseHsu/packages into re…
LouiseHsu Jun 5, 2024
a6f5c6b
formatting
LouiseHsu Jun 5, 2024
e8425f3
missing import for mac
LouiseHsu Jun 5, 2024
135e328
warnings
LouiseHsu Jun 5, 2024
3d43bb0
macos warnings
LouiseHsu Jun 5, 2024
eb6d45e
.
LouiseHsu Jun 5, 2024
04c733f
.
LouiseHsu Jun 5, 2024
0cb8821
remove ocmock from pods
LouiseHsu Jun 5, 2024
801d47f
clean up
LouiseHsu Jun 6, 2024
1fcbabd
.
LouiseHsu Jun 6, 2024
6911fc8
fix wonky symlinking in test files
LouiseHsu Jun 6, 2024
dc0a6d8
.
LouiseHsu Jun 6, 2024
714b3a1
license block 🤡
LouiseHsu Jun 6, 2024
4cd2042
Merge branch 'main' into remove-ocmock
LouiseHsu Jun 6, 2024
0044139
split up protocols, moved test implementations out of actual implemen…
LouiseHsu Jun 7, 2024
98e8058
Merge branch 'remove-ocmock' of github.com:LouiseHsu/packages into re…
LouiseHsu Jun 7, 2024
3bac1cb
adding missing stubs to methods
LouiseHsu Jun 7, 2024
1e02304
comments
LouiseHsu Jun 7, 2024
db34eb5
more comments
LouiseHsu Jun 7, 2024
f1f66e6
pr comments
LouiseHsu Jun 10, 2024
53a552e
properties, attributes
LouiseHsu Jun 10, 2024
3b19418
pr comments, renaming, format
LouiseHsu Jun 10, 2024
320d2d4
bunch of renaming, pr comments
LouiseHsu Jun 12, 2024
35202db
add comments, moved properties into class extensions
LouiseHsu Jun 13, 2024
074c303
more comments
LouiseHsu Jun 13, 2024
6eaed90
license, more comments
LouiseHsu Jun 13, 2024
147133c
boop pr comments
LouiseHsu Jun 14, 2024
0c06698
boop
LouiseHsu Jun 14, 2024
09719c9
renaming
LouiseHsu Jun 14, 2024
49d06b4
.
LouiseHsu Jun 17, 2024
f55e7a4
failing mac test
LouiseHsu Jun 17, 2024
2ae019f
so much renaming
LouiseHsu Jun 17, 2024
15b0b04
stubs and ///
LouiseHsu Jun 17, 2024
7a0cab6
properties
LouiseHsu Jun 17, 2024
cf656ec
format
LouiseHsu Jun 18, 2024
3e95cdc
format
LouiseHsu Jun 18, 2024
7a54cf9
.
LouiseHsu Jun 21, 2024
dc5499e
oopsies mac version
LouiseHsu Jun 21, 2024
ebd6bf1
remove extra symlnked files
LouiseHsu Jun 21, 2024
bb41e93
.
LouiseHsu Jun 21, 2024
d3f2479
.
LouiseHsu Jun 21, 2024
aed5b28
.
LouiseHsu Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
properties
  • Loading branch information
LouiseHsu committed Jun 17, 2024
commit 7a0cab634b19ba5b38ded88cbe70f1cdaf78f35f
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@interface FIAPPaymentQueueDelegate ()

// The designated Flutter method channel that handles if a transaction should be continued
@property(strong, nonatomic, readonly) id<FLTMethodChannelProtocol> callbackChannel;
@property(nonatomic, strong, readonly) id<FLTMethodChannelProtocol> callbackChannel;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

@interface FIAPRequestHandler () <SKProductsRequestDelegate>

@property(copy, nonatomic) ProductRequestCompletion completion;
@property(strong, nonatomic) SKRequest *request;
@property(nonatomic, copy) ProductRequestCompletion completion;
@property(nonatomic, strong) SKRequest *request;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,34 @@
@interface FIAPaymentQueueHandler ()

/// The SKPaymentQueue instance connected to the App Store and responsible for processing
/// transactions.
@property(strong, nonatomic) SKPaymentQueue *queue;
/// transactions.expand_more
@property(nonatomic, strong) SKPaymentQueue *queue;

/// Callback method that is called each time the App Store indicates transactions are updated.
@property(nullable, copy, nonatomic) TransactionsUpdated transactionsUpdated;
@property(nonatomic, nullable, copy) TransactionsUpdated transactionsUpdated;

/// Callback method that is called each time the App Store indicates transactions are removed.
@property(nullable, copy, nonatomic) TransactionsRemoved transactionsRemoved;
@property(nonatomic, nullable, copy) TransactionsRemoved transactionsRemoved;

/// Callback method that is called each time the App Store indicates transactions failed to restore.
@property(nullable, copy, nonatomic) RestoreTransactionFailed restoreTransactionFailed;
@property(nonatomic, nullable, copy) RestoreTransactionFailed restoreTransactionFailed;

/// Callback method that is called each time the App Store indicates restoring of transactions has
/// Callback method that is called each time the App Store indicates restoring of transactions hasexpand_more
/// finished.
@property(nullable, copy, nonatomic)
RestoreCompletedTransactionsFinished paymentQueueRestoreCompletedTransactionsFinished;
@property(nonatomic, nullable, copy) RestoreCompletedTransactionsFinished paymentQueueRestoreCompletedTransactionsFinished;

/// Callback method that is called each time an in-app purchase has been initiated from the App
/// Callback method that is called each time an in-app purchase has been initiatedexpand_more from the App
/// Store.
@property(nullable, copy, nonatomic) ShouldAddStorePayment shouldAddStorePayment;
@property(nonatomic, nullable, copy) ShouldAddStorePayment shouldAddStorePayment;

/// Callback method that is called each time the App Store indicates downloads are updated.
@property(nullable, copy, nonatomic) UpdatedDownloads updatedDownloads;
/// Callback method that is called each time the App Store indicates downloads areexpand_more updated.
@property(nonatomic, nullable, copy) UpdatedDownloads updatedDownloads;

/// The transaction cache responsible for caching transactions.
///
/// Keeps track of transactions that arrive when the Flutter client is not
/// actively observing for transactions.
@property(strong, nonatomic, nonnull) FIATransactionCache *transactionCache;
/// actively observing for transactions.expand_more
@property(nonatomic, strong, nonnull) FIATransactionCache *transactionCache;

/// Indicates if the Flutter client is observing transactions.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@interface DefaultMethodChannel ()
/// The wrapped FlutterMethodChannel
@property(strong, nonatomic) FlutterMethodChannel *channel;
@property(nonatomic, strong) FlutterMethodChannel *channel;
@end

@implementation DefaultMethodChannel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ NS_ASSUME_NONNULL_BEGIN
@protocol FLTPaymentQueueProtocol <NSObject>

/// An object containing the location and unique identifier of an Apple App Store storefront.
@property(strong, nonatomic) SKStorefront *storefront API_AVAILABLE(ios(13.0));
@property(nonatomic, strong) SKStorefront *storefront API_AVAILABLE(ios(13.0));

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

/// An object that provides information needed to complete transactions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@interface DefaultPaymentQueue ()
/// The wrapped SKPaymentQueue
@property(strong, nonatomic) SKPaymentQueue *queue;
@property(nonatomic, strong) SKPaymentQueue *queue;
@end

@implementation DefaultPaymentQueue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@interface DefaultRequestHandler ()
/// The wrapped FIAPRequestHandler
@property(strong, nonatomic) FIAPRequestHandler *handler;
@property(nonatomic, strong) FIAPRequestHandler *handler;
@end

@implementation DefaultRequestHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

@interface DefaultTransactionCache ()
/// The wrapped FIATransactionCache
@property(strong, nonatomic) FIATransactionCache *cache;
@property(nonatomic, strong) FIATransactionCache *cache;
@end

@implementation DefaultTransactionCache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ class InAppPurchasePluginStub: InAppPurchasePlugin {
override func getProductRequest(withIdentifiers productIdentifiers: Set<String>)
-> SKProductsRequest
{
return TestSKProductRequest.init(productIdentifiers: productIdentifiers)
return SKProductRequestStub.init(productIdentifiers: productIdentifiers)
}

override func getProduct(productID: String) -> SKProduct? {
if productID == "" {
return nil
}
return TestSKProduct.init(productID: productID)
return SKProductStub.init(productID: productID)
}
override func getRefreshReceiptRequest(properties: [String: Any]?) -> SKReceiptRefreshRequest {
return SKReceiptRefreshRequest(receiptProperties: properties)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
API_UNAVAILABLE(tvos, macos, watchos)
@interface FIAPPaymentQueueDelegateTests : XCTestCase

@property(strong, nonatomic) SKPaymentTransaction *transaction;
@property(strong, nonatomic) SKStorefront *storefront;
@property(nonatomic, strong) SKPaymentTransaction *transaction;
@property(nonatomic, strong) SKStorefront *storefront;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

@interface InAppPurchasePluginTest : XCTestCase

@property(strong, nonatomic) FIAPReceiptManagerStub *receiptManagerStub;
@property(strong, nonatomic) InAppPurchasePlugin *plugin;
@property(nonatomic, strong) FIAPReceiptManagerStub *receiptManagerStub;
@property(nonatomic, strong) InAppPurchasePlugin *plugin;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

@interface PaymentQueueTest : XCTestCase

@property(strong, nonatomic) NSDictionary *periodMap;
@property(strong, nonatomic) NSDictionary *discountMap;
@property(strong, nonatomic) NSDictionary *productMap;
@property(strong, nonatomic) NSDictionary *productResponseMap;
@property(nonatomic, strong) NSDictionary *periodMap;
@property(nonatomic, strong) NSDictionary *discountMap;
@property(nonatomic, strong) NSDictionary *productMap;
@property(nonatomic, strong) NSDictionary *productResponseMap;

@end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ API_AVAILABLE(ios(11.2), macos(10.13.2))
@end

@interface SKProductRequestStub : SKProductsRequest
@property(assign, nonatomic) BOOL returnError;
@property(nonatomic, assign) BOOL returnError;
- (instancetype)initWithProductIdentifiers:(NSSet<NSString *> *)productIdentifiers;
- (instancetype)initWithFailureError:(NSError *)error;
@end
Expand All @@ -35,8 +35,8 @@ API_AVAILABLE(ios(11.2), macos(10.13.2))
@end

@interface SKPaymentQueueStub : SKPaymentQueue
@property(assign, nonatomic) SKPaymentTransactionState testState;
@property(strong, nonatomic, nullable) id<SKPaymentTransactionObserver> observer;
@property(nonatomic, assign) SKPaymentTransactionState testState;
@property(nonatomic, strong, nullable) id<SKPaymentTransactionObserver> observer;
@end

@interface SKPaymentTransactionStub : SKPaymentTransaction
Expand All @@ -56,9 +56,9 @@ API_AVAILABLE(ios(11.2), macos(10.13.2))
@interface FIAPReceiptManagerStub : FIAPReceiptManager
// Indicates whether getReceiptData of this stub is going to return an error.
// Setting this to true will let getReceiptData give a basic NSError and return nil.
@property(assign, nonatomic) BOOL returnError;
@property(nonatomic, assign) BOOL returnError;
// Indicates whether the receipt url will be nil.
@property(assign, nonatomic) BOOL returnNilURL;
@property(nonatomic, assign) BOOL returnNilURL;
@end

@interface SKReceiptRefreshRequestStub : SKReceiptRefreshRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ - (instancetype)initWithProductID:(NSString *)productIdentifier {

@interface SKProductRequestStub ()

@property(strong, nonatomic) NSSet *identifers;
@property(strong, nonatomic) NSError *error;
@property(nonatomic, strong) NSSet *identifers;
@property(nonatomic, strong) NSError *error;

@end

Expand Down