Machineboy空

RealityKit 입문 - 한국에선 불가한 ARGeoAnchor 본문

언어/swift

RealityKit 입문 - 한국에선 불가한 ARGeoAnchor

안녕도라 2024. 10. 15. 22:39

ARGeoAnchor

https://developer.apple.com/documentation/arkit/argeotrackingconfiguration

 

ARGeoTrackingConfiguration | Apple Developer Documentation

A configuration that tracks locations with GPS, map data, and a device's compass.

developer.apple.com

 

절망스럽게도 supported Area 명단에 Korea는 없다..

나 애플에 일조할 수 있는 건가..?

https://developer.apple.com/documentation/arkit/arsession/recording_and_replaying_ar_session_data

 

Recording and Replaying AR Session Data | Apple Developer Documentation

Record an AR session in Reality Composer and replay it in your ARKit app.

developer.apple.com

이거 내일 알아보겠다.

 

struct ContentView: View {
    @State private var geoTrackingAvailable: Bool = false

    var body: some View {
        ZStack {
            if geoTrackingAvailable {
                ARViewContainer()
                    .edgesIgnoringSafeArea(.all)
            } else {
                Text("GeoTracking is not available.")
                    .font(.title)
                    .foregroundColor(.red)
            }
        }
        .onAppear {
            ARGeoTrackingConfiguration.checkAvailability { available, error in
                if let error = error {
                    print("Error checking GeoTracking availability: \(error.localizedDescription)")
                }
                geoTrackingAvailable = available
            }
        }
    }
}