Closed dragomir-ivanov-212 closed 1 year ago
Hey @dragomir-ivanov-212 thanks for reporting this. We will investigate as soon as possible.
I imagine it's not new to v5.1.0. We will get back to you when we have an update!
Thank you for the fast response! I just tried to reproduce this using the provided demo app, and it doesn't reproduce.
I tracked down a SearchView.xib in the parent app that is integrating DropInComponent. There appears to be a naming clash. I'll try to resolve the naming clash and get back to you.
Ah nice! Yeah that would be a reason indeed. Let us know the result, thanks!
We also found the same issue with another xib, ModalViewContainer.xib that our App has and was causing a crash when launching Adyen.
Adyen team should use Bundle.module to force binding the correct xib or prefix their classes to avoid this common issue in SPM.
Hey @AshrafJaddo,
Hmm I see. But we are already doing so, e.g. in ModalViewController
line 44, super.init(nibName: nil, bundle: Bundle(for: ModalViewController.self))
Are you referring to another usage?
On another note, we realize some of the names like this one could have potential collusions and we will keep improving them as we encounter them.
Hi, not sure but in our App get this error when we try to launch the payment view controller, we fixed by renaming our ModalViewController.xib to something else.
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<AdyenDropIn.ModalViewController 0x61900006c780> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key containerView.'
@erenbesel I'm pleased to say that renaming the offending view in the main app fixed the crash.
Since @AshrafJaddo also chimed in with much the same problem, do we consider this issue "fixed", or will you look into it further?
I think the Adyen team should either use prefixes or load the resources via the module API. names like SearchViewContainer, ModalVC, ContainerVC ..etc are common an a lot of Apps has them.
We agree these names can be problematic, thankfully it's not many of them. On a side note, we did not expect this issue to resurface after the change to load these controllers with the bundle of its own module. (previously bundle was nil
).
We will still be on the lookout for renaming if possible. Closing this one for now, thanks all!
Describe the bug Attempting to checkout with an IssuerListComponent (dotpay, ideal, onlineBanking_PL) using AdyenDropIn (UIKit) leads to a crash.
Crash on ModalViewController.swift:131
Thread 1: "[<Adyen.SearchViewController 0x294132e00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key searchField."
To Reproduce Steps to reproduce the behavior:
present(dropInComponent.viewController, animated: true)
Expected behavior I expect no crashes and a normal checkout process.
Screenshots none
Smartphone (please complete the following information):
Additional context
PODS:
stacktrace:
I see a
_nibName = 0x000060000377cf20 "SearchView"
on SearchViewController which might explain this.partial (relevant)
dump(self)
of ModalViewController