braintree / braintree_ios

Braintree SDK for iOS
https://developer.paypal.com/braintree/docs/start/hello-client/ios/v5
MIT License
560 stars 294 forks source link

Support for App Clips #552

Closed bahe007 closed 1 year ago

bahe007 commented 3 years ago

Is your feature request related to a problem? Please describe. Starting with iOS 14 App Clips can be developed. However, they are limited in several ways (Documentation), especially regarding app switching: Custom URL Schemes cannot be registered. Yet, this seems crucial for Braintree according to the corresponding documentation). As far as I understand it, that makes Paypal (and probably other aspects) of Braintree impossible to use in App Clips.

Describe the solution you'd like There could be many different solutions: If I simply misunderstood the documentation and Braintree can be used in App Clips. Then, I'd propose to clarify the documentation in this regard.

Otherwise, it could be possible to simply default to the SFSafariViewController in App Clips instead of switching to other apps.

Also, ASWebAuthenticationSession are supported in App Clips as well.

scannillo commented 3 years ago

Hello @bahe007 - thank you for creating this feature request. We will soon be releasing a version 5.0.0-beta1 of the Braintree iOS SDK which will remove the custom URL scheme requirement for PayPal checkout flows. We are no longer going to use SFSafariViewController for the PayPal flow, and are replacing SFAuthenticationSession with ASWebAuthenticationSession.

However, the Venmo checkout flow requires a full app switch to the Venmo app, so that still requires a custom URL scheme. The Local Payments and 3DS flows also still utilize a SFSafariViewController and require a custom URL scheme.

Currently, support for App Clips is not on our radar. However, we can leave this issue open for tracking interest in getting all of our payment methods usable via App Clips.

bahe007 commented 3 years ago

Thank you for the fast response!

As far as I understand this reply from your colleague, even in the current release only SFAuthenticationSession is used in iOS 14 for the PayPal flow and no app switching is performed.

While not explicitly stated in the documentation of Apple for App Clips, I'd assume that this works in App Clips as well because the successor ASWebAuthenticationSession is supported (at least using the Braintree sandbox API for testing everything works fine).

scannillo commented 3 years ago

As far as I understand this reply from your colleague, even in the current release only SFAuthenticationSession is used in iOS 14 for the PayPal flow and no app switching is performed.

Yup, that is correct. v4 of the Braintree iOS SDK only uses SFSafariViewController for PayPal flows iOS 10 and below.

scannillo commented 1 year ago

👋 Hi @bahe007 - due to lack of community engagement on this feature request, we are going to close it for now. If support for App Clips is still something your business needs, please reach out to our Support team with more information on your merchant details.