Working on a simple AR app recently using Unity as a library (UAAL) to embed Unity inside a native app using AR Foundation 5.0.5 in Unity 2022.2.10 for Android and iOS. At first I thought the crashes were due to UAAL, so I did some builds of the Unity app on its own to iOS/Android devices. I noticed when I disabled/enabled the AR Session component and the AR Camera gameobject with Multithreaded Rendering enabled, the app would crash sometimes when doing this.
As soon as I disabled Multithreaded Rendering in player settings, the crashes stopped happening.
I found this issue here but nobody logged a bug for this and multiple users mentioned disabling multi-threaded rendering fixed their crash issue as it did for me. There are quite a few issues on github where people mentioned this too but not a single one of them bothered to file a Unity bug and report back! Persistent crashes on iOS when unloading scene · Issue #95 · Unity-Technologies/arfoundation-samples · GitHub
I get the following error from Xcode:
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ARFrame storageMode]: unrecognized selector sent to instance 0x1514753f0'
terminating with uncaught exception of type NSException
Reported to Unity with Bug: IN-35599 - [AR Foundation] MultiThreaded Rendering crash AR Foundation when enable/disable AR Session on iOS+Android