Post

Replies

Boosts

Views

Activity

Localization of App Using String Catalogs - Storyboard
Hi everyone! I want to localize my swift application, which uses Storyboard, using String Catalogs. I have watched several tutorial videos about localization, however, it uses SwiftUI. I have tried localizing my storyboard through .string and migrating it to String Catalogs and it worked. (Example codes are attached below) But in the tutorials, String Catalogs extraction works when you build the project. But if you are using storyboard, I think it is not possible? or are there any other ways to extract the strings from storyboard using string catalogs directly and not using .strings and migration? This also makes me wonder if the Vary by Plural will work with the method that I did. Thank you so much in advance! Have a nice day ahead! Sample Codes from .strings (storyboard): /* Class = "UITextField"; placeholder = "Enter Password"; ObjectID = "08D-xr-4ke"; */ "08D-xr-4ke.placeholder" = "Enter Password"; /* Class = "UIButton"; configuration.title = "Login"; ObjectID = "2gQ-cX-5nH"; */ "2gQ-cX-5nH.configuration.title" = "Login"; Migrating it to String Catalogs: key : 08D-xr-4ke.placeholder English(en): Enter Password comment: /* Class = "UIButton"; configuration.title = "Login"; ObjectID = "2gQ-cX-5nH"; */
1
0
433
Aug ’24
Error 21002 - Validating Receipts Server-Side
Hi! I am creating a plugin that implements the In App Purchases and Subscriptions. I have done everything already and the only error I am debugging right now is with the validation of receipts. I always get status 21002 even the format is base64 already. I prefer to use the verifyReceipt as it is intended for my plugin. I have tried everything but still the response I get is status 21002 which is I know the data in receipt-data is malformed or missing. What can I do about this? Thank you so much in advance! This is my code too: (Objective-C) NSString *receiptString = [receiptData base64EncodedStringWithOptions:2]; if (!receiptString) { [self post_receipt_validation_result:@{@"status": @"error", @"message": @"Failed to encode receipt data"}]; return; } NSLog(@"Requesting to Sandbox: %@", receiptString); NSURL *storeURL = [NSURL URLWithString:@"https://api.storekit-sandbox.itunes.apple.com/verifyReceipt"]; NSMutableURLRequest *storeRequest = [NSMutableURLRequest requestWithURL:storeURL]; [storeRequest setHTTPMethod:@"POST"]; [storeRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; NSDictionary *requestContents = @{@"receipt-data": receiptString}; NSError *jsonError; NSData *requestData = [NSJSONSerialization dataWithJSONObject:requestContents options:0 error:&jsonError]; if (jsonError) { [self post_receipt_validation_result:@{@"status": @"error", @"message": jsonError.localizedDescription}]; return; } NSLog(@"Request Data: %@", requestData); [storeRequest setHTTPBody:requestData]; NSLog(@"Store Request: %@", storeRequest);
2
0
459
Jul ’24