diff --git a/LocalizationTester/AppDelegate.h b/LocalizationTester/AppDelegate.h new file mode 100644 index 00000000000..1c75412f520 --- /dev/null +++ b/LocalizationTester/AppDelegate.h @@ -0,0 +1,17 @@ +// +// AppDelegate.h +// LocalizationTester +// +// Created by Cameron Sabol on 12/11/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/LocalizationTester/AppDelegate.m b/LocalizationTester/AppDelegate.m new file mode 100644 index 00000000000..e39f0e944e0 --- /dev/null +++ b/LocalizationTester/AppDelegate.m @@ -0,0 +1,64 @@ +// +// AppDelegate.m +// LocalizationTester +// +// Created by Cameron Sabol on 12/11/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import "AppDelegate.h" + +#import "ViewController.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (void)_keyboardDidShowNotification { + [((UINavigationController *)self.window.rootViewController).topViewController.view endEditing:YES]; +} + +- (BOOL)application:(__unused UIApplication *)application didFinishLaunchingWithOptions:(__unused NSDictionary *)launchOptions { + + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_keyboardDidShowNotification) name:UIKeyboardDidShowNotification object:nil]; + + UIViewController *rootVC = [[ViewController alloc] init]; + UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:rootVC]; + UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + window.rootViewController = nav; + [window makeKeyAndVisible]; + self.window = window; + return YES; +} + + +- (void)applicationWillResignActive:(__unused UIApplication *)application { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. +} + + +- (void)applicationDidEnterBackground:(__unused UIApplication *)application { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. +} + + +- (void)applicationWillEnterForeground:(__unused UIApplication *)application { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. +} + + +- (void)applicationDidBecomeActive:(__unused UIApplication *)application { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. +} + + +- (void)applicationWillTerminate:(__unused UIApplication *)application { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. +} + + +@end diff --git a/LocalizationTester/Assets.xcassets/AppIcon.appiconset/Contents.json b/LocalizationTester/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000000..d8db8d65fd7 --- /dev/null +++ b/LocalizationTester/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LocalizationTester/Assets.xcassets/Contents.json b/LocalizationTester/Assets.xcassets/Contents.json new file mode 100644 index 00000000000..da4a164c918 --- /dev/null +++ b/LocalizationTester/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LocalizationTester/Base.lproj/LaunchScreen.storyboard b/LocalizationTester/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000000..f83f6fd5810 --- /dev/null +++ b/LocalizationTester/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LocalizationTester/Info.plist b/LocalizationTester/Info.plist new file mode 100644 index 00000000000..4222ac2dd31 --- /dev/null +++ b/LocalizationTester/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/LocalizationTester/MockCustomerContext.h b/LocalizationTester/MockCustomerContext.h new file mode 100644 index 00000000000..d2cabd25aa5 --- /dev/null +++ b/LocalizationTester/MockCustomerContext.h @@ -0,0 +1,15 @@ +// +// MockCustomerContext.h +// LocalizationTester +// +// Created by Cameron Sabol on 12/14/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import + +@interface MockCustomerContext : STPCustomerContext + +@property (nonatomic) BOOL neverRetrieveCustomer; + +@end diff --git a/LocalizationTester/MockCustomerContext.m b/LocalizationTester/MockCustomerContext.m new file mode 100644 index 00000000000..e31d979546a --- /dev/null +++ b/LocalizationTester/MockCustomerContext.m @@ -0,0 +1,159 @@ +// +// MockCustomerContext.m +// LocalizationTester +// +// Created by Cameron Sabol on 12/14/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import "MockCustomerContext.h" +#import "STPCustomer+Private.h" + +#pragma mark - MockCustomer + +@interface MockCustomer: STPCustomer +@property (nonatomic) NSMutableArray> *mockSources; +@property (nonatomic) id mockDefaultSource; +@property (nonatomic) STPAddress *mockShippingAddress; + +@end + +@implementation MockCustomer + +- (instancetype)init { + self = [super init]; + if (self) { + _mockSources = [NSMutableArray array]; + /** + // Preload the mock customer with saved cards. + // last4 values are from test cards: https://stripe.com/docs/testing#cards + // Not using the "4242" and "4444" numbers, since those are the easiest + // to remember and fill. + // */ + NSDictionary *visa = @{ + @"id": @"preloaded_visa", + @"exp_month": @10, + @"exp_year": @2020, + @"last4": @"1881", + @"brand": @"visa", + }; + + STPCard *visaCard = [STPCard decodedObjectFromAPIResponse:visa]; + if (visaCard) { + [_mockSources addObject:visaCard]; + } + + NSDictionary *masterCard = @{ + @"id": @"preloaded_mastercard", + @"exp_month": @10, + @"exp_year": @2020, + @"last4": @"8210", + @"brand": @"mastercard", + }; + STPCard *masterCardCard = [STPCard decodedObjectFromAPIResponse:masterCard]; + if (masterCardCard) { + [_mockSources addObject:masterCardCard]; + } + + NSDictionary *amex = @{ + @"id": @"preloaded_amex", + @"exp_month": @10, + @"exp_year": @2020, + @"last4": @"0005", + @"brand": @"american express", + }; + STPCard *amexCard = [STPCard decodedObjectFromAPIResponse:amex]; + if (amexCard) { + [_mockSources addObject:amexCard]; + } + } + + return self; +} + +- (NSArray> *)sources { + return self.mockSources; +} + +- (id)defaultSource { + return self.mockDefaultSource; +} + +- (STPAddress *)shippingAddress { + return self.mockShippingAddress; +} + +@end + +#pragma mark - MockCustomerContext + +@implementation MockCustomerContext +{ + MockCustomer *_mockCustomer; +} + +- (instancetype)init { + self = [super init]; + if (self) { + _mockCustomer = [[MockCustomer alloc] init]; + } + + return self; +} + +- (void)retrieveCustomer:(STPCustomerCompletionBlock)completion { + if (!self.neverRetrieveCustomer) { + if (completion) { + completion(_mockCustomer, nil); + } + } +} +- (void)attachSourceToCustomer:(id)source completion:(STPErrorBlock)completion { + if ([source isKindOfClass:[STPToken class]] && ((STPToken *)source).card != nil) { + [_mockCustomer.mockSources addObject:((STPToken *)source).card]; + } + if (completion) { + completion(nil); + } +} + +- (void)selectDefaultCustomerSource:(id)source completion:(STPErrorBlock)completion { + BOOL hasSource = [_mockCustomer.sources indexOfObjectPassingTest:^BOOL(id _Nonnull obj, __unused NSUInteger idx, BOOL * _Nonnull stop) { + if (obj.stripeID == source.stripeID) { + *stop = YES; + return YES; + } + return NO; + }]; + if (hasSource) { + _mockCustomer.mockDefaultSource = source; + } + if (completion) { + completion(nil); + } +} + +- (void)updateCustomerWithShippingAddress:(STPAddress *)shipping completion:(STPErrorBlock)completion { + _mockCustomer.mockShippingAddress = shipping; + if (completion) { + completion(nil); + } +} + +- (void)detachSourceFromCustomer:(id)source completion:(STPErrorBlock)completion { + NSUInteger index = [_mockCustomer.sources indexOfObjectPassingTest:^BOOL(id _Nonnull obj, __unused NSUInteger idx, BOOL * _Nonnull stop) { + if (obj.stripeID == source.stripeID) { + *stop = YES; + return YES; + } + return NO; + }]; + if (index != NSNotFound) { + [_mockCustomer.mockSources removeObjectAtIndex:index]; + } + if (completion) { + completion(nil); + } +} + +@end diff --git a/LocalizationTester/ViewController.h b/LocalizationTester/ViewController.h new file mode 100644 index 00000000000..b99d1bd8724 --- /dev/null +++ b/LocalizationTester/ViewController.h @@ -0,0 +1,15 @@ +// +// ViewController.h +// LocalizationTester +// +// Created by Cameron Sabol on 12/11/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import + +@interface ViewController : UITableViewController + + +@end + diff --git a/LocalizationTester/ViewController.m b/LocalizationTester/ViewController.m new file mode 100644 index 00000000000..3c37abf8084 --- /dev/null +++ b/LocalizationTester/ViewController.m @@ -0,0 +1,383 @@ +// +// ViewController.m +// LocalizationTester +// +// Created by Cameron Sabol on 12/11/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import "ViewController.h" + +#import "MockCustomerContext.h" +#import "STPAddCardViewController+Private.h" +#import "STPPaymentCardTextField.h" +#import "STPPaymentConfiguration.h" +#import "STPPaymentOptionsViewController.h" +#import "STPShippingAddressViewController.h" + +typedef NS_ENUM(NSInteger, LocalizedScreen) { + LocalizedScreenPaymentCardTextField = 0, + LocalizedScreenAddCardVCStandard, + LocalizedScreenAddCardVCPrefilledShipping, + LocalizedScreenAddCardPrefilledDelivery, + LocalizedScreenPaymentOptionsVC, + LocalizedScreenPaymentOptionsVCLoading, + LocalizedScreenShippingAddressVC, + LocalizedScreenShippingAddressVCBadAddress, + LocalizedScreenShippingAddressVCDelivery, + LocalizedScreenShippingAddressVCContact, +}; + +static NSString * TitleForLocalizedScreen(LocalizedScreen screen) { + switch (screen) { + case LocalizedScreenPaymentCardTextField: + return @"Payment Card Text Field"; + case LocalizedScreenAddCardVCStandard: + return @"Add Card VC Standard"; + case LocalizedScreenAddCardVCPrefilledShipping: + return @"Add Card VC Prefilled Shipping"; + case LocalizedScreenAddCardPrefilledDelivery: + return @"Add Card VC Prefilled Delivery"; + case LocalizedScreenPaymentOptionsVC: + return @"Payment Options VC"; + case LocalizedScreenPaymentOptionsVCLoading: + return @"Payment Options VC Loading"; + case LocalizedScreenShippingAddressVC: + return @"Shipping Address VC"; + case LocalizedScreenShippingAddressVCBadAddress: + return @"Shipping Address VC Bad Address"; + case LocalizedScreenShippingAddressVCDelivery: + return @"Shipping Address VC for Delivery"; + case LocalizedScreenShippingAddressVCContact: + return @"Shipping Address VC for Contact"; + } +} + + +@interface ViewController () + +@property NSArray *screenTypes; + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + self.screenTypes = @[ + @(LocalizedScreenPaymentCardTextField), + @(LocalizedScreenAddCardVCStandard), + @(LocalizedScreenAddCardVCPrefilledShipping), + @(LocalizedScreenAddCardPrefilledDelivery), + @(LocalizedScreenPaymentOptionsVC), + @(LocalizedScreenPaymentOptionsVCLoading), + @(LocalizedScreenShippingAddressVC), + @(LocalizedScreenShippingAddressVCBadAddress), + @(LocalizedScreenShippingAddressVCDelivery), + @(LocalizedScreenShippingAddressVCContact), + ]; +} + + +- (void)viewWillAppear:(BOOL)animated { + self.clearsSelectionOnViewWillAppear = self.splitViewController.isCollapsed; + [super viewWillAppear:animated]; +} + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + + +#pragma mark - Table View + +- (NSInteger)numberOfSectionsInTableView:(__unused UITableView *)tableView { + return 1; +} + + +- (NSInteger)tableView:(__unused UITableView *)tableView numberOfRowsInSection:(__unused NSInteger)section { + return self.screenTypes.count; +} + + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; + } + + LocalizedScreen screenType = [self.screenTypes[indexPath.row] integerValue]; + + cell.textLabel.text = TitleForLocalizedScreen(screenType); + return cell; +} + + +- (BOOL)tableView:(__unused UITableView *)tableView canEditRowAtIndexPath:(__unused NSIndexPath *)indexPath { + // Return NO if you do not want the specified item to be editable. + return NO; +} + +- (void)tableView:(__unused UITableView *)tableView didSelectRowAtIndexPath:(__unused NSIndexPath *)indexPath { + LocalizedScreen screenType = [self.screenTypes[indexPath.row] integerValue]; + UIViewController *vc = nil; + switch (screenType) { + case LocalizedScreenPaymentCardTextField: + { + STPPaymentCardTextField *cardTextField = [[STPPaymentCardTextField alloc] init]; + cardTextField.postalCodeEntryEnabled = YES; + cardTextField.translatesAutoresizingMaskIntoConstraints = false; + UIBarButtonItem *doneItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(cardTextFieldViewControllerDidSelectDone)]; + doneItem.accessibilityIdentifier = @"CardFieldViewControllerDoneButtonIdentifier"; + vc = [[UIViewController alloc] init]; + vc.navigationItem.leftBarButtonItem = doneItem; + vc.view.backgroundColor = [UIColor whiteColor]; + [vc.view addSubview:cardTextField]; + [NSLayoutConstraint activateConstraints:@[ + [cardTextField.centerYAnchor constraintEqualToAnchor:vc.view.centerYAnchor], + [cardTextField.leadingAnchor constraintEqualToAnchor:vc.view.leadingAnchor constant:15], + [cardTextField.trailingAnchor constraintEqualToAnchor:vc.view.trailingAnchor constant:-15], + [cardTextField.heightAnchor constraintEqualToConstant:50], + ]]; + + } + break; + + case LocalizedScreenAddCardVCStandard: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.requiredBillingAddressFields = STPBillingAddressFieldsFull; + STPAddCardViewController *addCardVC = [[STPAddCardViewController alloc] initWithConfiguration:configuration theme:[STPTheme defaultTheme]]; + addCardVC.alwaysShowScanCardButton = YES; + addCardVC.alwaysEnableDoneButton = YES; + addCardVC.delegate = self; + vc = addCardVC; + } + break; + + case LocalizedScreenAddCardVCPrefilledShipping: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.shippingType = STPShippingTypeShipping; + configuration.requiredBillingAddressFields = STPBillingAddressFieldsFull; + STPAddCardViewController *addCardVC = [[STPAddCardViewController alloc] initWithConfiguration:configuration theme:[STPTheme defaultTheme]]; + addCardVC.shippingAddress = [[STPAddress alloc] init]; + addCardVC.shippingAddress.line1 = @"1"; // trigger "use shipping address" button + addCardVC.delegate = self; + vc = addCardVC; + } + break; + + case LocalizedScreenAddCardPrefilledDelivery: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.shippingType = STPShippingTypeDelivery; + configuration.requiredBillingAddressFields = STPBillingAddressFieldsFull; + STPAddCardViewController *addCardVC = [[STPAddCardViewController alloc] initWithConfiguration:configuration theme:[STPTheme defaultTheme]]; + addCardVC.shippingAddress = [[STPAddress alloc] init]; + addCardVC.shippingAddress.line1 = @"1"; // trigger "use delivery address" button + addCardVC.delegate = self; + vc = addCardVC; + } + break; + + case LocalizedScreenPaymentOptionsVC: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.additionalPaymentOptions = STPPaymentOptionTypeAll; + configuration.requiredBillingAddressFields = STPBillingAddressFieldsFull; + configuration.appleMerchantIdentifier = @"dummy-merchant-id"; + vc = [[STPPaymentOptionsViewController alloc] initWithConfiguration:configuration + theme:[STPTheme defaultTheme] + customerContext:[[MockCustomerContext alloc] init] + delegate:self]; + } + break; + + case LocalizedScreenPaymentOptionsVCLoading: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.additionalPaymentOptions = STPPaymentOptionTypeAll; + configuration.requiredBillingAddressFields = STPBillingAddressFieldsFull; + configuration.appleMerchantIdentifier = @"dummy-merchant-id"; + MockCustomerContext *customerContext = [[MockCustomerContext alloc] init]; + customerContext.neverRetrieveCustomer = YES; + vc = [[STPPaymentOptionsViewController alloc] initWithConfiguration:configuration + theme:[STPTheme defaultTheme] + customerContext:customerContext + delegate:self]; + } + break; + + case LocalizedScreenShippingAddressVC: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.requiredShippingAddressFields = [NSSet setWithObjects:STPContactFieldPostalAddress, STPContactFieldEmailAddress, STPContactFieldPhoneNumber, STPContactFieldName, nil]; + STPUserInformation *prefilledInfo = [[STPUserInformation alloc] init]; + STPAddress *billingAddress = [[STPAddress alloc] init]; + billingAddress.name = @"Test"; + billingAddress.email = @"test@test.com"; + billingAddress.phone = @"9311111111"; + billingAddress.line1 = @"Test"; + billingAddress.line2 = @"Test"; + billingAddress.postalCode = @"1001"; + billingAddress.city = @"Kabul"; + billingAddress.state = @"Kabul"; + billingAddress.country = @"AF"; + prefilledInfo.billingAddress = billingAddress; + + STPShippingAddressViewController *shippingAddressVC = [[STPShippingAddressViewController alloc] initWithConfiguration:configuration + theme:[STPTheme defaultTheme] + currency:@"usd" + shippingAddress:nil + selectedShippingMethod:nil + prefilledInformation:prefilledInfo]; + shippingAddressVC.delegate = self; + vc = shippingAddressVC; + } + break; + + case LocalizedScreenShippingAddressVCBadAddress: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.requiredShippingAddressFields = [NSSet setWithObjects:STPContactFieldPostalAddress, STPContactFieldEmailAddress, STPContactFieldPhoneNumber, STPContactFieldName, nil]; + STPUserInformation *prefilledInfo = [[STPUserInformation alloc] init]; + STPAddress *billingAddress = [[STPAddress alloc] init]; + billingAddress.name = @"Test"; + billingAddress.email = @"test@test.com"; + billingAddress.phone = @"9311111111"; + billingAddress.line1 = @"Test"; + billingAddress.line2 = @"Test"; + billingAddress.postalCode = @"90026"; + billingAddress.city = @"Kabul"; + billingAddress.state = @"Kabul"; + billingAddress.country = @"US"; // We're just going to hard code that "US" country triggers failure below + prefilledInfo.billingAddress = billingAddress; + + STPShippingAddressViewController *shippingAddressVC = [[STPShippingAddressViewController alloc] initWithConfiguration:configuration + theme:[STPTheme defaultTheme] + currency:@"usd" + shippingAddress:nil + selectedShippingMethod:nil + prefilledInformation:prefilledInfo]; + shippingAddressVC.delegate = self; + vc = shippingAddressVC; + } + break; + + case LocalizedScreenShippingAddressVCDelivery: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.shippingType = STPShippingTypeDelivery; + configuration.requiredShippingAddressFields = [NSSet setWithObjects:STPContactFieldPostalAddress, STPContactFieldEmailAddress, STPContactFieldPhoneNumber, STPContactFieldName, nil]; + + STPShippingAddressViewController *shippingAddressVC = [[STPShippingAddressViewController alloc] initWithConfiguration:configuration + theme:[STPTheme defaultTheme] + currency:@"usd" + shippingAddress:nil + selectedShippingMethod:nil + prefilledInformation:nil]; + shippingAddressVC.delegate = self; + vc = shippingAddressVC; + } + break; + + case LocalizedScreenShippingAddressVCContact: + { + STPPaymentConfiguration *configuration = [[STPPaymentConfiguration alloc] init]; + configuration.requiredShippingAddressFields = [NSSet setWithObjects:STPContactFieldEmailAddress, STPContactFieldPhoneNumber, STPContactFieldName, nil]; + + STPShippingAddressViewController *shippingAddressVC = [[STPShippingAddressViewController alloc] initWithConfiguration:configuration + theme:[STPTheme defaultTheme] + currency:@"usd" + shippingAddress:nil + selectedShippingMethod:nil + prefilledInformation:nil]; + shippingAddressVC.delegate = self; + vc = shippingAddressVC; + } + break; + + } + [self.navigationController pushViewController:vc animated:NO]; +} + +#pragma mark - Card Text Field + +- (void)cardTextFieldViewControllerDidSelectDone { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + +#pragma mark - STPAddCardViewControllerDelegate + +- (void)addCardViewControllerDidCancel:(__unused STPAddCardViewController *)addCardViewController { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + +- (void)addCardViewController:(__unused STPAddCardViewController *)addCardViewController + didCreateToken:(__unused STPToken *)token + completion:(__unused STPErrorBlock)completion { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + +#pragma mark - STPPaymentOptionssViewControllerDelegate + +- (void)paymentOptionsViewController:(__unused STPPaymentOptionsViewController *)paymentOptionsViewController + didFailToLoadWithError:(__unused NSError *)error { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + +- (void)paymentOptionsViewControllerDidFinish:(__unused STPPaymentOptionsViewController *)paymentOptionsViewController { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + +- (void)paymentOptionsViewControllerDidCancel:(__unused STPPaymentOptionsViewController *)paymentOptionsViewController { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + + +#pragma mark - STPShippingAddressViewControllerDelegate + +- (void)shippingAddressViewControllerDidCancel:(__unused STPShippingAddressViewController *)addressViewController { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + + +- (void)shippingAddressViewController:(__unused STPShippingAddressViewController *)addressViewController + didEnterAddress:(STPAddress *)address + completion:(STPShippingMethodsCompletionBlock)completion { + PKShippingMethod *upsGround = [[PKShippingMethod alloc] init]; + upsGround.amount = [NSDecimalNumber decimalNumberWithString:@"0"]; + upsGround.label = @"UPS Ground"; + upsGround.detail = @"Arrives in 3-5 days"; + upsGround.identifier = @"ups_ground"; + PKShippingMethod *upsWorldwide = [[PKShippingMethod alloc] init]; + upsWorldwide.amount = [NSDecimalNumber decimalNumberWithString:@"10.99"]; + upsWorldwide.label = @"UPS Worldwide Express"; + upsWorldwide.detail = @"Arrives in 1-3 days"; + upsWorldwide.identifier = @"ups_worldwide"; + PKShippingMethod *fedEx = [[PKShippingMethod alloc] init]; + fedEx.amount = [NSDecimalNumber decimalNumberWithString:@"5.99"]; + fedEx.label = @"FedEx"; + fedEx.detail = @"Arrives tomorrow"; + fedEx.identifier = @"fedex"; + + if (address.country == nil || [address.country isEqualToString:@"US"]) { + completion(STPShippingStatusInvalid, nil, nil, nil); + } else { + completion(STPShippingStatusValid, nil, @[upsGround, upsWorldwide, fedEx], fedEx); + } +} + +- (void)shippingAddressViewController:(__unused STPShippingAddressViewController *)addressViewController + didFinishWithAddress:(__unused STPAddress *)address + shippingMethod:(nullable __unused PKShippingMethod *)method { + [self.navigationController popToRootViewControllerAnimated:NO]; +} + +@end + diff --git a/LocalizationTester/da.lproj/LaunchScreen.strings b/LocalizationTester/da.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/da.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/de.lproj/LaunchScreen.strings b/LocalizationTester/de.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/de.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/en.lproj/LaunchScreen.strings b/LocalizationTester/en.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/en.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/es-AR.lproj/LaunchScreen.strings b/LocalizationTester/es-AR.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/es-AR.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/es.lproj/LaunchScreen.strings b/LocalizationTester/es.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/es.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/fi.lproj/LaunchScreen.strings b/LocalizationTester/fi.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/fi.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/fr-CA.lproj/LaunchScreen.strings b/LocalizationTester/fr-CA.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/fr-CA.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/fr.lproj/LaunchScreen.strings b/LocalizationTester/fr.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/fr.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/it.lproj/LaunchScreen.strings b/LocalizationTester/it.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/it.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/ja.lproj/LaunchScreen.strings b/LocalizationTester/ja.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/ja.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/main.m b/LocalizationTester/main.m new file mode 100644 index 00000000000..616a37d439f --- /dev/null +++ b/LocalizationTester/main.m @@ -0,0 +1,16 @@ +// +// main.m +// LocalizationTester +// +// Created by Cameron Sabol on 12/11/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/LocalizationTester/nb.lproj/LaunchScreen.strings b/LocalizationTester/nb.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/nb.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/nl.lproj/LaunchScreen.strings b/LocalizationTester/nl.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/nl.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/nn-NO.lproj/LaunchScreen.strings b/LocalizationTester/nn-NO.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/nn-NO.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/pt-BR.lproj/LaunchScreen.strings b/LocalizationTester/pt-BR.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/pt-BR.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/pt-PT.lproj/LaunchScreen.strings b/LocalizationTester/pt-PT.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/pt-PT.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/sv.lproj/LaunchScreen.strings b/LocalizationTester/sv.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/sv.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTester/zh-Hans.lproj/LaunchScreen.strings b/LocalizationTester/zh-Hans.lproj/LaunchScreen.strings new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/LocalizationTester/zh-Hans.lproj/LaunchScreen.strings @@ -0,0 +1 @@ + diff --git a/LocalizationTesterUITests/Info.plist b/LocalizationTesterUITests/Info.plist new file mode 100644 index 00000000000..6c40a6cd0c4 --- /dev/null +++ b/LocalizationTesterUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/LocalizationTesterUITests/LocalizationTesterUITests.m b/LocalizationTesterUITests/LocalizationTesterUITests.m new file mode 100644 index 00000000000..7bd3440efb7 --- /dev/null +++ b/LocalizationTesterUITests/LocalizationTesterUITests.m @@ -0,0 +1,164 @@ +// +// LocalizationTesterUITests.m +// LocalizationTesterUITests +// +// Created by Cameron Sabol on 12/11/18. +// Copyright © 2018 Stripe, Inc. All rights reserved. +// + +#import + +@interface LocalizationTesterUITests : XCTestCase + +@end + +@implementation LocalizationTesterUITests + +- (void)setUp { + [super setUp]; + + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + self.continueAfterFailure = NO; + // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. + [[[XCUIApplication alloc] init] launch]; + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testVisitAll { + XCUIApplication *app = [[XCUIApplication alloc] init]; + XCUIElementQuery *tablesQuery = app.tables; + +#pragma mark - Visit Payment Text Field + [tablesQuery.staticTexts[@"Payment Card Text Field"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"CardFieldViewControllerDoneButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Payment Card Text Field"]; + + [app.navigationBars.buttons[@"CardFieldViewControllerDoneButtonIdentifier"] tap]; + +#pragma mark - Visit Add Card VC (default) + [tablesQuery.staticTexts[@"Add Card VC Standard"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"AddCardViewControllerNavBarCancelButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Add Card VC Standard"]; + + [app.buttons[@"AddCardViewControllerNavBarDoneButtonIdentifier"] tap]; + XCUIElement *errorAlert = [app.alerts elementBoundByIndex:0]; + [self _waitForElementToAppear:errorAlert]; + [self _takeScreenShotNamed:@"Add Card VC Alert" suppressAutoScroll:YES]; + [[errorAlert.buttons elementBoundByIndex:0] tap]; // dismiss alert + [app.navigationBars.buttons[@"AddCardViewControllerNavBarCancelButtonIdentifier"] tap]; // back + +#pragma mark - Visit Add Card VC (prefilled shipping) + [tablesQuery.staticTexts[@"Add Card VC Prefilled Shipping"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"AddCardViewControllerNavBarCancelButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Add Card VC Prefilled Shipping"]; + [app.navigationBars.buttons[@"AddCardViewControllerNavBarCancelButtonIdentifier"] tap]; // back + +#pragma mark - Visit Add Card VC (prefilled delivery) + [tablesQuery.staticTexts[@"Add Card VC Prefilled Delivery"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"AddCardViewControllerNavBarCancelButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Add Card VC Prefilled Delivery"]; + [app.navigationBars.buttons[@"AddCardViewControllerNavBarCancelButtonIdentifier"] tap]; // back + +#pragma mark - Visit Payment Options VC + [tablesQuery.staticTexts[@"Payment Options VC"] tap]; + [self _waitForElementToAppear:tablesQuery.cells[@"PaymentOptionsTableViewAddNewCardButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Payment Options VC"]; + [app.buttons[@"PaymentOptionsViewControllerCancelButtonIdentifier"] tap]; // back + +#pragma mark - Visit Payment Options VC (loading) + [tablesQuery.staticTexts[@"Payment Options VC Loading"] tap]; + [self _waitForElementToAppear:app.buttons[@"CoreViewControllerCancelIdentifier"]]; + [self _takeScreenShotNamed:@"Payment Options VC Loading"]; + [app.buttons[@"CoreViewControllerCancelIdentifier"] tap]; // back + +#pragma mark - Visit the Shipping Address VC + [tablesQuery.staticTexts[@"Shipping Address VC"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"ShippingViewControllerNextButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Shipping Address VC"]; + + // Fill out the shipping Info + [tablesQuery.buttons[@"ShippingAddressViewControllerUseBillingButton"] tap]; + + // Go to Shipping Methods + [app.navigationBars.buttons[@"ShippingViewControllerNextButtonIdentifier"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"ShippingMethodsViewControllerDoneButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Shipping Methods VC"]; + + // Back to main menu + [app.navigationBars.buttons[@"ShippingMethodsViewControllerDoneButtonIdentifier"] tap]; + +#pragma mark - Visit the Shipping Address VC Bad Address + [tablesQuery.staticTexts[@"Shipping Address VC Bad Address"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"ShippingViewControllerNextButtonIdentifier"]]; + + // Fill out the shipping Info + [tablesQuery.buttons[@"ShippingAddressViewControllerUseBillingButton"] tap]; + + // Try to go to Shipping Methods + [app.navigationBars.buttons[@"ShippingViewControllerNextButtonIdentifier"] tap]; + + errorAlert = [app.alerts elementBoundByIndex:0]; + [self _waitForElementToAppear:errorAlert]; + [self _takeScreenShotNamed:@"Shipping Address VC Bad Address Alert" suppressAutoScroll:YES]; + [[errorAlert.buttons elementBoundByIndex:0] tap]; // dismiss alert + [app.navigationBars.buttons[@"CoreViewControllerCancelIdentifier"] tap]; + +#pragma mark - Visit the Shipping Info VC for Delivery + [tablesQuery.staticTexts[@"Shipping Address VC for Delivery"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"ShippingViewControllerNextButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Shipping Address VC for Delivery"]; + + // Back to main menu + [app.navigationBars.buttons[@"CoreViewControllerCancelIdentifier"] tap]; + +#pragma mark - Visit the Shipping Info VC for Delivery + [tablesQuery.staticTexts[@"Shipping Address VC for Contact"] tap]; + [self _waitForElementToAppear:app.navigationBars.buttons[@"ShippingViewControllerNextButtonIdentifier"]]; + [self _takeScreenShotNamed:@"Shipping Address VC for Contact"]; + + // Back to main menu + [app.navigationBars.buttons[@"CoreViewControllerCancelIdentifier"] tap]; +} + +#pragma mark - Helpers + +- (void)_takeScreenShotNamed:(NSString *)name { + [self _takeScreenShotNamed:name suppressAutoScroll:NO]; +} + +- (void)_takeScreenShotNamed:(NSString *)name suppressAutoScroll:(BOOL)suppressAutoScroll { + XCUIApplication *app = [[XCUIApplication alloc] init]; + XCUIElement *table = [app.tables elementBoundByIndex:0]; + XCUIElement *lastCell = [table.cells elementBoundByIndex:table.cells.count - 1]; + NSInteger viewPortScreen = 0; + + do { + XCUIScreenshot *screenshot = [app.windows.firstMatch screenshot]; + XCTAttachment *attachment = [XCTAttachment attachmentWithScreenshot:screenshot]; + attachment.lifetime = XCTAttachmentLifetimeKeepAlways; + attachment.name = viewPortScreen > 0 ? [NSString stringWithFormat:@"%@-%ld", name, (long)viewPortScreen] : name; + [self addAttachment:attachment]; + + viewPortScreen += 1; + if (!suppressAutoScroll && + lastCell.exists && !CGRectIsEmpty(lastCell.frame) && !CGRectContainsRect(app.windows.firstMatch.frame, lastCell.frame)) { + [app swipeUp]; + } else { + break; + } + } while (lastCell.exists && viewPortScreen < 4); // viewPortScreen < 4 as sanity check to avoid infinite loop +} + +- (void)_waitForElementToAppear:(XCUIElement *)element { + XCTAssert([element waitForExistenceWithTimeout:5], "An exepected element did not appear on screen: %@", element); +} + +@end diff --git a/Stripe.xcodeproj/project.pbxproj b/Stripe.xcodeproj/project.pbxproj index b10f4c84ffb..75d45f3970b 100644 --- a/Stripe.xcodeproj/project.pbxproj +++ b/Stripe.xcodeproj/project.pbxproj @@ -333,6 +333,15 @@ 04FCFA191BD59A8C00297732 /* STPCategoryLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 04FCFA171BD59A8C00297732 /* STPCategoryLoader.h */; }; 3617A51420FE5BBB001A9E6A /* NSLocale+STPSwizzling.h in Headers */ = {isa = PBXBuildFile; fileRef = 3617A51220FE5BBB001A9E6A /* NSLocale+STPSwizzling.h */; }; 3617A51520FE5BBB001A9E6A /* NSLocale+STPSwizzling.m in Sources */ = {isa = PBXBuildFile; fileRef = 3617A51320FE5BBB001A9E6A /* NSLocale+STPSwizzling.m */; }; + 3620B63021C41E08009FC6FB /* MockCustomerContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 3620B62F21C41E08009FC6FB /* MockCustomerContext.m */; }; + 3650AA4221C07E3C002B0893 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3650AA4121C07E3C002B0893 /* AppDelegate.m */; }; + 3650AA4521C07E3C002B0893 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3650AA4421C07E3C002B0893 /* ViewController.m */; }; + 3650AA4A21C07E3D002B0893 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3650AA4921C07E3D002B0893 /* Assets.xcassets */; }; + 3650AA4D21C07E3D002B0893 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3650AA4B21C07E3D002B0893 /* LaunchScreen.storyboard */; }; + 3650AA5021C07E3D002B0893 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3650AA4F21C07E3D002B0893 /* main.m */; }; + 3650AA5A21C07E3D002B0893 /* LocalizationTesterUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3650AA5921C07E3D002B0893 /* LocalizationTesterUITests.m */; }; + 365FC5A921C18F1A0092ADB0 /* Stripe.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04CDB4421A5F2E1800B854EE /* Stripe.framework */; }; + 365FC5AB21C18F550092ADB0 /* Stripe.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 04CDB4421A5F2E1800B854EE /* Stripe.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3691EB712119111A008C49E1 /* STPCardValidator+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 3691EB6F2119111A008C49E1 /* STPCardValidator+Private.h */; }; 3691EB722119111A008C49E1 /* STPCardValidator+Private.m in Sources */ = {isa = PBXBuildFile; fileRef = 3691EB702119111A008C49E1 /* STPCardValidator+Private.m */; }; 3691EB74211A4F31008C49E1 /* STPShippingAddressViewControllerTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 3691EB73211A4F31008C49E1 /* STPShippingAddressViewControllerTest.m */; }; @@ -917,6 +926,20 @@ remoteGlobalIDString = 049E84AA1A605D93000B66CD; remoteInfo = StripeiOSStatic; }; + 3650AA5621C07E3D002B0893 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 11C74B8F164043050071C2CA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3650AA3D21C07E3C002B0893; + remoteInfo = LocalizationTester; + }; + 3650AA6221C087C1002B0893 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 11C74B8F164043050071C2CA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 04CDB4411A5F2E1800B854EE; + remoteInfo = StripeiOS; + }; C1B630D91D1D86E100A05285 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 11C74B8F164043050071C2CA /* Project object */; @@ -949,6 +972,17 @@ name = "Copy Files"; runOnlyForDeploymentPostprocessing = 0; }; + 365FC5AC21C18F550092ADB0 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 365FC5AB21C18F550092ADB0 /* Stripe.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; F15AC18F1DBA9CC10009EADE /* CopyFiles */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -1162,18 +1196,49 @@ 11C74B9B164043050071C2CA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 3617A51220FE5BBB001A9E6A /* NSLocale+STPSwizzling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSLocale+STPSwizzling.h"; sourceTree = ""; }; 3617A51320FE5BBB001A9E6A /* NSLocale+STPSwizzling.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSLocale+STPSwizzling.m"; sourceTree = ""; }; + 3620B62E21C41E08009FC6FB /* MockCustomerContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockCustomerContext.h; sourceTree = ""; }; + 3620B62F21C41E08009FC6FB /* MockCustomerContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MockCustomerContext.m; sourceTree = ""; }; + 3650AA3E21C07E3C002B0893 /* LocalizationTester.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LocalizationTester.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3650AA4021C07E3C002B0893 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 3650AA4121C07E3C002B0893 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 3650AA4321C07E3C002B0893 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 3650AA4421C07E3C002B0893 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 3650AA4921C07E3D002B0893 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3650AA4C21C07E3D002B0893 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 3650AA4E21C07E3D002B0893 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3650AA4F21C07E3D002B0893 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 3650AA5521C07E3D002B0893 /* LocalizationTesterUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LocalizationTesterUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3650AA5921C07E3D002B0893 /* LocalizationTesterUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LocalizationTesterUITests.m; sourceTree = ""; }; + 3650AA5B21C07E3D002B0893 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 3691EB6F2119111A008C49E1 /* STPCardValidator+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "STPCardValidator+Private.h"; sourceTree = ""; }; 3691EB702119111A008C49E1 /* STPCardValidator+Private.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "STPCardValidator+Private.m"; sourceTree = ""; }; 3691EB73211A4F31008C49E1 /* STPShippingAddressViewControllerTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = STPShippingAddressViewControllerTest.m; sourceTree = ""; }; - 36D153B521AE0FDC00567EFE /* da */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = da; path = Localizations/da.lproj/Localizable.strings; sourceTree = ""; }; - 36D153B621AE101F00567EFE /* es-AR */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = "es-AR"; path = "Localizations/es-AR.lproj/Localizable.strings"; sourceTree = ""; }; - 36D153B721AE106D00567EFE /* fr-CA */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "Localizations/fr-CA.lproj/Localizable.strings"; sourceTree = ""; }; - 36D153B821AE10E300567EFE /* nn-NO */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = "nn-NO"; path = "Localizations/nn-NO.lproj/Localizable.strings"; sourceTree = ""; }; - 36D153B921AE111500567EFE /* pt-BR */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "Localizations/pt-BR.lproj/Localizable.strings"; sourceTree = ""; }; - 36D153BA21AE111F00567EFE /* pt-PT */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "Localizations/pt-PT.lproj/Localizable.strings"; sourceTree = ""; }; - 36D153BB21AE11CF00567EFE /* sv */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = sv; path = Localizations/sv.lproj/Localizable.strings; sourceTree = ""; }; + 36BE41CC21CB0B600054EAE5 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41CE21CB0B610054EAE5 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 36BE41D021CB0B620054EAE5 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41D221CB0B630054EAE5 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41D421CB0B640054EAE5 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41D621CB0B640054EAE5 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41D821CB0B650054EAE5 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41DA21CB0B660054EAE5 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41DC21CB0B670054EAE5 /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41DE21CB0B670054EAE5 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41E021CB0B680054EAE5 /* da */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = da; path = da.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36BE41E221CB0B680054EAE5 /* es-AR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-AR"; path = "es-AR.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 36BE41E421CB0B690054EAE5 /* fr-CA */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "fr-CA.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 36BE41E621CB0B690054EAE5 /* nn-NO */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "nn-NO"; path = "nn-NO.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 36BE41E821CB0B6A0054EAE5 /* pt-BR */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "pt-BR.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 36BE41EA21CB0B6B0054EAE5 /* pt-PT */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "pt-PT.lproj/LaunchScreen.strings"; sourceTree = ""; }; + 36BE41EC21CB0B6C0054EAE5 /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/LaunchScreen.strings; sourceTree = ""; }; + 36D153B521AE0FDC00567EFE /* da */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = da; path = Localizations/da.lproj/Localizable.strings; sourceTree = ""; }; + 36D153B621AE101F00567EFE /* es-AR */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "es-AR"; path = "Localizations/es-AR.lproj/Localizable.strings"; sourceTree = ""; }; + 36D153B721AE106D00567EFE /* fr-CA */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "fr-CA"; path = "Localizations/fr-CA.lproj/Localizable.strings"; sourceTree = ""; }; + 36D153B821AE10E300567EFE /* nn-NO */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "nn-NO"; path = "Localizations/nn-NO.lproj/Localizable.strings"; sourceTree = ""; }; + 36D153B921AE111500567EFE /* pt-BR */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "pt-BR"; path = "Localizations/pt-BR.lproj/Localizable.strings"; sourceTree = ""; }; + 36D153BA21AE111F00567EFE /* pt-PT */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "pt-PT"; path = "Localizations/pt-PT.lproj/Localizable.strings"; sourceTree = ""; }; + 36D153BB21AE11CF00567EFE /* sv */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = sv; path = Localizations/sv.lproj/Localizable.strings; sourceTree = ""; }; 4A0D74F918F6106100966D7B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; - 7E0B1132203572FB00271AD3 /* fi */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = fi; path = Localizations/fi.lproj/Localizable.strings; sourceTree = ""; }; + 7E0B1132203572FB00271AD3 /* fi */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fi; path = Localizations/fi.lproj/Localizable.strings; sourceTree = ""; }; 8B013C881F1E784A00DD831B /* STPPaymentConfigurationTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STPPaymentConfigurationTest.m; sourceTree = ""; }; 8B39127F20E2F6A500098401 /* BancontactSource.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = BancontactSource.json; sourceTree = ""; }; 8B39128120E2F99600098401 /* EPSSource.json */ = {isa = PBXFileReference; lastKnownFileType = text.json; path = EPSSource.json; sourceTree = ""; }; @@ -1421,14 +1486,14 @@ F13FCA571F8BFFCC00EB69B2 /* STPCustomer+SourceTuple.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "STPCustomer+SourceTuple.h"; sourceTree = ""; }; F13FCA581F8BFFCC00EB69B2 /* STPCustomer+SourceTuple.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "STPCustomer+SourceTuple.m"; sourceTree = ""; }; F148ABC31D5D334B0014FD92 /* STPLocalizationUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STPLocalizationUtils.m; sourceTree = ""; }; - F148ABE71D5E805A0014FD92 /* en */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = en; path = Localizations/en.lproj/Localizable.strings; sourceTree = ""; }; - F148ABEA1D5E80790014FD92 /* zh-Hans */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "Localizations/zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; - F148ABEC1D5E80860014FD92 /* de */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = de; path = Localizations/de.lproj/Localizable.strings; sourceTree = ""; }; - F148ABED1D5E808B0014FD92 /* es */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = es; path = Localizations/es.lproj/Localizable.strings; sourceTree = ""; }; - F148ABEE1D5E80990014FD92 /* it */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = it; path = Localizations/it.lproj/Localizable.strings; sourceTree = ""; }; - F148ABEF1D5E809D0014FD92 /* ja */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = ja; path = Localizations/ja.lproj/Localizable.strings; sourceTree = ""; }; - F148ABF01D5E80A00014FD92 /* nl */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = nl; path = Localizations/nl.lproj/Localizable.strings; sourceTree = ""; }; - F148ABF11D5E81EB0014FD92 /* fr */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = fr; path = Localizations/fr.lproj/Localizable.strings; sourceTree = ""; }; + F148ABE71D5E805A0014FD92 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = Localizations/en.lproj/Localizable.strings; sourceTree = ""; }; + F148ABEA1D5E80790014FD92 /* zh-Hans */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "Localizations/zh-Hans.lproj/Localizable.strings"; sourceTree = ""; }; + F148ABEC1D5E80860014FD92 /* de */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = de; path = Localizations/de.lproj/Localizable.strings; sourceTree = ""; }; + F148ABED1D5E808B0014FD92 /* es */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = es; path = Localizations/es.lproj/Localizable.strings; sourceTree = ""; }; + F148ABEE1D5E80990014FD92 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = Localizations/it.lproj/Localizable.strings; sourceTree = ""; }; + F148ABEF1D5E809D0014FD92 /* ja */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = ja; path = Localizations/ja.lproj/Localizable.strings; sourceTree = ""; }; + F148ABF01D5E80A00014FD92 /* nl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = nl; path = Localizations/nl.lproj/Localizable.strings; sourceTree = ""; }; + F148ABF11D5E81EB0014FD92 /* fr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = fr; path = Localizations/fr.lproj/Localizable.strings; sourceTree = ""; }; F14C872E1D4FCDBA00C7CC6A /* STPPaymentContextApplePayTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = STPPaymentContextApplePayTest.m; sourceTree = ""; }; F1510AFC1D5A4C93000731AD /* stp_card_amex_template.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = stp_card_amex_template.png; sourceTree = ""; }; F1510AFD1D5A4C93000731AD /* stp_card_amex_template@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stp_card_amex_template@2x.png"; sourceTree = ""; }; @@ -1547,6 +1612,21 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3650AA3B21C07E3C002B0893 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 365FC5A921C18F1A0092ADB0 /* Stripe.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3650AA5221C07E3D002B0893 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; C1B630B01D1D817900A05285 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -1730,18 +1810,18 @@ 04F39F091AEF2AFE005B926E /* BuildConfigurations */ = { isa = PBXGroup; children = ( - 04F39F0C1AEF2AFE005B926E /* Project-Shared.xcconfig */, 04F39F0A1AEF2AFE005B926E /* Project-Debug.xcconfig */, 04F39F0B1AEF2AFE005B926E /* Project-Release.xcconfig */, - 04F39F0F1AEF2AFE005B926E /* StripeiOS Tests-Shared.xcconfig */, + 04F39F0C1AEF2AFE005B926E /* Project-Shared.xcconfig */, 04F39F0D1AEF2AFE005B926E /* StripeiOS Tests-Debug.xcconfig */, 04F39F0E1AEF2AFE005B926E /* StripeiOS Tests-Release.xcconfig */, - 04F39F121AEF2AFE005B926E /* StripeiOS-Shared.xcconfig */, + 04F39F0F1AEF2AFE005B926E /* StripeiOS Tests-Shared.xcconfig */, 04F39F101AEF2AFE005B926E /* StripeiOS-Debug.xcconfig */, 04F39F111AEF2AFE005B926E /* StripeiOS-Release.xcconfig */, + 04F39F121AEF2AFE005B926E /* StripeiOS-Shared.xcconfig */, + 04F94D6F1D21CB20004FC826 /* StripeiOSResources.xcconfig */, 04F39F151AEF2AFE005B926E /* StripeiOSStatic.xcconfig */, 04F39F181AEF2AFE005B926E /* StripeiOSStaticFramework.xcconfig */, - 04F94D6F1D21CB20004FC826 /* StripeiOSResources.xcconfig */, ); path = BuildConfigurations; sourceTree = ""; @@ -1752,6 +1832,8 @@ 04CDB4D21A5F30A700B854EE /* Stripe */, 04CDB5281A5F3A9300B854EE /* StripeTests */, C1B630B41D1D817900A05285 /* StripeiOSResources */, + 3650AA3F21C07E3C002B0893 /* LocalizationTester */, + 3650AA5821C07E3D002B0893 /* LocalizationTesterUITests */, 11C74B9A164043050071C2CA /* Frameworks */, 11C74B99164043050071C2CA /* Products */, ); @@ -1764,6 +1846,8 @@ 045E7C031A5F41DE004751EF /* StripeiOS Tests.xctest */, 049E84AB1A605D93000B66CD /* libStripe.a */, C1B630B31D1D817900A05285 /* Stripe.bundle */, + 3650AA3E21C07E3C002B0893 /* LocalizationTester.app */, + 3650AA5521C07E3D002B0893 /* LocalizationTesterUITests.xctest */, ); name = Products; sourceTree = ""; @@ -1789,6 +1873,32 @@ name = Frameworks; sourceTree = ""; }; + 3650AA3F21C07E3C002B0893 /* LocalizationTester */ = { + isa = PBXGroup; + children = ( + 3650AA4021C07E3C002B0893 /* AppDelegate.h */, + 3650AA4121C07E3C002B0893 /* AppDelegate.m */, + 3650AA4921C07E3D002B0893 /* Assets.xcassets */, + 3650AA4E21C07E3D002B0893 /* Info.plist */, + 3650AA4B21C07E3D002B0893 /* LaunchScreen.storyboard */, + 3650AA4F21C07E3D002B0893 /* main.m */, + 3620B62E21C41E08009FC6FB /* MockCustomerContext.h */, + 3620B62F21C41E08009FC6FB /* MockCustomerContext.m */, + 3650AA4321C07E3C002B0893 /* ViewController.h */, + 3650AA4421C07E3C002B0893 /* ViewController.m */, + ); + path = LocalizationTester; + sourceTree = ""; + }; + 3650AA5821C07E3D002B0893 /* LocalizationTesterUITests */ = { + isa = PBXGroup; + children = ( + 3650AA5921C07E3D002B0893 /* LocalizationTesterUITests.m */, + 3650AA5B21C07E3D002B0893 /* Info.plist */, + ); + path = LocalizationTesterUITests; + sourceTree = ""; + }; 8BD2133A1F0458B7007F6FD1 /* Source */ = { isa = PBXGroup; children = ( @@ -2802,6 +2912,43 @@ productReference = 04CDB4421A5F2E1800B854EE /* Stripe.framework */; productType = "com.apple.product-type.framework"; }; + 3650AA3D21C07E3C002B0893 /* LocalizationTester */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3650AA6021C07E3D002B0893 /* Build configuration list for PBXNativeTarget "LocalizationTester" */; + buildPhases = ( + 3650AA3A21C07E3C002B0893 /* Sources */, + 3650AA3B21C07E3C002B0893 /* Frameworks */, + 3650AA3C21C07E3C002B0893 /* Resources */, + 365FC5AC21C18F550092ADB0 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 3650AA6321C087C1002B0893 /* PBXTargetDependency */, + ); + name = LocalizationTester; + productName = LocalizationTester; + productReference = 3650AA3E21C07E3C002B0893 /* LocalizationTester.app */; + productType = "com.apple.product-type.application"; + }; + 3650AA5421C07E3D002B0893 /* LocalizationTesterUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3650AA6121C07E3D002B0893 /* Build configuration list for PBXNativeTarget "LocalizationTesterUITests" */; + buildPhases = ( + 3650AA5121C07E3D002B0893 /* Sources */, + 3650AA5221C07E3D002B0893 /* Frameworks */, + 3650AA5321C07E3D002B0893 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 3650AA5721C07E3D002B0893 /* PBXTargetDependency */, + ); + name = LocalizationTesterUITests; + productName = LocalizationTesterUITests; + productReference = 3650AA5521C07E3D002B0893 /* LocalizationTesterUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; C1B630B21D1D817900A05285 /* StripeiOSResources */ = { isa = PBXNativeTarget; buildConfigurationList = C1B630B81D1D817900A05285 /* Build configuration list for PBXNativeTarget "StripeiOSResources" */; @@ -2842,6 +2989,18 @@ }; 04CDB4411A5F2E1800B854EE = { CreatedOnToolsVersion = 6.1.1; + DevelopmentTeam = Y28TH9SHX7; + }; + 3650AA3D21C07E3C002B0893 = { + CreatedOnToolsVersion = 9.4.1; + DevelopmentTeam = Y28TH9SHX7; + ProvisioningStyle = Automatic; + }; + 3650AA5421C07E3D002B0893 = { + CreatedOnToolsVersion = 9.4.1; + DevelopmentTeam = Y28TH9SHX7; + ProvisioningStyle = Automatic; + TestTargetID = 3650AA3D21C07E3C002B0893; }; C1B630B21D1D817900A05285 = { CreatedOnToolsVersion = 7.3.1; @@ -2870,6 +3029,7 @@ "pt-BR", "pt-PT", sv, + Base, ); mainGroup = 11C74B8D164043050071C2CA; productRefGroup = 11C74B99164043050071C2CA /* Products */; @@ -2881,6 +3041,8 @@ 049E84AA1A605D93000B66CD /* StripeiOSStatic */, 049E85221A607FFD000B66CD /* StripeiOSStaticFramework */, C1B630B21D1D817900A05285 /* StripeiOSResources */, + 3650AA3D21C07E3C002B0893 /* LocalizationTester */, + 3650AA5421C07E3D002B0893 /* LocalizationTesterUITests */, ); }; /* End PBXProject section */ @@ -3006,6 +3168,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3650AA3C21C07E3C002B0893 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3650AA4D21C07E3D002B0893 /* LaunchScreen.storyboard in Resources */, + 3650AA4A21C07E3D002B0893 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3650AA5321C07E3D002B0893 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; C1B630B11D1D817900A05285 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -3502,6 +3680,25 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 3650AA3A21C07E3C002B0893 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3650AA4521C07E3C002B0893 /* ViewController.m in Sources */, + 3620B63021C41E08009FC6FB /* MockCustomerContext.m in Sources */, + 3650AA5021C07E3D002B0893 /* main.m in Sources */, + 3650AA4221C07E3C002B0893 /* AppDelegate.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3650AA5121C07E3D002B0893 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3650AA5A21C07E3D002B0893 /* LocalizationTesterUITests.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; C1B630AF1D1D817900A05285 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -3522,6 +3719,16 @@ target = 049E84AA1A605D93000B66CD /* StripeiOSStatic */; targetProxy = 049E85261A608027000B66CD /* PBXContainerItemProxy */; }; + 3650AA5721C07E3D002B0893 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3650AA3D21C07E3C002B0893 /* LocalizationTester */; + targetProxy = 3650AA5621C07E3D002B0893 /* PBXContainerItemProxy */; + }; + 3650AA6321C087C1002B0893 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 04CDB4411A5F2E1800B854EE /* StripeiOS */; + targetProxy = 3650AA6221C087C1002B0893 /* PBXContainerItemProxy */; + }; C1B630DA1D1D86E100A05285 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = C1B630B21D1D817900A05285 /* StripeiOSResources */; @@ -3530,6 +3737,31 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ + 3650AA4B21C07E3D002B0893 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3650AA4C21C07E3D002B0893 /* Base */, + 36BE41CC21CB0B600054EAE5 /* en */, + 36BE41CE21CB0B610054EAE5 /* zh-Hans */, + 36BE41D021CB0B620054EAE5 /* de */, + 36BE41D221CB0B630054EAE5 /* es */, + 36BE41D421CB0B640054EAE5 /* it */, + 36BE41D621CB0B640054EAE5 /* ja */, + 36BE41D821CB0B650054EAE5 /* nl */, + 36BE41DA21CB0B660054EAE5 /* fr */, + 36BE41DC21CB0B670054EAE5 /* fi */, + 36BE41DE21CB0B670054EAE5 /* nb */, + 36BE41E021CB0B680054EAE5 /* da */, + 36BE41E221CB0B680054EAE5 /* es-AR */, + 36BE41E421CB0B690054EAE5 /* fr-CA */, + 36BE41E621CB0B690054EAE5 /* nn-NO */, + 36BE41E821CB0B6A0054EAE5 /* pt-BR */, + 36BE41EA21CB0B6B0054EAE5 /* pt-PT */, + 36BE41EC21CB0B6C0054EAE5 /* sv */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; F148ABE61D5E805A0014FD92 /* Localizable.strings */ = { isa = PBXVariantGroup; children = ( @@ -3603,6 +3835,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 04F39F101AEF2AFE005B926E /* StripeiOS-Debug.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = Y28TH9SHX7; }; name = Debug; }; @@ -3610,6 +3844,8 @@ isa = XCBuildConfiguration; baseConfigurationReference = 04F39F111AEF2AFE005B926E /* StripeiOS-Release.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + DEVELOPMENT_TEAM = Y28TH9SHX7; }; name = Release; }; @@ -3629,6 +3865,262 @@ }; name = Release; }; + 3650AA5C21C07E3D002B0893 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 04F39F101AEF2AFE005B926E /* StripeiOS-Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = Y28TH9SHX7; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = LocalizationTester/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = stripe.LocalizationTester; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 3650AA5D21C07E3D002B0893 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 04F39F111AEF2AFE005B926E /* StripeiOS-Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = Y28TH9SHX7; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + NDEBUG, + "$(STP_EXTRA_PREPROCESSOR_MACROS)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = LocalizationTester/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = stripe.LocalizationTester; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3650AA5E21C07E3D002B0893 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 04F39F101AEF2AFE005B926E /* StripeiOS-Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = Y28TH9SHX7; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = LocalizationTesterUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_BUNDLE_IDENTIFIER = stripe.LocalizationTesterUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = LocalizationTester; + }; + name = Debug; + }; + 3650AA5F21C07E3D002B0893 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 04F39F111AEF2AFE005B926E /* StripeiOS-Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = Y28TH9SHX7; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + INFOPLIST_FILE = LocalizationTesterUITests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 11.4; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_BUNDLE_IDENTIFIER = stripe.LocalizationTesterUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = LocalizationTester; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; C1B630B61D1D817900A05285 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 04F94D6F1D21CB20004FC826 /* StripeiOSResources.xcconfig */; @@ -3691,6 +4183,24 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 3650AA6021C07E3D002B0893 /* Build configuration list for PBXNativeTarget "LocalizationTester" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3650AA5C21C07E3D002B0893 /* Debug */, + 3650AA5D21C07E3D002B0893 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3650AA6121C07E3D002B0893 /* Build configuration list for PBXNativeTarget "LocalizationTesterUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3650AA5E21C07E3D002B0893 /* Debug */, + 3650AA5F21C07E3D002B0893 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; C1B630B81D1D817900A05285 /* Build configuration list for PBXNativeTarget "StripeiOSResources" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Stripe.xcodeproj/xcshareddata/xcschemes/LocalizationTester.xcscheme b/Stripe.xcodeproj/xcshareddata/xcschemes/LocalizationTester.xcscheme new file mode 100644 index 00000000000..0c86a8f2111 --- /dev/null +++ b/Stripe.xcodeproj/xcshareddata/xcschemes/LocalizationTester.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Stripe/Resources/Localizations/da.lproj/Localizable.strings b/Stripe/Resources/Localizations/da.lproj/Localizable.strings index c52c7064124..b69222de03a 100644 Binary files a/Stripe/Resources/Localizations/da.lproj/Localizable.strings and b/Stripe/Resources/Localizations/da.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/de.lproj/Localizable.strings b/Stripe/Resources/Localizations/de.lproj/Localizable.strings index 44d8bf4d2c6..c69b5845ae5 100644 Binary files a/Stripe/Resources/Localizations/de.lproj/Localizable.strings and b/Stripe/Resources/Localizations/de.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/en.lproj/Localizable.strings b/Stripe/Resources/Localizations/en.lproj/Localizable.strings index b7af1d7c4e3..cbca01f4d5a 100644 Binary files a/Stripe/Resources/Localizations/en.lproj/Localizable.strings and b/Stripe/Resources/Localizations/en.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/es-AR.lproj/Localizable.strings b/Stripe/Resources/Localizations/es-AR.lproj/Localizable.strings index ad255f62b5c..231469e08cc 100644 Binary files a/Stripe/Resources/Localizations/es-AR.lproj/Localizable.strings and b/Stripe/Resources/Localizations/es-AR.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/es.lproj/Localizable.strings b/Stripe/Resources/Localizations/es.lproj/Localizable.strings index 1af16dac78b..378b92c1799 100644 Binary files a/Stripe/Resources/Localizations/es.lproj/Localizable.strings and b/Stripe/Resources/Localizations/es.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/fi.lproj/Localizable.strings b/Stripe/Resources/Localizations/fi.lproj/Localizable.strings index 71bb55b39ab..ccad431bca7 100644 Binary files a/Stripe/Resources/Localizations/fi.lproj/Localizable.strings and b/Stripe/Resources/Localizations/fi.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/fr-CA.lproj/Localizable.strings b/Stripe/Resources/Localizations/fr-CA.lproj/Localizable.strings index 9d0799a392e..a8d7e26b952 100644 Binary files a/Stripe/Resources/Localizations/fr-CA.lproj/Localizable.strings and b/Stripe/Resources/Localizations/fr-CA.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/fr.lproj/Localizable.strings b/Stripe/Resources/Localizations/fr.lproj/Localizable.strings index adb31ffae10..3d510fba673 100644 Binary files a/Stripe/Resources/Localizations/fr.lproj/Localizable.strings and b/Stripe/Resources/Localizations/fr.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/it.lproj/Localizable.strings b/Stripe/Resources/Localizations/it.lproj/Localizable.strings index b88a5de5faa..82fa0f419f8 100644 Binary files a/Stripe/Resources/Localizations/it.lproj/Localizable.strings and b/Stripe/Resources/Localizations/it.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/ja.lproj/Localizable.strings b/Stripe/Resources/Localizations/ja.lproj/Localizable.strings index 29df1f2a5a1..80eec2d055e 100644 Binary files a/Stripe/Resources/Localizations/ja.lproj/Localizable.strings and b/Stripe/Resources/Localizations/ja.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/nb.lproj/Localizable.strings b/Stripe/Resources/Localizations/nb.lproj/Localizable.strings index 5264f8982e6..ad47ee59be9 100644 --- a/Stripe/Resources/Localizations/nb.lproj/Localizable.strings +++ b/Stripe/Resources/Localizations/nb.lproj/Localizable.strings @@ -1,27 +1,66 @@ /* {card brand} ending in {last4} */ "%@ Ending In %@" = "%1$@ som slutter på %2$@"; +/* Source type brand name */ +"3D Secure" = "3D Secure"; + +/* part of {Account} ending in {last4} */ +"Account" = "Konto"; + +/* Title for address entry section */ +"ACCOUNT HOLDER ADDRESS" = "KONTOHOLDERS ADRESSE"; + +/* Caption for Name field on bank info form */ +"Account Holder Name" = "Kortholders navn"; + /* Title for Add a Card view */ "Add a Card" = "Legg til kort"; +/* Title for SEPA Debit Account form */ +"Add a Direct Debit Account" = "Legg til en direktedebiteringskonto"; + /* Button to add a new credit card. */ "Add New Card…" = "Legg til nytt kort…"; /* Caption for Address field on address form */ "Address" = "Adresse"; +/* Source type brand name */ +"Alipay" = "Alipay"; + /* Text for Apple Pay payment method */ "Apple Pay" = "Apple Pay"; /* Caption for Apartment/Address line 2 field on address form */ "Apt." = "Leil."; +/* Text for back button */ +"Back" = "Tilbake"; + +/* Source type brand name */ +"Bancontact" = "Bancontact"; + +/* Title for bank picker section */ +"BANK" = "BANK"; + +/* Title for bank account information form */ +"BANK ACCOUNT INFORMATION" = "Bankkontoinformasjon"; + /* Title for billing address entry section */ "Billing Address" = "Fakturaadresse"; +/* Title for billing address entry section */ +"BILLING ADDRESS" = "FAKTURAADRESSE"; + +/* SEPA legal authorization text – must use official translations. */ +"By providing your IBAN and confirming this payment, you are authorizing %@ and Stripe, our payment service provider, to send instructions to your bank to debit your account and your bank to debit your account in accordance with those instructions. You are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited." = "Ved å oppgi IBAN og bekrefte denne betalingen, autoriserer du %@ og Stripe, betalingsleverandøren vår, til å sende instruksjoner til banken for å debitere kontoen din i henhold til disse instruksjonene. Du har krav på tilbakebetaling fra banken din i henhold til vilkårene i avtalen med banken din. Tilbakebetaling må påkreves innen 8 uker fra den dato da kontoen din ble belastet."; + /* Title for credit card number entry field */ "Card" = "Kort"; +/* Title for card number entry field */ +"CARD" = "KORT"; + /* accessibility label for text field */ "card number" = "kortnummer"; @@ -31,42 +70,96 @@ /* Title for contact info form */ "Contact" = "Kontakt"; +/* Title for contact info form */ +"CONTACT" = "KONTAKT"; + +/* Text for continue button */ +"Continue" = "Fortsett"; + /* Caption for Country field on address form */ "Country" = "Land"; +/* Title for country picker section */ +"COUNTRY" = "LAND"; + /* Caption for County field on address form (only countries that use county, like United Kingdom) */ "County" = "Fylke"; +/* Label for entering CVC in text field */ +"CVC" = "CVC"; + +/* Label for entering CVV in text field */ +"CVV" = "CVV"; + /* Title for delivery info form */ "Delivery" = "Leveranse"; /* Title for delivery address entry section */ "Delivery Address" = "Leveringsadresse"; +/* Title for delivery address entry section */ +"DELIVERY ADDRESS" = "LEVERINGSADRESSE"; + /* Caption for Email field on address form */ "Email" = "E-post"; +/* Source type brand name */ +"EPS" = "EPS"; + /* accessibility label for text field */ "expiration date" = "utløpsdato"; /* Label for free shipping method */ "Free" = "Gratis"; +/* Source type brand name */ +"Giropay" = "Giropay"; + +/* IBAN placeholder – don't translate */ +"IBAN" = "IBAN"; + +/* Source type brand name */ +"iDEAL" = "iDEAL"; + /* Shipping form error message */ "Invalid Shipping Address" = "Ugyldig leveringsadresse"; /* Title for screen when data is still loading from the network. */ -"Loading…" = "Laster…"; +"Loading…" = "Laster ..."; + +/* label for text field to enter card expiry */ +"MM/YY" = "MM/ÅÅ"; + +/* Title for payment options section */ +"MORE OPTIONS" = "FLERE ALTERNATIVER"; + +/* Source type brand name */ +"Multibanco" = "Multibanco"; /* Caption for Name field on address form */ "Name" = "Navn"; +/* Label for button to add a new credit or debit card */ +"New Card" = "Nytt kort"; + +/* Label for button to add a new SEPA Direct Debit account */ +"New Direct Debit Account" = "Ny direktedebiteringskonto"; + +/* Accessibility label for button to add a new SEPA Direct Debit account */ +"New SEPA Direct Debit Account" = "Ny SEPA-direktedebiteringskonto"; + /* Button to move to the next text entry field */ "Next" = "Neste"; /* No comment provided by engineer. */ "OK" = "OK"; +/* Source type brand name */ +"P24" = "P24"; + +/* Pay with {payment method} */ +"Pay with %@" = "Betal med %@"; + /* Title for Payment Method screen */ "Payment Method" = "Betalingsmåte"; @@ -85,27 +178,48 @@ /* Text for button to scan a credit card */ "Scan Card" = "Skann kort"; +/* part of {SEPA Account} ending in {last4} */ +"SEPA Account" = "SEPA-konto"; + +/* Source type brand name */ +"SEPA Direct Debit" = "SEPA-direktedebitering"; + /* Title for shipping info form */ "Shipping" = "Frakt"; /* Title for shipping address entry section */ "Shipping Address" = "Sendingsadresse"; +/* Title for shipping address entry section */ +"SHIPPING ADDRESS" = "FORSENDELSESADRESSE"; + /* Label for shipping method form */ "Shipping Method" = "Sendingsmetode"; +/* Label for shipping method form */ +"SHIPPING METHOD" = "FORSENDELSESMETODE"; + +/* Source type brand name */ +"SOFORT" = "SOFORT"; + /* Caption for State field on address form (only countries that use state , like United States) */ "State" = "Stat"; /* Caption for generalized state/province/region field on address form (not tied to a specific country's format) */ "State / Province / Region" = "Stat / Provins / Region"; +/* Error when the seleted payment method is not available (eg attempted to use 3D Secure on a card that does not support it). */ +"The selected payment method is not available." = "Den valgte betalingsmetoden er ikke tilgjengelig."; + /* Error when there is a problem processing the credit card */ "There was an error processing your card -- try again in a few seconds" = "Det oppstod en feil ved prosessering av kortet -- prøv igjen om et par sekunder"; /* Unexpected error, such as a 500 from Stripe or a JSON parse error */ "There was an unexpected error -- try again in a few seconds" = "En uventet feil har oppstått -- prøv igjen om et par sekunder"; +/* Default missing source type label */ +"Unknown" = "Ukjent"; + /* Button to fill shipping address from billing address. */ "Use Billing" = "Bruk fakturaadresse"; @@ -113,7 +227,10 @@ "Use Delivery" = "Bruk leveringsadresse"; /* Button to fill billing address from shipping address. */ -"Use Shipping" = "Bruk sendingsadresse"; +"Use Shipping" = "Bruk forsendelse"; + +/* You'll be taken to {bank name} to finish your purchase. */ +"You'll be taken to %@ to finish your purchase." = "Du tas med til %@ for å fullføre kjøpet ditt."; /* Error when the card has already expired */ "Your card has expired" = "Kortet ditt har utløpt"; diff --git a/Stripe/Resources/Localizations/nl.lproj/Localizable.strings b/Stripe/Resources/Localizations/nl.lproj/Localizable.strings index d9d7270b432..725fcb11704 100644 Binary files a/Stripe/Resources/Localizations/nl.lproj/Localizable.strings and b/Stripe/Resources/Localizations/nl.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/nn-NO.lproj/Localizable.strings b/Stripe/Resources/Localizations/nn-NO.lproj/Localizable.strings index c41323f0837..10caa74c822 100644 Binary files a/Stripe/Resources/Localizations/nn-NO.lproj/Localizable.strings and b/Stripe/Resources/Localizations/nn-NO.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/pt-BR.lproj/Localizable.strings b/Stripe/Resources/Localizations/pt-BR.lproj/Localizable.strings index 3206af77295..15ac1450368 100644 Binary files a/Stripe/Resources/Localizations/pt-BR.lproj/Localizable.strings and b/Stripe/Resources/Localizations/pt-BR.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/pt-PT.lproj/Localizable.strings b/Stripe/Resources/Localizations/pt-PT.lproj/Localizable.strings index 1da9f0067d6..2619132f9f3 100644 Binary files a/Stripe/Resources/Localizations/pt-PT.lproj/Localizable.strings and b/Stripe/Resources/Localizations/pt-PT.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/sv.lproj/Localizable.strings b/Stripe/Resources/Localizations/sv.lproj/Localizable.strings index f08d23df6d1..90058bb907b 100644 Binary files a/Stripe/Resources/Localizations/sv.lproj/Localizable.strings and b/Stripe/Resources/Localizations/sv.lproj/Localizable.strings differ diff --git a/Stripe/Resources/Localizations/zh-Hans.lproj/Localizable.strings b/Stripe/Resources/Localizations/zh-Hans.lproj/Localizable.strings index fcac9dcff5d..e635108305a 100644 Binary files a/Stripe/Resources/Localizations/zh-Hans.lproj/Localizable.strings and b/Stripe/Resources/Localizations/zh-Hans.lproj/Localizable.strings differ diff --git a/Stripe/STPAddCardViewController+Private.h b/Stripe/STPAddCardViewController+Private.h index 682124ba93e..85a5758e454 100644 --- a/Stripe/STPAddCardViewController+Private.h +++ b/Stripe/STPAddCardViewController+Private.h @@ -14,6 +14,8 @@ @interface STPAddCardViewController (Private) @property (nonatomic) STPAddress *shippingAddress; +@property (nonatomic) BOOL alwaysShowScanCardButton; +@property (nonatomic) BOOL alwaysEnableDoneButton; - (void)commonInitWithConfiguration:(STPPaymentConfiguration *)configuration; diff --git a/Stripe/STPAddCardViewController.m b/Stripe/STPAddCardViewController.m index 697b8b5e329..e102d242543 100644 --- a/Stripe/STPAddCardViewController.m +++ b/Stripe/STPAddCardViewController.m @@ -49,6 +49,8 @@ @interface STPAddCardViewController ()< UITableViewDelegate, UITableViewDataSource> +@property (nonatomic) BOOL alwaysShowScanCardButton; +@property (nonatomic) BOOL alwaysEnableDoneButton; @property (nonatomic) STPPaymentConfiguration *configuration; @property (nonatomic) STPAddress *shippingAddress; @property (nonatomic) BOOL hasUsedShippingAddress; @@ -105,7 +107,10 @@ - (void)createAndSetupViews { UIBarButtonItem *doneItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(nextPressed:)]; self.doneItem = doneItem; self.stp_navigationItemProxy.rightBarButtonItem = doneItem; - self.stp_navigationItemProxy.rightBarButtonItem.enabled = NO; + [self updateDoneButton]; + + self.stp_navigationItemProxy.leftBarButtonItem.accessibilityIdentifier = @"AddCardViewControllerNavBarCancelButtonIdentifier"; + self.stp_navigationItemProxy.rightBarButtonItem.accessibilityIdentifier = @"AddCardViewControllerNavBarDoneButtonIdentifier"; UIImageView *cardImageView = [[UIImageView alloc] initWithImage:[STPImageLibrary largeCardFrontImage]]; cardImageView.contentMode = UIViewContentModeCenter; @@ -177,7 +182,7 @@ - (void)viewDidLayoutSubviews { } - (void)setUpCardScanningIfAvailable { - if ([STPCardIOProxy isCardIOAvailable]) { + if ([STPCardIOProxy isCardIOAvailable] || self.alwaysShowScanCardButton) { self.cardIOProxy = [[STPCardIOProxy alloc] initWithDelegate:self]; self.cardHeaderView.buttonHidden = NO; [self.cardHeaderView.button setTitle:STPLocalizedString(@"Scan Card", @"Text for button to scan a credit card") forState:UIControlStateNormal]; @@ -186,6 +191,13 @@ - (void)setUpCardScanningIfAvailable { } } +- (void)setAlwaysEnableDoneButton:(BOOL)alwaysEnableDoneButton { + if (alwaysEnableDoneButton != _alwaysEnableDoneButton) { + _alwaysEnableDoneButton = alwaysEnableDoneButton; + [self updateDoneButton]; + } +} + - (void)presentCardIO { [self.cardIOProxy presentCardIOFromViewController:self]; } @@ -346,7 +358,7 @@ - (void)handleCardTokenizationError:(NSError *)error { - (void)updateDoneButton { self.stp_navigationItemProxy.rightBarButtonItem.enabled = (self.paymentCell.paymentField.isValid && self.addressViewModel.isValid - ); + ) || self.alwaysEnableDoneButton; } - (void)updateInputAccessoryVisiblity { diff --git a/Stripe/STPAddressFieldTableViewCell.m b/Stripe/STPAddressFieldTableViewCell.m index 61e616aa2ca..54fc1dfb97b 100644 --- a/Stripe/STPAddressFieldTableViewCell.m +++ b/Stripe/STPAddressFieldTableViewCell.m @@ -216,6 +216,32 @@ - (void)updateTextFieldsAndCaptions { } self.textField.accessibilityLabel = self.textField.placeholder; + self.textField.accessibilityIdentifier = [self accessibilityIdentifierForAddressField:self.type]; +} + +- (NSString *)accessibilityIdentifierForAddressField:(STPAddressFieldType)type { + switch (type) { + case STPAddressFieldTypeName: + return @"ShippingAddressFieldTypeNameIdentifier"; + case STPAddressFieldTypeLine1: + return @"ShippingAddressFieldTypeLine1Identifier"; + case STPAddressFieldTypeLine2: + return @"ShippingAddressFieldTypeLine2Identifier"; + case STPAddressFieldTypeCity: + return @"ShippingAddressFieldTypeCityIdentifier"; + case STPAddressFieldTypeState: + return @"ShippingAddressFieldTypeStateIdentifier"; + case STPAddressFieldTypeZip: + return @"ShippingAddressFieldTypeZipIdentifier"; + case STPAddressFieldTypeCountry: + return @"ShippingAddressFieldTypeCountryIdentifier"; + case STPAddressFieldTypePhone: + return @"ShippingAddressFieldTypePhoneIdentifier"; + case STPAddressFieldTypeEmail: + return @"ShippingAddressFieldTypeEmailIdentifier"; + default: + return @""; + } } + (NSString *)stateFieldCaptionForCountryCode:(NSString *)countryCode { diff --git a/Stripe/STPCoreViewController.m b/Stripe/STPCoreViewController.m index fae37e803a9..0fa4d275bae 100644 --- a/Stripe/STPCoreViewController.m +++ b/Stripe/STPCoreViewController.m @@ -58,6 +58,7 @@ - (void)commonInitWithTheme:(STPTheme *)theme { self.cancelItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(handleCancelTapped:)]; + self.cancelItem.accessibilityIdentifier = @"CoreViewControllerCancelIdentifier"; self.stp_navigationItemProxy.leftBarButtonItem = self.cancelItem; } diff --git a/Stripe/STPPaymentOptionsInternalViewController.m b/Stripe/STPPaymentOptionsInternalViewController.m index 7a1c0556dcb..598790d4442 100644 --- a/Stripe/STPPaymentOptionsInternalViewController.m +++ b/Stripe/STPPaymentOptionsInternalViewController.m @@ -94,6 +94,8 @@ - (void)createAndSetupViews { // Table view editing state [self.tableView setEditing:NO animated:NO]; [self reloadRightBarButtonItemWithTableViewIsEditing:self.tableView.isEditing animated:NO]; + + self.stp_navigationItemProxy.leftBarButtonItem.accessibilityIdentifier = @"PaymentOptionsViewControllerCancelButtonIdentifier"; } - (void)viewDidLayoutSubviews { @@ -243,6 +245,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N } else { [cell configureForNewCardRowWithTheme:self.theme]; + cell.accessibilityIdentifier = @"PaymentOptionsTableViewAddNewCardButtonIdentifier"; } return cell; diff --git a/Stripe/STPShippingAddressViewController.m b/Stripe/STPShippingAddressViewController.m index 617aef10599..8f2d60293a4 100644 --- a/Stripe/STPShippingAddressViewController.m +++ b/Stripe/STPShippingAddressViewController.m @@ -117,7 +117,8 @@ - (void)createAndSetupViews { self.nextItem = nextItem; self.stp_navigationItemProxy.rightBarButtonItem = nextItem; self.stp_navigationItemProxy.rightBarButtonItem.enabled = NO; - + self.stp_navigationItemProxy.rightBarButtonItem.accessibilityIdentifier = @"ShippingViewControllerNextButtonIdentifier"; + UIImageView *imageView = [[UIImageView alloc] initWithImage:[STPImageLibrary largeShippingImage]]; imageView.contentMode = UIViewContentModeCenter; imageView.frame = CGRectMake(0, 0, self.view.bounds.size.width, imageView.bounds.size.height + (57 * 2)); @@ -137,6 +138,7 @@ - (void)createAndSetupViews { forState:UIControlStateNormal]; [headerView.button addTarget:self action:@selector(useBillingAddress:) forControlEvents:UIControlEventTouchUpInside]; + headerView.button.accessibilityIdentifier = @"ShippingAddressViewControllerUseBillingButton"; NSSet *requiredFields = self.configuration.requiredShippingAddressFields; BOOL needsAddress = [requiredFields containsObject:STPContactFieldPostalAddress] && !self.addressViewModel.isValid; BOOL buttonVisible = (needsAddress diff --git a/Stripe/STPShippingMethodsViewController.m b/Stripe/STPShippingMethodsViewController.m index 5022a057125..82a763e2612 100644 --- a/Stripe/STPShippingMethodsViewController.m +++ b/Stripe/STPShippingMethodsViewController.m @@ -61,6 +61,7 @@ - (void)createAndSetupViews { UIBarButtonItem *doneItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(done:)]; self.doneItem = doneItem; self.stp_navigationItemProxy.rightBarButtonItem = doneItem; + self.stp_navigationItemProxy.rightBarButtonItem.accessibilityIdentifier = @"ShippingMethodsViewControllerDoneButtonIdentifier"; UIImageView *imageView = [[UIImageView alloc] initWithImage:[STPImageLibrary largeShippingImage]]; imageView.contentMode = UIViewContentModeCenter; diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_CA@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_CA@2x.png index 564852ccf17..2a71c5b6a86 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_CA@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_CA@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_GB@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_GB@2x.png index dcc1c95f28a..629a8df8a94 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_GB@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_GB@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_MX@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_MX@2x.png index 959a04b688a..49d9797fd93 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_MX@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_MX@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_US@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_US@2x.png index 03a60866ff6..585d980e2ee 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_US@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_US@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_delivery@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_delivery@2x.png index 928fed2453c..b62c023fe1b 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_delivery@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_no_country@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_no_country@2x.png index cb7e0f4bb0d..2c589934753 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_no_country@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testChinese_no_country@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_CA@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_CA@2x.png index 860a0683a6c..733e157d68e 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_CA@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_CA@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_GB@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_GB@2x.png index 035187746da..bf17994611b 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_GB@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_GB@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_MX@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_MX@2x.png index 8c6f4d135ca..b6b626d8fcb 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_MX@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_MX@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_US@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_US@2x.png index 01b31ca1f81..d4ea4bf2136 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_US@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_US@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_delivery@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_delivery@2x.png index 702484670e2..e821b8e81d0 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_delivery@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_no_country@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_no_country@2x.png index b9a538052e0..254a846ade7 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_no_country@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testDutch_no_country@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_CA@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_CA@2x.png index f88935153c5..6fb5f261dce 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_CA@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_CA@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_GB@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_GB@2x.png index 57b5df6a8e2..f7e74ffa4cc 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_GB@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_GB@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_MX@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_MX@2x.png index 4e832486fb2..f3e396f0e68 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_MX@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_MX@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_US@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_US@2x.png index 61ecf12db2f..f8cf4b80f21 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_US@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_US@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_delivery@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_delivery@2x.png index 0e6d5c4c39c..afe8def7b24 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_delivery@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_no_country@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_no_country@2x.png index 0e712ab23b2..9e381f35759 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_no_country@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testFrench_no_country@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_CA@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_CA@2x.png index ae196657523..df985eaa6b5 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_CA@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_CA@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_GB@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_GB@2x.png index 1e3a73857d5..733d566f89c 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_GB@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_GB@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_MX@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_MX@2x.png index 951809082ba..0f9d588b308 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_MX@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_MX@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_US@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_US@2x.png index 2e5e44529c3..5f2f056e197 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_US@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_US@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_delivery@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_delivery@2x.png index 807ad62c8f6..10a4287b2be 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_delivery@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_no_country@2x.png b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_no_country@2x.png index 1f0e9dc3210..99d39b8c283 100644 Binary files a/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_no_country@2x.png and b/Tests/ReferenceImages_64/STPAddCardViewControllerLocalizationTests/testSpanish_no_country@2x.png differ diff --git a/Tests/ReferenceImages_64/STPPaymentOptionsViewControllerLocalizationTests/testItalian@2x.png b/Tests/ReferenceImages_64/STPPaymentOptionsViewControllerLocalizationTests/testItalian@2x.png index 89b6c808afe..430b94aac33 100644 Binary files a/Tests/ReferenceImages_64/STPPaymentOptionsViewControllerLocalizationTests/testItalian@2x.png and b/Tests/ReferenceImages_64/STPPaymentOptionsViewControllerLocalizationTests/testItalian@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_delivery@2x.png b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_delivery@2x.png index 59b64dbd860..630118b850e 100644 Binary files a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_delivery@2x.png and b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_shipping@2x.png b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_shipping@2x.png index 51ffa4d5e71..84ecb925243 100644 Binary files a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_shipping@2x.png and b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testChinese_shipping@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_delivery@2x.png b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_delivery@2x.png index b029039bb85..916ddaf9451 100644 Binary files a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_delivery@2x.png and b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_shipping@2x.png b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_shipping@2x.png index a16d93353cc..ec9b97cbd23 100644 Binary files a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_shipping@2x.png and b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testDutch_shipping@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_delivery@2x.png b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_delivery@2x.png index 55666073f18..7b65a911200 100644 Binary files a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_delivery@2x.png and b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_shipping@2x.png b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_shipping@2x.png index 593cc5951aa..3c78c7894f3 100644 Binary files a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_shipping@2x.png and b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testFrench_shipping@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testGerman_delivery@2x.png b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testGerman_delivery@2x.png index 40e6247e6cb..d247fe31ec7 100644 Binary files a/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testGerman_delivery@2x.png and b/Tests/ReferenceImages_64/STPShippingAddressViewControllerLocalizationTests/testGerman_delivery@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testChinese@2x.png b/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testChinese@2x.png index 073d39bca96..f837c455ab4 100644 Binary files a/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testChinese@2x.png and b/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testChinese@2x.png differ diff --git a/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testFrench@2x.png b/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testFrench@2x.png index 5d32b91edd0..eb288960874 100644 Binary files a/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testFrench@2x.png and b/Tests/ReferenceImages_64/STPShippingMethodsViewControllerLocalizationTests/testFrench@2x.png differ diff --git a/ci_scripts/screenshot_localization_tester.sh b/ci_scripts/screenshot_localization_tester.sh new file mode 100755 index 00000000000..4af90e13151 --- /dev/null +++ b/ci_scripts/screenshot_localization_tester.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +for i in en,US zh-HANS,CN de,DE es,ES it,IT ja,JP nl,NL fr,FR fi,FI nb,NO da,DK pt-BR,BR pt-PT,PT sv,SE es-AR,AR fr-CA,CA nn,NO; do + #statements + IFS=","; + set -- $i; + xcodebuild clean test -workspace "${script_dir}/../Stripe.xcworkspace" -scheme "LocalizationTester" -configuration "Debug" -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 6s,OS=11.4" -resultBundlePath "${script_dir}/../build/loc_qa/$1_$2" -testLanguage $1 -testRegion $2 +done