How to Get Started With Apple’s ARKit Augmented Reality Platform
By and large , the new Apple smartphone, “iPhone 8” , should be released in the near future – in September 2017. But I’m sure the company’s most groundbreaking release of the year really happened this summer at Apple’s Worldwide Developers Conference (WWDC). ) in San Jose, California.
At the event, Apple unveiled ARKit , a new free suite of software tools that anyone can use to create exciting new apps and experiences for the iPhone and iPad. AR in ARKit refers to augmented reality, a technology that puts interactive virtual objects and effects into your view of the real world, mixing the virtual world with physical reality.
Today, this is usually accomplished with apps that use the camera of a smartphone (or other device) to show you the real world in front of you, and then superimpose virtual objects on top of it. For example, some of the most popular AR features right now are Snapchat “lenses” or face filters – effects that put animal ears on your head or distort your face in strange ways. Another is Pokémon Go, a gaming app in which pocket monsters look like they are jumping on your table or down the street. What these applications have in common is that the virtual objects within them appear to inhabit or alter the scenes of the real world, “magnifying” our reality.
But these applications were specially created by professional software developers. What makes Apple’s ARKit version of augmented reality so exciting is that it’s not an app, but a free way for anyone to create new AR apps that can run on many Apple iOS devices over the past few years. And the proof in pudding: Apple’s ARKit has only been publicly available for about two months, but independent software developers have created incredibly compelling capabilities for the iPhone – everything fromvirtual portals you can enter to hostingvirtual zombies. your living room and more. Even Lord of the Rings director Peter Jackson enjoyed the ARKit short film .
I’ve been interested in augmented reality for years, so when Apple announced ARKit I was in awe. If you feel the same way, or just want to experiment with it yourself, here’s how you can get started.
Make sure you have a compatible iOS device.
ARKit only works on Apple iOS devices with an A9 processor (or newer). According to RedmondPie, this limits it to the following devices:
- iPhone 6s and 6s Plus
- iPhone 7 and 7 Plus
- iPhone SE
- iPad Pro (9.7, 10.5, or 12.9)
- iPad (2017)
Presumably, the new iPhone 8 lineup will also support ARKit. You will also want to make sure the camera on your iOS device is working as ARKit relies on it. And you need a cable to connect your device to your Mac computer.
Download iOS 11 to your iPhone or iPad
Once you have one of these compatible iOS devices on hand, you will need to download iOS 11. This is the latest version of Apple’s mobile operating system and is currently only available in beta form, which means it is potentially buggy and can mess up some things on your device. If this is a serious problem, buy or use another device that is not your primary one. Or wait for the official release of iOS 11, which is also expected in September 2017.
If you don’t want to wait, you can download the iOS 11 beta and get started. To do this, you need to sign up for Apple’s software beta testing program . It’s free, but it takes anywhere from 20 minutes to a couple of hours to set up. Go here and follow the instructions .
Make sure you have a compatible Mac.
You will also need a computer to write the code for your ARKit application. Specifically, a Mac with the free Mac OS Sierra 10.12.4 (or newer) operating system installed. This means that the following machines are suitable:
- MacBook (Late 2009 or newer)
- MacBook Pro (Mid 2010 or newer)
- MacBook Air (Late 2010 or newer)
- Mac mini (Mid 2010 or newer)
- iMac (Late 2009 or newer)
- Mac Pro (Mid 2010 or newer)
Register for an Apple developer account
You can use a free or paid developer account to get started with ARKit. If you already have a regular Apple consumer account that you use to buy apps and the like on your iPhone / iPad / Mac, you can upgrade to a free or paid developer account. Using a web browser on your Mac, go to the Apple developer account sign-in page and select the appropriate option.
Download Xcode 9 (which contains ARKit) for your Mac for free from Apple’s developer website.
On your Mac, sign in with your Apple developer account, then go here and click Download in the top right corner to get Xcode 9, Apple’s programming program (tautology, yes!). Warning: You will need at least 4.9GB of free hard drive space to download this, and then Xcode itself will take up 9.76GB of hard drive space.
Launch Xcode 9 and connect your iOS device to your computer with a cable.
On your Mac, unzip the downloaded Xcode 9 file by double-clicking it, then drag the Xcode application into the Applications folder and double-click it to launch. Connect an iOS device with iOS 11 installed.
Create a new AR app project template in Xcode
In Xcode on your Mac, click File, New and select Project. This should bring up a grid of options. Click on Augmented Reality Application.
Fill in the information about your new AR app in Xcode
Apple requires you to provide the following information for your new AR app. You can name it whatever you want and don’t forget to select Team as well, even if you are an individual (if you don’t already have one, you can create one). I checked everything else.
In the language option, you can also choose between Swift, Apple’s new programming language, and Objective-C, its older language. Both will allow you to create an AR app. If you’re new to coding, Swift might be your best bet as this is what Apple plans to use for all of its tools in the future.
Finally, you can choose your Content Technology by choosing between SceneKit, SpriteKit and Metal. These are different rendering engines for displaying graphics. All three will allow you to build AR apps, but offer different trade-offs, some of which are described here (mainly: SceneKit for 3D graphics, SpriteKit for 2D, Metal for more complex scenes). For this demo, I chose SceneKit.
You will also need to put your project in a folder on your computer. Choose anywhere, it doesn’t really matter.
Select the connected iOS device to get the new AR app.
In Xcode on your Mac, select Window from the top menu bar, click Devices and Simulators, and double-click your iOS device. Make sure you check the box next to Show as Startup Destination.
You may now see a pop-up on your iOS device that says “Untrusted Developer” and instructions on how to navigate to your iOS device’s Settings page to authorize the use of this app.
If that happens, find your Settings app on your iOS device, tap it, scroll down to General and tap it, then scroll further down to Profiles & Device Management and you should be able to find your Apple Developer Email Address. Tap this and it should allow you to install ARapp.
Launch your first AR demo app
Apple includes a very basic AR demo with Xcode so you can get a feel for what you can create with ARKit. This demo shows a fighter jet in the air in front of your device’s camera.
To see this in action, first make sure your iOS device is selected in the device dropdown menu in the upper left corner of Xcode.
Then look at the top menu bar in Xcode. Find “Product”, click it, and then click “Run.”
The top status indicator in Xcode should start blinking with activity and messages, then it should launch your app on your iOS device!
To stop the demo application, go back to Product in Xcode and scroll down to Stop.
That’s it, you are well on your way to using ARKit! For more information on adding your own new 3D models and creating animation effects, I would recommend the following tutorials: