SLAM on iOS (AppClip)
Why a bridge
Safari on iOS does not implement full WebXR. To offer SLAM experiences on iOS, Monolook uses a native bridge based on AppClip that:
- Runs native iOS tracking (ARKit) with direct camera access
- Exposes a WebXR-equivalent API to maintain code homogeneity
- Transfers position and orientation data to the web environment in real time
- Manages the complete XR session lifecycle on iOS
How it works
[User opens the experience in Safari]
↓
[Platform detection → iOS]
↓
[AppClip is launched]
↓
[AppClip activates native ARKit]
↓
[Bridge exposes WebXR-like API]
↓
[Your Vue/Three.js code works the same]Platform detection
The Springs of Love guide uses Bowser for platform detection:
javascript
import Bowser from 'bowser'
const browser = Bowser.getParser(navigator.userAgent)
const platform = browser.getOSName() // 'iOS', 'Android', etc.Depending on the platform, the experience redirects to the appropriate flow (WebXR or AppClip).
Future compatibility
The SDK incorporates internal pose recalculation to maintain independence from the XR provider. If Apple implements full WebXR in Safari, the SDK can migrate automatically without changes to client code.
Reference
For a complete implementation example with AppClip, see the Full experience guide based on the Springs of Love project.