iOS

WRLD iOS SDK

The WRLD iOS SDK is a framework for displaying beautiful, interactive 3D map views in Cocoa Touch apps for iPhone or iPad. Map views can be embedded into apps using iOS 8.0 or above, using Objective-C, or by simply hooking up in Xcode Interface Builder.

Installing

The WRLD iOS SDK is provided as a dynamic framework. To integrate the SDK with an app, you will need Xcode 7.3 or later.

You can install either using a direct download, or via CocoaPods.

Install using direct download

  1. From the latest github release page, download the wrld-ios-sdk zip file.
  2. In Xcode, select your app’s project in Project Navigator to display Project Editor. Select the app’s target, then on the General tab, find the Embedded Binaries section.
  3. Unzip the wrld-ios-sdk zip file and drag WRLD.framework into the Embedded Binaries section. Check “Copy items if needed” in the resulting dialog box, then click “Finish”. This links the WRLD.framework with your project.
  4. Obtain a WRLD API key and set this in your app’s Info.plist file.

Install using CocoaPods

  1. Install CocoaPods.
  2. Create a Podfile in the root folder of you app project (replacing ‘MyAppTargetName’ as appropriate for your app)

    platform :ios, '8.0'
    
     target 'MyAppTargetName' do
       pod 'WRLD'
     end
     
  3. In Terminal, run pod install. This will download the SDK and create an xcworkspace file. Open this file in Xcode.
  4. Obtain a WRLD API key and set this in your app’s Info.plist file.

Use a map view in your app

Now that you have the WRLD iOS SDK installed, you are ready to integrate a WRLD 3d map view into your app.

See our walkthrough guide for simple step-by-step instructions.

WRLD API Key

In order to use the WRLD iOS API, you must sign up for a free developer account.

After signing up, create an API key (for clarity, this is a token containing 32 characters). The API key is necessary in order to use WRLD map services. It is good practice to create a new API key for each of you apps - this limits the changes necessary should a key need to be revoked.

To provide your app with an API key, in Xcode, open your app’s Info.plist file (select it in the Project Navigator).

Add an entry with the columns set as follows:

  • Key: WrldApiKey
  • Type: String
  • Value: [your api key]

Status

The WRLD iOS SDK is currently in alpha, and is undergoing active development - we will be expanding with further features and improvements.

Got something you want to do in your app? Let us know via the issues page.

Further information

Our examples show how to interact with the map view using sample code snippets.

The example GitHub repository contains an open-source iOS app that illustrates the API features.