Simple measure AR app made with ARKit. It sends the measures to Pusher so they can be consumed by other apps in realtime. Follow the tutorial at the Pusher blog (not yet published).
The measurements are based on the plane detection’s capabilities of ARKit, and they are not perfect in some situations (for example, in low lighting or when a surface is not entirely flat) so the results won’t be completely accurate all the time, they’re close, but they can vary.
This app uses a beta version of the Pusher library for Swift 3.2 based on the branch https://github.com/pusher/pusher-websocket-swift/tree/swift-3.2. It will be updated when Pusher releases new version of the library to support Swift 4.
- Xcode 9 (Beta 5 or superior)
- iOS 11 beta 5 (or superior)
- An iOS device with an A9 or better processor (iPhone 6s or superior, iPad Pro, iPad 2017)
- A free Pusher account
- Login to Pusher and create an app, with client events enabled (the option is in the App Setting tab of the app).
- Clone this repository and
cd
into it. - Open the workspace in Xcode 9.
- Make sure the version of Swift is 3.2 in the PusherSwift target so it can compile without errors. In the project navigator, select Pods, then in the Targets section select PusherSwift, and in the Build Settings tab look for the option Swift Language Version. Change it to Swift 3.2 if necessary.
- Edit
ViewController.swift
to enter you Pusher app key, secret, and cluster - You have to run the project in a real device with iOS 11. AR won’t work in the simulator, so configure a team to sign your app (a paid developer account is not required for testing in one device).
- Wait until the app detect enough planes (the status will change to READY) to start measuring.
- Go to the Debug console to see the measuring events sent to Pusher.
MIT