Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting RMStore's localized strings into their own table. #104

Merged
merged 2 commits into from
Aug 30, 2014
Merged
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
4 changes: 2 additions & 2 deletions RMStore/Optional/RMStoreAppReceiptVerificator.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ - (BOOL)verifyTransaction:(SKPaymentTransaction*)transaction
const BOOL receiptVerified = [self verifyAppReceipt:receipt];
if (!receiptVerified)
{
[self failWithBlock:failureBlock message:NSLocalizedString(@"The app receipt failed verification", @"")];
[self failWithBlock:failureBlock message:NSLocalizedStringFromTable(@"The app receipt failed verification", @"RMStore", nil)];
return NO;
}
SKPayment *payment = transaction.payment;
const BOOL transactionVerified = [receipt containsInAppPurchaseOfProductIdentifier:payment.productIdentifier];
if (!transactionVerified)
{
[self failWithBlock:failureBlock message:NSLocalizedString(@"The app receipt does not contain the given product", @"")];
[self failWithBlock:failureBlock message:NSLocalizedStringFromTable(@"The app receipt does not contain the given product", @"RMStore", nil)];
return NO;
}
if (successBlock)
Expand Down
2 changes: 1 addition & 1 deletion RMStore/Optional/RMStoreTransactionReceiptVerificator.m
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ - (void)verifyRequestData:(NSData*)requestData
if (!data)
{
RMStoreLog(@"Server Connection Failed");
NSError *wrapperError = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnableToCompleteVerification userInfo:@{NSUnderlyingErrorKey : error, NSLocalizedDescriptionKey : NSLocalizedString(@"Connection to Apple failed. Check the underlying error for more info.", @"Error description")}];
NSError *wrapperError = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnableToCompleteVerification userInfo:@{NSUnderlyingErrorKey : error, NSLocalizedDescriptionKey : NSLocalizedStringFromTable(@"Connection to Apple failed. Check the underlying error for more info.", @"RMStore", @"Error description")}];
if (failureBlock != nil)
{
failureBlock(wrapperError);
Expand Down
4 changes: 2 additions & 2 deletions RMStore/RMStore.m
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ - (void)addPayment:(NSString*)productIdentifier
RMStoreLog(@"unknown product id %@", productIdentifier)
if (failureBlock != nil)
{
NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnknownProductIdentifier userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Unknown product identifier", "Error description")}];
NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeUnknownProductIdentifier userInfo:@{NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Unknown product identifier", @"RMStore", @"Error description")}];
failureBlock(nil, error);
}
return;
Expand Down Expand Up @@ -433,7 +433,7 @@ - (void)didCancelDownload:(SKDownload*)download queue:(SKPaymentQueue*)queue

[self postNotificationWithName:RMSKDownloadCanceled download:download userInfoExtras:nil];

NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeDownloadCanceled userInfo:@{NSLocalizedDescriptionKey: NSLocalizedString(@"Download canceled", "Error description")}];
NSError *error = [NSError errorWithDomain:RMStoreErrorDomain code:RMStoreErrorCodeDownloadCanceled userInfo:@{NSLocalizedDescriptionKey: NSLocalizedStringFromTable(@"Download canceled", @"RMStore", @"Error description")}];

const BOOL hasPendingDownloads = [self.class hasPendingDownloadsInTransaction:transaction];
if (!hasPendingDownloads)
Expand Down