From eca9c94641a8e4d030171c612f432872c82598cf Mon Sep 17 00:00:00 2001 From: Muhammad Fauzi Masykur Date: Fri, 18 Oct 2019 19:40:30 +0700 Subject: [PATCH] Fix several ios 13 issues (#475) * Implement WKWebView (#467) * updat fix missalignmnt (#428) * Fix/iphone x ui (#430) * fix UI for iphone X * change deployment target to ios 9. * update alfamart (#445) * update alfamart * update new alfa * fix alfamart (#447) * update alfamart * update new alfa * fix wording * adjust constraint for iphone x * remove network private api. * Hotfix/gross amount (#457) * add formattedCurrencyNumber helper * change itemDetails to grossAmount * fix missing alfamidi assets * fix gopay sandbox environment (#460) * remove network api (#456) * updat fix missalignmnt (#428) * Fix/iphone x ui (#430) * fix UI for iphone X * change deployment target to ios 9. * update alfamart (#445) * update alfamart * update new alfa * fix alfamart (#447) * update alfamart * update new alfa * fix wording * adjust constraint for iphone x * remove network private api. * bump podspec version * Develop (#458) * updat fix missalignmnt (#428) * Fix/iphone x ui (#430) * fix UI for iphone X * change deployment target to ios 9. * update alfamart (#445) * update alfamart * update new alfa * fix alfamart (#447) * update alfamart * update new alfa * fix wording * adjust constraint for iphone x * remove network private api. * Hotfix/gross amount (#457) * add formattedCurrencyNumber helper * change itemDetails to grossAmount * fix missing alfamidi assets * bump podspec version * add gopay observer on ApplicationDidBecomeActive. * remove unused code * bump podspec version * add uat environment (#464) * Implement wkwebview (#466) * replace uiwebview implementation with wkwebview * refactor method on checking transaction status by adding token as parameter. * update gopay to use the new method performCheckStatusTransactionWithToken * code cleanup * create fabric config * add line break * bump podspec version * fix threading issue * set to lightmode only. * set the modal presentation to always fullscreen * bump podspec version --- MidtransCoreKit.podspec | 2 +- .../MidtransCoreKit/Midtrans3DSController.m | 1 + MidtransCoreKit/MidtransCoreKit/MidtransClient.m | 4 +++- MidtransKit.podspec | 4 ++-- .../MidtransKit/classes/MidtransUIBaseViewController.m | 3 +++ .../classes/MidtransUIPaymentViewController.m | 10 ++++++++-- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/MidtransCoreKit.podspec b/MidtransCoreKit.podspec index cdc806039..8c74012a9 100644 --- a/MidtransCoreKit.podspec +++ b/MidtransCoreKit.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MidtransCoreKit" -s.version = "1.16.0" +s.version = "1.16.1" s.summary = "Veritrans mobile SDK beta version" s.homepage = "https://veritrans.co.id/" s.license = 'MIT' diff --git a/MidtransCoreKit/MidtransCoreKit/Midtrans3DSController.m b/MidtransCoreKit/MidtransCoreKit/Midtrans3DSController.m index bc1226093..712101f3d 100755 --- a/MidtransCoreKit/MidtransCoreKit/Midtrans3DSController.m +++ b/MidtransCoreKit/MidtransCoreKit/Midtrans3DSController.m @@ -78,6 +78,7 @@ - (void)closePressed:(id)sender { - (void)showWithCompletion:(void(^)(NSError *error))completion { UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:self]; + nvc.modalPresentationStyle = UIModalPresentationFullScreen; [self.rootViewController presentViewController:nvc animated:YES completion:nil]; self.completion = completion; } diff --git a/MidtransCoreKit/MidtransCoreKit/MidtransClient.m b/MidtransCoreKit/MidtransCoreKit/MidtransClient.m index 5d4d3c508..f90d99d26 100644 --- a/MidtransCoreKit/MidtransCoreKit/MidtransClient.m +++ b/MidtransCoreKit/MidtransCoreKit/MidtransClient.m @@ -95,7 +95,9 @@ - (void)requestCardBINForInstallmentWithCompletion:(void (^_Nullable)(NSArray *_ } if (completion) { - completion(contentData,nil); + dispatch_async(dispatch_get_main_queue(), ^{ + completion(contentData,nil); + }); } } diff --git a/MidtransKit.podspec b/MidtransKit.podspec index c1761aa0c..ef41e1d98 100644 --- a/MidtransKit.podspec +++ b/MidtransKit.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MidtransKit" -s.version = "1.16.0" +s.version = "1.16.1" s.summary = "Veritrans mobile SDK beta version" s.homepage = "https://veritrans.co.id/" s.license = 'MIT' @@ -17,7 +17,7 @@ s.source_files = 'MidtransKit/MidtransKit/**/*.{h,m}' s.resource_bundles = { 'MidtransKit' => ['MidtransKit/MidtransKit/resources/*'] } -s.dependency 'MidtransCoreKit', '1.16.0' +s.dependency 'MidtransCoreKit', '1.16.1' s.static_framework = true s.default_subspec = 'UI' diff --git a/MidtransKit/MidtransKit/classes/MidtransUIBaseViewController.m b/MidtransKit/MidtransKit/classes/MidtransUIBaseViewController.m index 89a5c8d8f..10d94869b 100644 --- a/MidtransKit/MidtransKit/classes/MidtransUIBaseViewController.m +++ b/MidtransKit/MidtransKit/classes/MidtransUIBaseViewController.m @@ -20,6 +20,9 @@ @implementation MidtransUIBaseViewController - (void)viewDidLoad { [super viewDidLoad]; //self.navigationItem.backBarButtonItem = [[VTBackBarButtonItem alloc] initWithTitle:UILocalizedString(@"Back", nil)]; + if (@available(iOS 13.0, *)) { + self.overrideUserInterfaceStyle = UIUserInterfaceStyleLight; + } } @end diff --git a/MidtransKit/MidtransKit/classes/MidtransUIPaymentViewController.m b/MidtransKit/MidtransKit/classes/MidtransUIPaymentViewController.m index bb7eceb1e..378129e59 100755 --- a/MidtransKit/MidtransKit/classes/MidtransUIPaymentViewController.m +++ b/MidtransKit/MidtransKit/classes/MidtransUIPaymentViewController.m @@ -23,12 +23,14 @@ - (instancetype)initWithToken:(MidtransTransactionTokenResponse *)token { VTPaymentListController *vc = [[VTPaymentListController alloc] initWithToken:token paymentMethodName:nil]; self = [[MidtransUIPaymentViewController alloc] initWithRootViewController:vc]; vc.paymentMethodSelected = nil; + self.modalPresentationStyle = UIModalPresentationFullScreen; return self; } - (instancetype)initCreditCardForm { VTPaymentListController *vc = [[VTPaymentListController alloc] initWithToken:nil paymentMethodName:nil]; vc.paymentMethodSelected = MIDTRANS_CREDIT_CARD_FORM; self = [[MidtransUIPaymentViewController alloc] initWithRootViewController:vc]; + self.modalPresentationStyle = UIModalPresentationFullScreen; return self; } @@ -112,10 +114,11 @@ - (instancetype)initWithToken:(MidtransTransactionTokenResponse *)token andPayme VTPaymentListController *vc = [[VTPaymentListController alloc] initWithToken:token paymentMethodName:nil]; vc.paymentMethodSelected = paymentMethodSelected; self = [[MidtransUIPaymentViewController alloc] initWithRootViewController:vc]; + self.modalPresentationStyle = UIModalPresentationFullScreen; return self; } -- (void)viewDidLoad { - [super viewDidLoad]; + +- (void)viewWillAppear:(BOOL)animated{ if ([[MidtransConfig shared] environment]!=MidtransServerEnvironmentProduction) { UIWindow *currentWindow = [UIApplication sharedApplication].keyWindow; @@ -126,6 +129,9 @@ - (void)viewDidLoad { [currentWindow addSubview:badgeImageView]; } +} +- (void)viewDidLoad { + [super viewDidLoad]; self.navigationBar.translucent = false; // to remove 1 px border below nav bar