This project demonstrates how ARKit's private SPI can be used to record and replay AR sessions, thus enabling a convenient development workflow and test automation.
Disclaimer: Functionality exposed and used in this project is private SPI. It's not guaranteed to be reliable or stay available in any form in future versions of ARKit. It definitely cannot be used in production versions of apps distributed on the App Store.
How to build
Clone the repository and open
ARRecorder.xcodeproj in Xcode 10 or newer. Configure automatic codesigning by opening project settings, ARRecorder target, General, and configuring the Team setting in the Signing section.
How to use
The app starts a normal AR session once launched. Tap Record to start recording the session to a local file. Then tap Finish to complete the recording and continue a normal session. To replay a previously recorded session, tap Replay, then select the file. To stop the replay at any time, tap ╳.
During both normal, recording and replay sessions, tap anywhere to place a virtual cube in the scene at the estimated physical location that corresponds to your touch. Note that this won't be recorded into the replay file: you can interact with the session differently during recording and replay.
To delete a recorded file, tap Replay and swipe left on a file row, then tap Delete. You can also access all session recordings using the Files app by selecting On My iPhone/iPad location, where ARRecorder's documents container will show up. The app is also configured to allow File Sharing via iTunes.
All iOS 11.3+ devices with A9 chip or newer are supported. This includes:
- iPhone SE
- iPhone 6S, 6S Plus or newer
- iPad (2017, 5th generation) or newer
The project can be modified to support a wider range of hardware by replacing session's world tracking configuration with an orientation tracking configuration.
This work is licensed under a BSD 3-Clause License.