Quick integration

Swift
1
Installation via CocoaPods

ShipBookSDK uses CocoaPods to install and manage dependencies. Open a terminal window and navigate to the location of the Xcode project for your app.

Create a Podfile if you don't have one:

pod init

Open your Podfile and add:

pod 'ShipBookSDK'

Save the file and run:

pod install

This creates an. xcworkspace file for your app. Use this file for all future development on your application.

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

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

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.

© 2018 Shipbook Ltd.

  • Facebook Social Icon
  • LinkedIn Social Icon

Animation & Graphic Design: Barel Toledano

Content Writer: Ari Kuchar & Zoe Kabilio

Grammatical edit: Ann Goldberg