Links

Build the Sample Apps

Use these instructions to build any of the sample apps to an iOS device.

Step 1: Open workspace in Xcode.

If you haven't already done this from the previous step, open the PlacenoteSDKExample.xcworkspace in Xcode.
We recommend you use Xcode 10.2 or later.

Step 2: Choose a project

Let's start with the HelloWorld example project. Later, you can use these instructions to build any of the other samples.
In Xcode, select the HelloWorld project as the active project.
After you switch projects, If you see any errors, such as, "No such module PlacenoteSDK" or other errors, don't, worry about them. We'll deal with them before we build the app, in Step 4.

Step 3: Add your API key

In the project explorer, under HelloWorld, open the file named AppDelegate.swift. You will find the following line of code:
LibPlacenote.instance.initialize(apiKey: Enter API Key...
Replace Enter API KEY Here with your API key in quotes "my_api_key".
Add your API key here.
If you don't have your API Key, you can get it on the developer portal. Sign up for an account and on the dashboard, find the API Key tab.

Step 4: Check for the framework file

Before you build, let's make sure that the framework file is in the right spot. Check for the framework file under Frameworks, Libraries, and Embedded Content.

Step 5: Build Settings

Under the Build Settings tab, look for the Build Options dropdown and make sure that Enable Bitcode is set to No.

Step 6: Release Mode

Check that you are building in release mode. This ensures that you get the fastest possible mapping experience so that is basically in Xcode, click on your Target, click Edit Scheme, make sure the Build Configuration is set to Release and that Debug Executable is unchecked.

Step 7: Build the app to an iOS device

Click on the HelloWorld project file in the project explorer and in the General Settings tab, let's ensure the project is set up correctly.
  1. 1.
    Choose a Provisioning Profile
  2. 2.
    Ensure that the Deployment Target is 11 or higher.
  3. 3.
    Connect your iPhone or iPad to your computer and set it as your build device.
And that's it!! Click Build (The play button in Xcode) and let the app build to your iOS device. If everything goes well you should see the app running on your device.
If you see the app running on your device and the camera feed starts, read about how each sample works.

Seeing Build Errors?

Sometimes luck just isn't on your side. Luckily, we are! Check out our Troubleshooting Guide to fix any issues you may be having with the build.