A minimal iOS AR, Augmented Reality, app that displays virtual objects at specific geographical location, in an AR scene.
With the app you can
- specify virtual object’s geographical locations with latitude, longitude, and altitude
- show virtual objects in an AR scene when you are nearby
- hide them when you leave them
- Xcode 14.0 beta 1 (The project file requires Xcode 14.0 or later.)
- Target: iOS / iPadOS 15.0 and later (You can easily change to iOS 14 support.)
- Frameworks: SwiftUI, ARKit, RealityKit, Core Location
- Before running the app, modify
ModelDataSet.swiftfile to specify geographical locations near you
ModelAsset( id: UUID(), name: "Drummer", thumbnailFile: "drummer128", // optional assetFile: "toy_drummer", // USDZ or reality file name (without ext) scale: SIMD3<Float>(1, 1, 1), // scale to display the virtual object orientationOnYAxis: 0, // orientation on Y axis [radian] approachingDistance: 10.0, // [m] distance to start showing the object distanceAway: 20.0, // [m] distance to hide the object latitude: 35.68157, // Tokyo station <-- change location [deg] +/-90 longitude: 139.76561, // <-- change location [deg] +/-180 altitude: 3.5), // <-- change location [m] :
- how to use Core Location to update user device’s geographical locations
- how to link virtual space and geographical space
- how to coordinate real space tracking with camera and sensors, and geographic tracking with location services.
The app provides minimal UI and limited features, to clarify the basic code and logic. Please modify the project to make your own apps.
- download virtual object data from the server, depending on the user’s’ location
- show navigation to virtual objects near the user
I hope you find this project helpful. 🙂
Mobile \ Read more \ 11.08
Into the piggy bank of interesting facts about Objective-C. Recently, I wrote about the fact that the language has the...
SwiftUI: Packaging Views
Learn how to extract your SwiftUI view into a Swift Package that you can reuse in your other apps! In...
Starscream – WebSocket in Swift.
Starscream is a conforming WebSocket (RFC 6455) library in Swift. Features Conforms to all of the base Autobahn test suite. Nonblocking....
Microsoft opens emoji from Windows 11
Developers can take most of Microsoft's bright and colorful 3D emoji and turn them into stickers, use them in content,...
Mobile \ Read more \ 10.08
Read more about iOS and Android development.
Kotlin Symbol Processing API – Kotlin for compiler plugins
Kotlin Symbol Processing (KSP) is an API that you can use to develop lightweight compiler plugins. KSP provides a simplified...