Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Ionic 4, Cordova & iOS - ITMS-90809: Deprecated API Usage #6

Open
ciccilleju opened this issue Mar 27, 2020 · 13 comments
Open

Ionic 4, Cordova & iOS - ITMS-90809: Deprecated API Usage #6

ciccilleju opened this issue Mar 27, 2020 · 13 comments

Comments

@ciccilleju
Copy link

ciccilleju commented Mar 27, 2020

hello!

the build works correctly and I can use it both on android and iOs but the problem is that is uses deprecated API as you can see in the following image

image

do you have the chance to fix it with WKWebView instead of UIWebView?

thanks!

@ciccilleju ciccilleju changed the title Ionic 4, Cordova & iOS - the app crashes while making a payment Ionic 4, Cordova & iOS - ITMS-90809: Deprecated API Usage Mar 27, 2020
@kheber92
Copy link

Are you 100% sure that it's the Cordova Braintree plugin?
I'm planning to implement Braintree instead of PayPal, since the creator of the Cordova PayPal plugin has stopped the development. Unfortunately it uses the UiWebView, so it's not possible to release apps with the PayPal plugin.

If the Braintree plugin also uses UiWebView, it would be useless for me to implement it...

@ciccilleju
Copy link
Author

ciccilleju commented Mar 30, 2020 via email

@kheber92
Copy link

The plugin thah gives me the error is Cordova-braintree-plugin, I don't know which part of the included libraries. But I've done another test: there is another version (I can give yoy the repository) that works fine until checkout and doesn't warn me about deprecated API, but I'm doing something wrong in the configuration, so it crashes. Maybe you can find the way to fix it? Il Lun 30 Mar 2020, 13:39 kheber92 [email protected] ha scritto:

Are you 100% sure that it's the Cordova Braintree plugin? I'm planning to implement Braintree instead of PayPal, since the creator of the Cordova PayPal plugin has stopped the development. Unfortunately it uses the UiWebView, so it's not possible to release apps with the PayPal plugin. If the Braintree plugin also uses UiWebView, it would be useless for me to implement it... — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#6 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKFB5GRDKPZU6NKMKO2MB4LRKCAFVANCNFSM4LVAKSEQ .

Yes, please tell me/us the repository which seems to be working (except the configuration).

Although I have to find a fix for my current problem first (when trying to run an Ionic build with Braintree included in Xcode):

dyld: Library not loaded: @rpath/BraintreeVenmo.framework/BraintreeVenmo
Referenced from: /Users/me/Library/Developer/CoreSimulator/Devices/F9A78FB0-E0E5-4789-B294-F76B82A0F995/data/Containers/Bundle/Application/4648048B-A4D5-44FF-84F1-9B07B7574F4F/MyAppPayment.app/MyAppPayment
Reason: image not found
(lldb)

@ciccilleju
Copy link
Author

ciccilleju commented Mar 30, 2020 via email

@kheber92
Copy link

kheber92 commented Mar 30, 2020

@ciccilleju Thanks for that tip with "embed and sign in".
I have managed to type in the PayPal credentials, but the app crashed afterwards with the error you mentioned in another issue thread:

2020-03-30 15:06:53.392181+0200 MyAppPayment[98600:15995044] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[3]'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff23c4f02e __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x00007fff50b97b20 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff23ce1a71 _CFThrowFormattedException + 194
	3   CoreFoundation                      0x00007fff23cec496 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 + 38
	4   CoreFoundation                      0x00007fff23cacd57 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 247
	5   CoreFoundation                      0x00007fff23c4aedb +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
	6   MyAppPayment                        0x00000001023627d8 -[BraintreePlugin getPaymentUINonceResult:] + 1928
	7   MyAppPayment                        0x0000000102361d77 -[BraintreePlugin dropInViewController:didSucceedWithTokenization:] + 183
	8   BraintreeUI                         0x00000001027df610 -[BTDropInViewController informDelegateDidAddPaymentInfo:] + 140
	9   BraintreeUI                         0x00000001027e14b5 -[BTDropInViewController paymentButtonDidCompleteTokenization:fromViewController:error:] + 266
	10  BraintreeUI                         0x00000001027dc256 __44-[BTDropInViewController initWithAPIClient:]_block_invoke + 82
	11  BraintreePayPal                     0x0000000102747697 __57-[BTPayPalDriver setAppSwitchReturnBlock:forPaymentType:]_block_invoke_3 + 254
	12  libdispatch.dylib                   0x00000001028c9dd4 _dispatch_call_block_and_release + 12
	13  libdispatch.dylib                   0x00000001028cad48 _dispatch_client_callout + 8
	14  libdispatch.dylib                   0x00000001028d8de6 _dispatch_main_queue_callback_4CF + 1500
	15  CoreFoundation                      0x00007fff23bb1df9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	16  CoreFoundation                      0x00007fff23baca59 __CFRunLoopRun + 2329
	17  CoreFoundation                      0x00007fff23babe16 CFRunLoopRunSpecific + 438
	18  GraphicsServices                    0x00007fff38438bb0 GSEventRunModal + 65
	19  UIKitCore                           0x00007fff4784fb48 UIApplicationMain + 1621
	20  MyAppPayment                        0x000000010235fe91 main + 65
	21  libdyld.dylib                       0x00007fff51a1dc25 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Regarding development: I'm using Ionic 4.
The integration is really a mess and I don't know why Ionic doesn't provide a solid tutorial or at least guideline on how to integrate Braintree. It seems to be the only payment solution for Ionic right now (since the PayPal cordova plugin is deprecated and not developed anymore).
Really trial and error here...

@faraz9x
Copy link

faraz9x commented Apr 24, 2020

Hello folks, did you find the solution and @ciccilleju can you please share the plugin which was working for you

@ciccilleju
Copy link
Author

Hello folks, did you find the solution and @ciccilleju can you please share the plugin which was working for you

unfortunately not...
I've tried to reach the Ionic staff but they told me that isn't a ionic native problem, to try reaching the plugin's author...well...good luck with that :D

@polllywood
Copy link

This plugin uses an old version of the Braintree SDK. There was the same discussion about the deprecated UIWebView at Braintree's projects itself:

(1) braintree/braintree-ios-drop-in#193
(2) braintree/braintree_ios#481

I tried to update the Braintree SDK to the latest version, but failed to adjust the code of the plugin to the new version, especially to remove Braintree3DSecure as suggested in the second issue.

@ciccilleju
Copy link
Author

ciccilleju commented May 18, 2020 via email

@ciccilleju
Copy link
Author

i got a reply from braintree...

Braintree says:

At this time, we're not able to directly support mobile wrapping or transpiling frameworks. Additionally, braintree.js is neither tested nor developed for hybrid runtimes such as Cordova, PhoneGap, Ionic, React Native, and Electron. While some success may be had in such environments, our SDK is optimized for the browser and its security policies and may not function correctly outside of them, especially when it comes to PayPal. Therefore, we would recommend utilizing our native mobile SDKs in your app.

Additionally, I would also like to note that PayPal'sMobile SDKs are deprecated. The APIs powering them will remain operational long enough for merchants to migrate, but the SDKs themselves will no longer be updated. With that in mind, we recommend merchants use Braintree Direct in supported countries. In other countries, merchants can use Express Checkout and choose the Braintree SDK integration option. This is also noted on the Github page for PayPal's mobile SDKs.

If you have additional questions, please let us know.

@polllywood
Copy link

I am pretty sure, that you get the Braintree.js SDK running, when you allow your app to access their servers.

But do you really want to have external stuff inside the webview of your app?

@faraz9x
Copy link

faraz9x commented May 19, 2020

I have opted out of using plugins for integrating braintree and implement braintree js through InAppBrowser webview, if we add the js code directly into the app it works fine in android but not in iOS, the Drop In UI simply doesn't show in iOS.

@EinfachHans
Copy link

Hey everybody, i created a new Braintree Plugin. It's still in development, but you can use it via Git already: https://github.com/HansKrywaa/cordova-plugin-braintree-sdk 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants