This page concerns the Vuforia Engine API version 9.8 and earlier. It has been deprecated and will no longer be actively updated.
- Setting Up the iOS Development Environment
- Installing Vuforia Engine for iOS
- Installing Vuforia Engine Samples for iOS
- Compiling and Running a Vuforia Engine Sample for iOS
Setting Up the iOS Development Environment
Vuforia Engine for iOS currently supports the majority of iOS devices. Please see the Supported Versions page for more information about which iOS versions are supported.
Follow the steps below to:
- Become an iOS Developer
- Install XCode and the iOS SDK
- Set up a Provisioning Profile
Become an iOS developer
Vuforia Engine applications must be deployed to a device to run; they cannot be run in the iOS simulator. You must enroll in the iOS Developer program to deploy applications to an iOS device. You can enroll here: https://developer.apple.com/programs/ios/
Install XCode and the iOS SDK
Once you have enrolled in the iOS Developer program, you should have access to the iOS Dev Center: http://developer.apple.com/devcenter/ios
Go to the Dev Center or the Mac AppStore to download XCode. The download should include the latest version of the iOS SDK.
For the latest information on supported XCode and iOs versions, refer to Supported Versions
Set up a Provisioning Profile
From the iOS Dev Center, you can go to your iOS Provisioning Portal, where you can follow the steps to set up your development machine to build and deploy iOS applications. Also, follow the process to:
- Obtain a certificate
- Assign a device
- Create an App ID
- Create a provisioning profile
- When choosing an App ID, pick something generic enough to work throughout your development process. See the Apple Developer Provisioning Portal for more details about choosing App IDs.
- Create a Development Provisioning Profile using the App ID you created, and be sure to add the devices you wish to test.
- Download the provisioning profile to your computer and double-click it to install.
- Test that a simple non-Vuforia Engine application, possibly one of the samples in the iOS SDK, can run on the device. If you experience problems, it is a good idea to search the web for solutions, as there is plenty of advice available.
Installing Vuforia Engine for iOS
Download vuforia-sdk-ios-x-x-x.zip from the SDK Downloads page
- Unzip the archive
Resulting directory structure
Once you have unarchived the file, Vuforia Engine will be installed in a directory which will hereafter be referred to as the vuforia-sdk directory and which should look something like the image below:
We recommend developing your own applications outside of the SDK directory, to make it easier to upgrade to future versions of the SDK.
Installing the Vuforia Engine Samples for iOS
The Vuforia Engine Sample for iOS needs to be added to the Samples directory of the Vuforia Engine for iOS installation.
- Download the Vuforia Engine Sample that come in a compressed archive and expand it into its own directory.
- Copy the samples into the Vuforia Engine installation directory so it looks like this:
Compiling and Running a Vuforia Engine Sample for iOS
We are now going to build the Vuforia Engine Sample application which shows detection and tracking of natural features using the Image Targets and Model Targets features. This section shows you how to build the project in XCode and deploy to the device.
Configuring the project in XCode
- Open the VuforiaSample XCode project, located in the iOS subfolder of the sample directory as shown below.
NOTE: Vuforia Engine applications do not build or work with the Simulator. - If you have not already done so, create a license key for your app.
- Add the license key to your app.
- You must select a device to build and run any Vuforia Engine application.
- Ensure that your iOS device is connected to your computer via a USB cable and that XCode can recognize it as being usable for development (as highlighted in the Organizer window by a green light next to it).
- Select the device via the dropdown selector at the top left of the XCode window as shown here:
Set the bundle identifier
To set your bundle identifier so it matches the provisioning profile you have set up on the Apple Developer Provisioning Portal:
- Click the Vuforia Samples target to make it active.
- Replace com.vuforia.engine.NativeSample with your own bundle identifier, as shown here:
Manage Signing
- In Xcode, click the Active Target, and then click the General tab, as shown here:
- Under the Signing section, ensure Automatically manage signing is enabled. Also make sure that the correct Team is selected in the dropdown below.
Run the sample application
Print the image target
Print the image targets from the PDF files in the /Media subfolder of the Sample onto a US Letter or A4-size paper with the page scaling 'none' option, keeping the original aspect ratio of the image intact.
Typically, there are two image targets as shown here.
Deploy and run the application
After a splash screen, a menu will be displayed that allows selecting between the Image Targets or Model Targets features.
Use your device to look at the chips or stones printed target, and you should see a textured astronaut character rendered on top of the target, grounded to the plane.
In addition, a semi-transparent red rectangle is rendered on top of the image target along with a simple coordinate system axis indicator.
You have successfully deployed your first application with Vuforia Engine!
Tap the screen once to trigger the camera to focus, or double-tap to go back to the main menu.
Next Steps
Feel free to also explore the Model Targets feature that is contained within the Vuforia Engine Sample app.
Further detail about the sample application is contained within the downloadable archive.