From 91cc3c81ae58d2c2f69fabf46b653e95d7eddfa6 Mon Sep 17 00:00:00 2001 From: Artem Date: Sun, 24 Mar 2024 15:31:30 +0100 Subject: [PATCH] Exposes -userDefaults so that subclasses may override. #126 'strong' attibutes replaced with 'copy' in block properties #138 --- RMStore/Optional/RMStoreUserDefaultsPersistence.h | 6 +++++- RMStore/RMStore.m | 8 ++++---- RMStoreTests/RMProducstRequestDelegateTests.m | 4 ++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/RMStore/Optional/RMStoreUserDefaultsPersistence.h b/RMStore/Optional/RMStoreUserDefaultsPersistence.h index 45f1fa0d..01cf6261 100644 --- a/RMStore/Optional/RMStoreUserDefaultsPersistence.h +++ b/RMStore/Optional/RMStoreUserDefaultsPersistence.h @@ -26,6 +26,10 @@ */ @interface RMStoreUserDefaultsPersistence : NSObject +/** Returns the user defaults used to store transaction data + */ +- (NSUserDefaults*)userDefaults; + /** Remove all transactions from user defaults. */ - (void)removeTransactions; @@ -78,4 +82,4 @@ */ - (RMStoreTransaction*)transactionWithData:(NSData*)data; -@end \ No newline at end of file +@end diff --git a/RMStore/RMStore.m b/RMStore/RMStore.m index 01388b12..c27d9edc 100755 --- a/RMStore/RMStore.m +++ b/RMStore/RMStore.m @@ -108,16 +108,16 @@ - (NSArray*)rm_transactions { @interface RMProductsRequestDelegate : NSObject -@property (nonatomic, strong) RMSKProductsRequestSuccessBlock successBlock; -@property (nonatomic, strong) RMSKProductsRequestFailureBlock failureBlock; +@property (nonatomic, copy) RMSKProductsRequestSuccessBlock successBlock; +@property (nonatomic, copy) RMSKProductsRequestFailureBlock failureBlock; @property (nonatomic, weak) RMStore *store; @end @interface RMAddPaymentParameters : NSObject -@property (nonatomic, strong) RMSKPaymentTransactionSuccessBlock successBlock; -@property (nonatomic, strong) RMSKPaymentTransactionFailureBlock failureBlock; +@property (nonatomic, copy) RMSKPaymentTransactionSuccessBlock successBlock; +@property (nonatomic, copy) RMSKPaymentTransactionFailureBlock failureBlock; @end diff --git a/RMStoreTests/RMProducstRequestDelegateTests.m b/RMStoreTests/RMProducstRequestDelegateTests.m index bcab5f17..3ae0fe59 100644 --- a/RMStoreTests/RMProducstRequestDelegateTests.m +++ b/RMStoreTests/RMProducstRequestDelegateTests.m @@ -25,8 +25,8 @@ @interface RMProductsRequestDelegate : NSObject -@property (nonatomic, strong) RMSKProductsRequestSuccessBlock successBlock; -@property (nonatomic, strong) RMSKProductsRequestFailureBlock failureBlock; +@property (nonatomic, copy) RMSKProductsRequestSuccessBlock successBlock; +@property (nonatomic, copy) RMSKProductsRequestFailureBlock failureBlock; @property (nonatomic, weak) RMStore *store; @end