adyen-ios
adyen-ios copied to clipboard
[NEED ASSIST] AdyenContext not found in Adyen module
I am trying to get the example in the readme file to compile:
let apiContext = APIContext(clientKey: clientKey, environment: Environment.test) let context = AdyenContext(apiContext: apiContext, analyticsConfiguration: analyticsConfiguration) let configuration = DropInComponent.Configuration(context: context)
I added with the swift package manager the latest Adyen package and I made sure that I have the following packages installed:
- Adyen 4.8.0
- Adyen3DS2 2.2.6
- AdyenNetworking 1.0.0
- AdyenWeChatPayInternal 2.1.0
Then I tried to insert the above code snippet in the example. And I get this error: "Cannot find 'AdyenContext' in scope". I looked for AdyenContext and I verified that it is indeed present in the Adyen repository under the path Adyen/Core/AdyenContext.
But if you look at the below screenshot, the AdyenContext directory is missing from the package loaded with the Swift package manager:
So the class is missing and hence the error.
Can somebody provide an example with some steps on how to successfully run the above code snipper (it's in the readme page)?
Hello @ralzuhouri ,
In preparation of our upcoming version 5 (develop branch), we recently updated our documentation to the new integration that will come with v5, but forgot to provide the documentation for v4. We will add samples for v4 branches soon.
In the meantime, allow me to direct you to our documentation page which currently refers to v4 integration. https://docs.adyen.com/online-payments/ios/drop-in
Thanks for notifying us with this :)
If I follow this documentation I get the error "Value of type 'DropInComponent' has no member 'payment'"
Hey @ralzuhouri
Indeed, thanks for pointing it out! Seems like our official documentation is outdated 😅
We are working on a new versioning system for Adyen Docs and are looking to improve this in future. Sorry for the inconvenience
For now you can use GitHub v4.8.0 README as a reference documentation.
The payment
were moved from DropInComponent to a DropInComponent.Configuration
. You can set it as:
let configuration = DropInComponent.Configuration(apiContext: apiContext)
configuration.payment = payment
Hey @ralzuhouri
Were you able to resolve the issue?
I am closing this topic due to a lack of activity