Table of Contents
Requirements
Installation
Setup
Booking Rides
Further reading
1. Requirements
Xcode 10.2
iOS 10 (or later)
2. Installation
3. Setup
3.1 Update Info.plist
The MozioSDK uses the user’s GPS location to provide a better experience when booking trips.
If your app doesn’t make use of GPS already, please add the key NSLocationWhenInUseUsageDescription
to your Info.plist
with the following value:
We will use your location to provide a better experience when booking trips.
3.2 Initialization
In your AppDelegate
file, import our SDK:
In your application didFinishLaunchingWithOptions
, add the following:
// 1. Define the theme to match your brand, we recommend at least setting up these two properties:
let theme = MozioTheme ()
theme . colors . primary = UIColor . red // Your brand's primary color
theme . images . logo = UIImage ( named : "logo" ) // Your brand's logo
// 2. Initialize the SDK
let config = MozioConfiguration ( mozioApiKey : "<Your Mozio API-KEY>" ,
googleMapsApiKey : "<Your Google Maps API-KEY>" ,
theme : theme )
Mozio . initialize ( configuration )
// 1. Define the theme to match your brand, we recommend at least setting up these two properties:
MozioThemeColors * colors = [[ MozioThemeColors alloc ] init ];
colors . primary = UIColor . redColor ; // Your brand's primary color
MozioThemeImages * images = [[ MozioThemeImages alloc ] init ];
images . logo = [ UIImage imageNamed : @"my_logo" ]; // Your brand's logo
MozioTheme * theme = [[ MozioTheme alloc ] initWithColors : colors images : images ];
// 2. Initialize the SDK
NSString * mozioApiKey = @"<Your Mozio API-KEY>" ;
NSString * googleMapsApiKey = @"<Your Google Maps API-KEY>" ;
MozioConfiguration * config = [[ MozioConfiguration alloc ] initWithMozioApiKey : mozioApiKey
googleMapsApiKey: googleMapsApiKey
theme: theme ];
[[ Mozio shared ] initializeWithConfiguration : config ];
If you still don’t have a Mozio API-KEY
, reach us at sdk@mozio.com .
If you need a Google Maps API-KEY
, you can get one from here .
You are all set!
4. Booking rides
Now that you’re fully installed, you can start adding booking features to your app.
Full details in our Booking guide .
5. Further reading
There are other topics you will need to cover, like adding Tracking status to your UI and using the Staging environment to test the booking flow.
Full details in our Advanced guide .