Configuration
Project Configuration
To integrate the Yoco SDK into your iOS application, you must first configure
your project’s Info.plist
file. This configuration grants your application
the necessary permissions to communicate with the Yoco card machine securely
and reliably.
Replace “Your App” with your app’s name or change the wording as you see fit.
Initialising the YocoSDK
To perform a transaction with the YocoSDK, you will need to acquire a secret integration key from Yoco by filling out the Yoco Integrations form. A Yoco employee will reach out to you with further details within a few days.
Once you have acquired your secret key, the next step is to call the
initialise()
function from the YocoSDK. Generally, this lives inside your
AppDelegate
but it can be called any time before trying to interact with
any of the other APIs of the YocoSDK.
Following initialise()
, you will need to call configure()
with your secret.
Set loggingEnabled
to true
, to see extra debug logs.
Set environment to .production
or .staging
for production release or test
builds.
You can call configure()
multiple times per application run if you wish to
change logging output or switch environments.
Ensure that Yoco.applicationWillTerminate()
is invoked in your
AppDelegate
’s applicationWillTerminate
callback so that the YocoSDK can
clean up appropriately in the event of the application being terminated
unexpectedly.