adyen-ios icon indicating copy to clipboard operation
adyen-ios copied to clipboard

[Feature] Integrate 3DS2 as a static framework within the Checkout SDK

Open LauraBejan-Nestle opened this issue 8 months ago • 6 comments

Describe the bug We are trying to build a host app that consumes a framework that will consume the Adyen package. Host App -> Framework A -> Adyen-ios (Adyen and AdyenDropIn - the one that's crashing). Unfortunately, at runtime, the app crashes with the error described in the screenshot below.

To Reproduce Steps to reproduce the behavior:

  1. Create Host App with static embedded Framework A.
  2. Add Adyen-ios package 5.5.0 through SPM to Framework A.
  3. Select Adyen and Adyen DropIn modules
  4. Run Host App on device
  5. App will crash

Expected behavior Between Framework A and Adyen-ios the linkage should be static and the app should not crash.

Screenshots image

Environment

  • Device: Any device (not simulator)
  • iOS Version: 16.2
  • SDK Version: 5.5.0
  • Adyen API Version: -
  • Package management system: SPM
  • Xcode version: 14.2
  • Mac OS type: M1

Additional context The behaviour described above happens only when running the app on device, the simulator does not encounter any issues. The issue does not reproduce when Adyen package is imported directly in Host App.

LauraBejan-Nestle avatar Dec 29 '23 13:12 LauraBejan-Nestle

Hi @LauraBejan-Nestle This is a hard one to test from our side. Since the error seems to refer to the 3ds2 package, could you try experimenting with different packages in the Adyen package that does not link the Adyen3DS2, such as AdyenCard or AdyenComponent, instead of AdyenDropIn?

erenbesel avatar Jan 02 '24 10:01 erenbesel

Hello @erenbesel,

I have tried the approach you recommended, but, unfortunately, it's not what I need. I need to have access to DropInComponent which is exposed in AdyenDropIn. I have created a repo with the setup described in the issue. I hope it will help with the investigation. https://github.com/LauraBejan-Nestle/Adyen-ios-Runtime-issue/tree/main

LauraBejan-Nestle avatar Jan 09 '24 09:01 LauraBejan-Nestle

Also experiencing this exact issue unfortunately (with SDK 5.6.0)...

@LauraBejan-Nestle Have you been able to find a solution or workaround?

@erenbesel Any chance you can look into this? With Laura's repo you should be able to reproduce the issue. Help would be greatly appreciated, as we're dealing with a deadline.

martyhoogendam avatar Mar 14 '24 17:03 martyhoogendam

Thanks for the sample app it helps to see the issue.

  • The sample app is trying to wrap Adyen-ios (which dynamically links to Adyen3ds2) into a framework which is a static framework. Which is why at during linking it cannot find Adyen3ds2 and hence the failure.

I don't think you can create a static framework to wrap a framework which dynamically links to another.

Suggestions:

  1. Make the wrapper framework dynamically linked to the main app.
  2. fork your own version of adyen-ios and make the link to Adyen3ds2 sdk a static one. A static framework is available in the repo.

robertdalmeida avatar Mar 15 '24 15:03 robertdalmeida

Hello,

Thank you for the response. We discussed internally when the issue was raised and we also went with solution 2, creating a fork and removing any reference we do not need.

A solution from your side would be to support both statically and dynamically linked from within your own package by creating 2 different targets.

For now this is ok as we fixed the blocking issue with the fork.

LauraBejan-Nestle avatar Mar 18 '24 09:03 LauraBejan-Nestle

@robertdalmeida Thanks for your response.

I don't think solution 1 will actually work. In our project (and the sample app), the wrapper framework is already dynamically linked to the main app. As @LauraBejan-Nestle suggests, please offer both a static and dynamic target in the adyen-ios SPM package.

This is supported by many SPM packages (see screenshot for an excerpt from our dependencies) and would make the Adyen DropIn usable for our project.

Screenshot 2024-03-18 at 15 52 54

martyhoogendam avatar Mar 18 '24 15:03 martyhoogendam