Table of Contents

  1. Show Tracking Available
  2. Logs
  3. Localization
  4. Staging environment
  5. API Reference
  6. Getting notified about updates
  7. FAQ

1. Show Tracking Available

When an ondemand ride is booked, tracking becomes available. This shows the current state of the ride and the position of the driver on a map. After completing the booking process, the user will be redirected to this screen by default.

It is recommended that you add some UI indication like a badge or button to inform the user about this. However, it may happen that the user dismisses the SDK or close the app and open it again. In such case, you can check the current state through Mozio.shared.trackingState and be notified about changes through the Mozio.shared.trackingDelegate. For example, our Demo app uses these to show a “Tracking Available” label as shown below:

Also, it is recommended that interacting with this UI presents the Tracking screen directly. You can jump directly into tracking by calling:

Mozio.shared.startTracking(presenter: self)
[[Mozio shared] startTrackingWithPresenter: self];


In our Demo app, tapping the Tracking Available label will present the Tracking screen.

2. Logs

The Mozio SDK occasionally sends usage logs to Mozio. These are only recorded when the SDK is running on production environment. Mozio never sends any user identifiable data or sensitive information as part of the logs.

2.1 Logging

There are three levels of logging, default, verbose, and disabled.

While debugging your app, you can keep the logging level at default or set it to verbose by doing the following:

Mozio.logLevel = .verbose
Mozio.logLevel = MozioLogLevelVerbose;


While not debugging your app, you can set the logging level to disabled so that no logs are sent to the device’s console. We do not log any sensitive information, but this will prevent anything from being logged at all:

Mozio.logLevel = .disabled
Mozio.logLevel = MozioLogLevelDisabled;


2.2 Usage logs opt out

In case you don’t want your application to send us logs of any type, you can opt out from them simply by doing:

Mozio.usageLogsOptOut = true
Mozio.usageLogsOptOut = YES;


This is not recommended. Opting out will make it hard for us to debug any issues your implementation may be facing.

2.3 Share logs manually

On some cases, it may be helpful to manually share your logs with our development team. For example, if you run into an issue when using the Staging Environment. To do so, just call the following method from any UIViewController, and the corresponding document interaction controller will be displayed for you to select how to share the mentioned logs with us.

Mozio.shared.sendLogs(presenter: self)
[[Mozio shared] sendLogsWithPresenter:self];


Bear in mind that if you have decided to opt out from logs, the file shared through this method will be empty.

3. Localization

The Mozio SDK is supported in multiple languages. In order to enable them, you will need to modify the Info.plist file of your app. To do so, open the property list file, and under the CFBundleLocalizations key, add the list of languages you want to support. If the language is supported by Mozio and enabled in your Info.plist, then every text of the Mozio SDK will be displayed in such idiom when running on a device that has that language set. For example, to add support for Spanish, your Info.plist should look like this:

If the device’s Locale isn’t supported by Mozio, the SDK will be displayed in the first preferred language. For example, if your device’s preferred language order is Polish, Spanish, English, and your device’s Locale is Polish, the SDK will be displayed in Spanish because it is second in the order and the SDK supports it.

3.1 Supported languages

Language Code
English en
Spanish es

3.2 How to prevent the SDK from being localized?

It may happen that a language is supported by Mozio SDK but not by your app. Let’s say for example that your app only supports English, while the SDK supports English and Spanish. If the app is run on a device in Spanish, your app would end up showing some content in English (your implementation) and some content in Spanish (the SDK module). If you would like to avoid this situation, all you need to do is avoid adding the es code to the CFBundleLocalizations list in your Info.plist.

3.3 How to localize the SDK with a different Locale than the device’s?

To allow the user to set the app language, you may want to force the SDK to be displayed in a Locale different than the device’s. To do so, all you need to do is add the following code:

let locale = Locale(identifier: "es")
Mozio.locale = locale
NSLocale* locale = [[NSLocale alloc] initWithLocaleIdentifier:@"es"];
Mozio.locale = locale;


Keep in mind that the Locale set must correspond to a language that the SDK supports. Otherwise, the setting will be ignored and the SDK will be displayed in the language dictated by the device’s Locale.

4. Staging environment

If you’re interested in booking test rides that do not involve a real driver or payments, you can do so with our Staging environment as follows:

let config = MozioConfiguration(mozioApiKey: "<Your Mozio Staging API-KEY>", 
                                googleMapsApiKey: "<Your Google Maps API-KEY>", 
                                theme: theme,
                                environment: .staging)
Mozio.initialize(configuration)
MozioConfiguration* config = [[MozioConfiguration alloc] initWithMozioApiKey:@"<Your Mozio Staging API-KEY>"
                                                            googleMapsApiKey:@"<Your Google Maps API-KEY>"
                                                                       theme:theme
                                                                 environment:MozioEnvironmentStaging];
[[Mozio shared] initializeWithConfiguration:config];


  • Keep in mind that your Mozio API-KEY for one environment does not work for others. So if you only got a production key you should reach us to get a staging key as well.
  • Setting up environment is done at initialization and cannot be changed later during execution of your app.
  • We recommend that each environment is linked to different versions of the app, that is different sandbox or App IDs for each.

When using our Staging environment every search you do will throw a bunch of test results. You are interested in two specific results:

  • Use the Smarty OAuth (AUT) result to test rides that do not require payment (what we call “OAuth” rides like Lyft where you pay with your Lyft account).
  • Use the Smarty Credit Card (AUT) result to test rides that do require credit card input.

Booking these will take you through all the ride states (driver coming, driver arrived, in trip, completed) automatically.

If you are interested in Tracking (seeing the car on the map), you need to do a specific search:

  • From: 44 Tehama Street, San Francisco, CA, USA
  • To: Moscone Center, Howard Street, San Francisco, CA, USA

5. API Reference

Open

6. Getting notified about updates

We recommend that you subscribe to our Releases page to be notified about the latest versions of the Mozio SDK.

7. FAQ