Skip to main content

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

https://github.com/ShipBook/ShipBookSDK-iOS.git

2. Initializing ShipBook into your code

In your AppDelegate file, add the following:

import ShipBookSDK

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

  ShipBook.start(appId:"YOUR_APP_ID", appKey:"YOUR_APP_KEY")

3. Adding logs

The usage of the logs:

  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