iOS - Quick Integration

1. Installation Swift Package Manager#

ShipBookSDK uses Swift Package Manager to install and manage dependencies. To install it in Xcode:

Select File > Swift Packages > Add Package Dependency and enter

2. Initializing ShipBook into your code#

In your AppDelegate file, add the following:

import ShipBookSDK

Then, add the following to application(_:didFinishLaunchingWithOptions:):


3. Adding logs#

To have a log on each class you need to create a logger. For Example, in MainViewController:

import ShipBookSDK

The usage of the log:

Log.e("the log message") // Error log
Log.w("the log message") // Warning log
Log.i("the log message") // Info log
Log.d("the log message") // Debug log
Log.v("the log message") // Verbose log

4. Run your app to verify installation.#