To start sharing journeys from Fleet Engine and the customer backend,
you need to initialize the Consumer SDK in your iOS application.

The `providerID` is the same as the **Project ID** of your Google Cloud
Project. For information on setting up the Google Cloud Project, see
[Create your Fleet Engine project](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/set-up-fleet/create-project.md.txt).

The following examples show how to initialize the Consumer SDK in your app.

### Swift

```swift
/*
 * AppDelegate.swift
 */
import GoogleRidesharingConsumer
import GoogleMaps

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

  func application(_ application: UIApplication,
      didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

    // Register your API key for GMSServices.

    GMSServices.provideAPIKey(yourMapsAPIKey)

    // Set the instance of the SampleAccessTokenProvider.

    GMTCServices.setAccessTokenProvider(SampleAccessTokenProvider(), providerID: yourProviderID)

    // Other initialization code ...

    return true
  }
}
```

### Objective-C

```objective-c
/*
 * AppDelegate.m
 */
#import <GoogleMaps/GoogleMaps.h>
#import <GoogleRidesharingConsumer/GoogleRidesharingConsumer.h>

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  //Register your API key for GMSServices.
  [GMSServices provideAPIKey:yourMapsAPIKey];

  //Set the instance of the AccessTokenFactory.
  [GMTCServices setAccessTokenProvider:[[SampleAccessTokenProvider alloc] init]
                            providerID:yourProviderID];

  // Other initialization code ...
  return YES;
}

@end
```

## What's Next

[Set up a map](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/ios/create-ui.md.txt)