A minimal iOS AR app that displays virtual objects at specific geographical locations, in an AR scene.

Overview

AR Simple GeoLocation

AppIcon

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

The project;

  • 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.swift file to specify geographical locations near you
(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] :">
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]
       :

It shows;

  • 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.

You can

  • 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. :)

Image Image GIF

You can enable the Object Occlusion in the Settings screen if you use iPhone or iPad, with LiDAR.

Image Image Image

Geographical Location Tracking during an AR session

Image

Type structure

Image

Models

This project uses Apple's USDZ model files. You can download other models.

References

MIT License

You might also like...
PlacenoteSDK Sample app in native iOS using ARKit, written primarily in Swift

Placenote SDK for iOS Placenote SDK lets you easily build cloud-based Augmented Reality (AR) apps that pin digital content to locations in the real wo

An iOS app ๐Ÿ“ฑthat detects the image and plays video on top of it just like the harry potter movies
An iOS app ๐Ÿ“ฑthat detects the image and plays video on top of it just like the harry potter movies

AR-Magic-Image This is an iOS application ๐Ÿ“ฑ inspired from Harry Potter movies. It tracks the image and plays the assigned video on top of the image u

Furniture E-Commerce Augmented Reality(AR) app in iOS powered by ARKit
Furniture E-Commerce Augmented Reality(AR) app in iOS powered by ARKit

HomeMax-iOS Furniture E-Commerce Augmented Reality(AR) app in iOS powered by ARKit and SceneKit. Inspired by IKEA place app. Description Experience on

AR Ruler - A simple iOS app made using ARKit and SceneKit
AR Ruler - A simple iOS app made using ARKit and SceneKit

A simple iOS app made using ARKit and SceneKit.Which can try to simplify little things in your life such as measuring stuff.

Smart Online Shopping iOS App with Augmented Reality (AR) and simple Social Media features using SwiftUI and Google Firebase Cloud Services
Smart Online Shopping iOS App with Augmented Reality (AR) and simple Social Media features using SwiftUI and Google Firebase Cloud Services

Table of contents App Demo How to Run Context Content How it's written Inspiration App Demo AR.online.shopping.iOS.demo.mp4 How to Run First make sure

Funny app with the fitting of sunglasses Used SwiftUI and RealityKit
Funny app with the fitting of sunglasses Used SwiftUI and RealityKit

Reality-Glasses-2021 on SwiftUI Funny app with the fitting of sunglasses. Used SwiftUI and RealityKit Interface and Features: Simple Intuitive Design

ARID - Augmented Reality app using Appleโ€™s ARKit framework which can recognise faces of famous scientists
ARID - Augmented Reality app using Appleโ€™s ARKit framework which can recognise faces of famous scientists

ARID Augmented Reality app using Appleโ€™s ARKit framework which can recognise fac

ARDicee - Simple augmented reality app using SceneKit and ARKit
ARDicee - Simple augmented reality app using SceneKit and ARKit

ARDicee Simple augmented reality app using SceneKit and ARKit Requirements Xcode

An iOS Framework Capture & record ARKit videos ๐Ÿ“น, photos ๐ŸŒ„, Live Photos ๐ŸŽ‡, and GIFs ๐ŸŽ†.
An iOS Framework Capture & record ARKit videos ๐Ÿ“น, photos ๐ŸŒ„, Live Photos ๐ŸŽ‡, and GIFs ๐ŸŽ†.

An iOS Framework that enables developers to capture videos ๐Ÿ“น , photos ๐ŸŒ„ , Live Photos ๐ŸŽ‡ , and GIFs ๐ŸŽ† with ARKit content.

Owner
Yasuhito Nagatomo
Freelance iOS app developer | AR ML
Yasuhito Nagatomo
Placing Virtual Objects in Augmented Reality

Placing Virtual Objects in Augmented Reality Learn best practices for visual feedback, gesture interactions, and realistic rendering in AR experiences

Yuchao 279 Dec 11, 2022
ARInRoomISS - A minimal iOS AR app that displays the International Space Station (ISS) in the room

A minimal iOS AR app to display the International Space Station (ISS) in the room.

Yasuhito Nagatomo 3 Feb 3, 2022
A minimal iOS AR app that displays a wave animation using RealityKit2 Geometry Modifier

AR Simple Sea A minimal iOS AR app that displays a wave animation using RealityKit2 Geometry Modifier. Xcode 13.3 Target: iOS / iPadOS 15.0+ SwiftUI,

Yasuhito Nagatomo 15 Dec 29, 2022
ARVideoPortal - A Minimal iOS AR app to display 360 / video in sphere space

AR Video Portal A minimal iOS AR app to display 360 / video in sphere space. Xco

Yasuhito Nagatomo 6 Jun 3, 2022
AREarthObservatory - A minimal iOS AR app that visualizes time-series changes in the global environment based on data from NASA satellites

A minimal iOS AR app that visualizes time-series changes in the global environment based on data from NASA satellites

Yasuhito Nagatomo 3 Aug 11, 2022
A minimal iOS AR app with the Comic Postprocess Effect

AR Comic Effect A minimal iOS AR app with the Comic Postprocess Effect. Xcode 13.2.1 Target: iOS / iPadOS 15.0+ SwiftUI, ARKit, RealityKit 2, Core Ima

Yasuhito Nagatomo 14 Jun 22, 2022
This is a minimal AR Portal app that uses the RealityKit's occlusion materials to hide the inner space

AR Simple Portal This is a minimal AR Portal app that uses the RealityKit's occlusion materials to hide the inner space. Xcode 13.2.1 Target: iOS / iP

Yasuhito Nagatomo 6 Aug 10, 2022
Reality-iOS - NFT Augmented Reality(AR) app that demonstrate application of ARImageTracking in iOS powered by ARKit 2

Reality-iOS NFT Augmented Reality(AR) app that demonstrate application of ARImag

Ikmal Azman 6 Nov 28, 2022
Sample iOS AR app that demonstrates how to capture the texture of a user's face in realtime.

Sample iOS AR app that demonstrates how to capture the texture of a user's face in realtime. This texture can be used to create a simple textured 3D face model.

Matt Bierner 58 Dec 14, 2022
IOS example app to generate point clouds in ARKit using scenedepth

Visualizing a Point Cloud Using Scene Depth Place points in the real-world using the scene's depth data to visualize the shape of the physical environ

Isak Diaz 20 Oct 31, 2022