Build the Sample Apps
Use these instructions to build any of the sample apps to an iOS device.
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.
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.
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...
Enter API KEY Herewith 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.
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.
Under the Build Settings tab, look for the Build Options dropdown and make sure that Enable Bitcode is set to No.
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.
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.Choose a Provisioning Profile
- 2.Ensure that the Deployment Target is 11 or higher.
- 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.
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.