dyld: Library not loaded: RealityFoundation – Error on iOS 14 with RealityKit 2

I've just implemented some necessary fixes to our app to ensure compatibility with iOS 15 and ARKit 2. Now when I deploy the app via XCode 13 RC (Version 13.0 (13A233)) I get the following crash right at launch:

dyld: Library not loaded: /System/Library/Frameworks/RealityFoundation.framework/RealityFoundation

  Referenced from: /private/var/containers/Bundle/Application/…

  Reason: image not found

dyld: launch, loading dependent libraries

DYLD_LIBRARY_PATH=/usr/lib/system/introspection

DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib

Is this a known issue? I've already tried deleting Derived Data and clearing the project but the problem persists.

The minimum deployment target is iOS 13 for the main app and iOS 14 for the AppClip. All iOS 15 related fixes are wrapped into if #available(iOS 15.0, *) { … }

This is a pretty major problem for us as we now can't send out Testflights or upload to AppStoreConnect for Monday.

Thanks!

Answered by Frameworks Engineer in 687808022

See release notes for iOS & iPadOS 15: https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15-release-notes

Add OTHER_LD_FLAGS = -weak_framework RealityFoundation to your Xcode Project settings to allow running RealityKit apps on an older OS.

Accepted Answer

See release notes for iOS & iPadOS 15: https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15-release-notes

Add OTHER_LD_FLAGS = -weak_framework RealityFoundation to your Xcode Project settings to allow running RealityKit apps on an older OS.

dyld: Library not loaded: RealityFoundation – Error on iOS 14 with RealityKit 2
 
 
Q