Adyen / adyen-ios

Adyen iOS Drop-in and Components
https://docs.adyen.com/checkout/ios
MIT License
152 stars 122 forks source link

[BUG] TWINT Apps cannot be opened when adding payment method (Fatal error/Crash) #1902

Open ast3150 opened 3 days ago

ast3150 commented 3 days ago

Describe the bug When trying to register TWINT as a payment method, the application crashes with a fatal error:

Fatal error: NSArray element failed to match the Swift Array Element type
Expected TWAppConfiguration but found TWAppConfiguration

To Reproduce Steps to reproduce the behavior:

  1. Build app with Ayen TWINT Native integration
  2. Click on 'Add payment method'
  3. Choose TWINT as payment method
  4. Application crashes with fatal error

Expected behavior The application does not crash and the selection which TWINT app should be opened is presented.

Screenshots n/a

Environment

Relevant source code File/Line: TwintSDKActionComponent.swift:105 Method: public func handle(_ action: TwintSDKAction) Line: guard let firstApp = installedApps.first else {

Additional context

atmamont commented 2 days ago

Thanks for reporting @ast3150!

Could you provide additionally the following:

TWINT test environment doesn't support iOS18 at the moment so we have limited means for investigation, just to set expectations it might take some time to sort it out.

ast3150 commented 2 days ago

Sure, here you go. FELFEL-2024-11-20-182701.ips.zip

We import the Adyen and AdyenTwint library through Swift Package Manager. Both are added to the "Frameworks, Libraries and Embedded Content" section as normal libraries. Screenshot 2024-11-20 at 18 33 19

Please note that after reinstalling the library and app, I am currently no longer able to reproduce a crash. However, there is also no progress after choosing the payment method:

Screenshot 2024-11-20 at 18 49 21

atmamont commented 1 day ago

Thanks for logs provided, it helps to narrow down the root cause.

As long as we cannot reproduce the crash, we can only have assumptions:

nauaros commented 13 hours ago

Hi @ast3150!

Taking over @atmamont here.

We’ve created a new branch (#1905) where the TwintSDK has been updated to version 8.0.2.

This update resolves the compatibility issue with iOS 18 caused by the deprecated openURL(_:) method.

However, due to limitations in Twint’s ability to provide a complete TEST environment, we have not been able to fully test the entire Twint payment flow. That said, we have successfully verified that the app-to-app switch functionality works with this update.

We encourage you to try out this branch in the meantime while we continue working on verifying the full flow. Once the changes are thoroughly tested, we’ll include them in an official release.

We apologize for any inconvenience caused by these third-party dependencies. If you encounter any issues, please let us know. Thank you for your understanding and cooperation!

Disclaimer: Be aware this is not part of an official release, so keep in mind there can potentially be issues with the update that's why we encourage you to run test to make sure the whole Twint payment flow works as expected on iOS 18.