I\'m trying to add optional support for an AR feature to an existing app using RealityKit. The app builds and runs fine on both iOS 10 and iOS 13 devices with the optional featu
Looks like the way around this issue is with a canImport(module)
preprocessor directive. This worked for me:
#if canImport(RealityKit)
import RealityKit
@available(iOS 13.0, *)
class MyARClass {
@IBOutlet weak var arView: ARView!
...
}
#endif
Check your project setting by going to Build Settings, find Framework Search Paths and add $(SRCROOT) and be sure it's recursive.