Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion RMStore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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", :osx => "10.8" }
s.frameworks = 'StoreKit'
s.requires_arc = true
s.default_subspec = 'Core'
Expand Down
7 changes: 5 additions & 2 deletions RMStore/RMStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ @implementation RMStore {
NSMutableDictionary *_products;
NSMutableSet *_productsRequestDelegates;

SKProductsRequest *productsRequest;
SKMutablePayment *payment;

NSMutableArray *_restoredTransactions;

NSInteger _pendingRestoredTransactionsCount;
Expand Down Expand Up @@ -210,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;
Expand Down Expand Up @@ -239,7 +242,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];
Expand Down