From ef06afc8cf3d9717f9c27464c9c37090365489c7 Mon Sep 17 00:00:00 2001 From: Hans Knoechel Date: Sun, 7 Aug 2016 12:42:51 +0200 Subject: [PATCH] Show dialog on main-thread and using modal-utils --- iphone/Classes/TiPaypalPaymentProxy.m | 9 +++++---- iphone/Resources/README.md | 10 ---------- iphone/manifest | 2 +- iphone/titanium.xcconfig | 4 ++-- 4 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 iphone/Resources/README.md diff --git a/iphone/Classes/TiPaypalPaymentProxy.m b/iphone/Classes/TiPaypalPaymentProxy.m index 7f7cace..363da3d 100644 --- a/iphone/Classes/TiPaypalPaymentProxy.m +++ b/iphone/Classes/TiPaypalPaymentProxy.m @@ -51,9 +51,10 @@ -(void)show:(id)args return; } - [[[[TiApp app] controller] topPresentedController] presentViewController:[self paymentDialog] - animated:[TiUtils boolValue:animated def:YES] - completion:nil]; + TiThreadPerformOnMainThread(^{ + [[TiApp app] showModalController:[self paymentDialog] + animated:[TiUtils boolValue:animated def:YES]]; + }, NO); } -(void)setConfiguration:(id)value @@ -221,4 +222,4 @@ -(NSDictionary*)confirmationFromPayment:(PayPalPayment*)_payment return event; } -@end \ No newline at end of file +@end diff --git a/iphone/Resources/README.md b/iphone/Resources/README.md deleted file mode 100644 index bb6c641..0000000 --- a/iphone/Resources/README.md +++ /dev/null @@ -1,10 +0,0 @@ -Files in this folder are copied directory into the compiled product directory -when the iOS app is compiled: - - /build/iphone/build/Products//.app/ - -Place your module's iOS bundles and localization files in this folder. - -Files in this directory are copied directly on top of whatever files are already -in the build directory, so please be careful that your files don't clobber -essential project files or files from other modules. diff --git a/iphone/manifest b/iphone/manifest index 4ddeb93..bffd33e 100644 --- a/iphone/manifest +++ b/iphone/manifest @@ -2,7 +2,7 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 1.0.1 +version: 1.0.2 apiversion: 2 architectures: armv7 arm64 i386 x86_64 description: ti.paypal diff --git a/iphone/titanium.xcconfig b/iphone/titanium.xcconfig index d713f13..dd2b2b3 100644 --- a/iphone/titanium.xcconfig +++ b/iphone/titanium.xcconfig @@ -4,13 +4,13 @@ // OF YOUR TITANIUM SDK YOU'RE BUILDING FOR // // -TITANIUM_SDK_VERSION = 5.4.0 +TITANIUM_SDK_VERSION = 5.3.1.GA // // THESE SHOULD BE OK GENERALLY AS-IS // -TITANIUM_SDK = /Users/hans/Library/Application Support/Titanium/mobilesdk/osx/5.4.0 +TITANIUM_SDK = ~/Library/Application Support/Titanium/mobilesdk/osx/$(TITANIUM_SDK_VERSION) TITANIUM_BASE_SDK = "$(TITANIUM_SDK)/iphone/include" TITANIUM_BASE_SDK2 = "$(TITANIUM_SDK)/iphone/include/TiCore" TITANIUM_BASE_SDK3 = "$(TITANIUM_SDK)/iphone/include/JavaScriptCore"