From 56c58239c0b0ff97f4402e215b2cd61c42c41828 Mon Sep 17 00:00:00 2001 From: Mark Bridges Date: Thu, 22 Oct 2015 12:04:51 +0100 Subject: [PATCH 1/5] Started holding a reference to the products request --- RMStore/RMStore.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RMStore/RMStore.m b/RMStore/RMStore.m index 166d648a..af6cf5a4 100755 --- a/RMStore/RMStore.m +++ b/RMStore/RMStore.m @@ -133,6 +133,7 @@ @implementation RMStore { NSMutableDictionary *_addPaymentParameters; // HACK: We use a dictionary of product identifiers because the returned SKPayment is different from the one we add to the queue. Bad Apple. NSMutableDictionary *_products; NSMutableSet *_productsRequestDelegates; + SKProductsRequest *productsRequest; NSMutableArray *_restoredTransactions; @@ -239,7 +240,7 @@ - (void)requestProducts:(NSSet*)identifiers delegate.failureBlock = failureBlock; [_productsRequestDelegates addObject:delegate]; - SKProductsRequest *productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:identifiers]; + productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:identifiers]; productsRequest.delegate = delegate; [productsRequest start]; From 77f4703d941310e75a0bb20cd879ef2b0f96f0a4 Mon Sep 17 00:00:00 2001 From: Mark Bridges Date: Fri, 23 Oct 2015 12:11:51 +0100 Subject: [PATCH 2/5] Started holding a reference to the SKPayment, to fix the success block never getting called. --- RMStore/RMStore.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RMStore/RMStore.m b/RMStore/RMStore.m index af6cf5a4..c3c70d56 100755 --- a/RMStore/RMStore.m +++ b/RMStore/RMStore.m @@ -133,7 +133,9 @@ @implementation RMStore { NSMutableDictionary *_addPaymentParameters; // HACK: We use a dictionary of product identifiers because the returned SKPayment is different from the one we add to the queue. Bad Apple. NSMutableDictionary *_products; NSMutableSet *_productsRequestDelegates; + SKProductsRequest *productsRequest; + SKMutablePayment *payment; NSMutableArray *_restoredTransactions; @@ -211,7 +213,7 @@ - (void)addPayment:(NSString*)productIdentifier } return; } - SKMutablePayment *payment = [SKMutablePayment paymentWithProduct:product]; + payment = [SKMutablePayment paymentWithProduct:product]; if ([payment respondsToSelector:@selector(setApplicationUsername:)]) { payment.applicationUsername = userIdentifier; From f21fd914f4753cd90b0a7b6b9d51e90f751dc8e4 Mon Sep 17 00:00:00 2001 From: Mark Bridges Date: Fri, 23 Oct 2015 12:47:27 +0100 Subject: [PATCH 3/5] Added twos to the list of supported platforms --- RMStore.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RMStore.podspec b/RMStore.podspec index a7dc014d..b9c24acf 100644 --- a/RMStore.podspec +++ b/RMStore.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = 'Hermes Pique' s.social_media_url = 'https://twitter.com/hpique' s.source = { :git => 'https://github.com/robotmedia/RMStore.git', :tag => "v#{s.version}" } - s.platform = :ios, '7.0' + s.platforms = { :ios => "7.0", :tvos => "9.0" } s.frameworks = 'StoreKit' s.requires_arc = true s.default_subspec = 'Core' From e6cc492dc2610669bcf3f017356c7991b048813a Mon Sep 17 00:00:00 2001 From: Mark Bridges Date: Sun, 3 Apr 2016 23:12:47 +0100 Subject: [PATCH 4/5] Added OSX to list of platforms supported --- RMStore.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RMStore.podspec b/RMStore.podspec index b9c24acf..2456c87b 100644 --- a/RMStore.podspec +++ b/RMStore.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = 'Hermes Pique' s.social_media_url = 'https://twitter.com/hpique' s.source = { :git => 'https://github.com/robotmedia/RMStore.git', :tag => "v#{s.version}" } - s.platforms = { :ios => "7.0", :tvos => "9.0" } + s.platforms = { :ios => "7.0", :tvos => "9.0", , :osx => "10.8" } s.frameworks = 'StoreKit' s.requires_arc = true s.default_subspec = 'Core' From e57f20e0c6a7660a779ee5f1661c0aeb44aba37a Mon Sep 17 00:00:00 2001 From: Mark Bridges Date: Sun, 3 Apr 2016 23:27:26 +0100 Subject: [PATCH 5/5] Fixed pod spec erroneous comma --- RMStore.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RMStore.podspec b/RMStore.podspec index 2456c87b..424c1d4f 100644 --- a/RMStore.podspec +++ b/RMStore.podspec @@ -7,7 +7,7 @@ Pod::Spec.new do |s| s.author = 'Hermes Pique' s.social_media_url = 'https://twitter.com/hpique' s.source = { :git => 'https://github.com/robotmedia/RMStore.git', :tag => "v#{s.version}" } - s.platforms = { :ios => "7.0", :tvos => "9.0", , :osx => "10.8" } + s.platforms = { :ios => "7.0", :tvos => "9.0", :osx => "10.8" } s.frameworks = 'StoreKit' s.requires_arc = true s.default_subspec = 'Core'