Can't access the 4K camera on my iPhone

I have followed the description below to request a 4K camera configuration.
https://docs.unity3d.com/Packages/com.unity.xr.arkit@5.1/manual/whats-new.html
But still can’t access the 4K camera on my iPhone.

I found that when the code runs to cameraManager.GetConfigurations(Allocator.Temp), it returns nothing to me.

I want to ask if someone can help me with my problem.

My unity version is at 2021.3.19, AR Foundation 5.1.0-pre.3, ARKit XR Plugin 5.1.0-pre.3.

iPhone 14 Pro with iOS 16.4.1.

If cameraManager.GetConfigurations is returning nothing, then that would be a bug. Please file a bug and if you can link us the bug/ticket number after you submit it, that would allow us to take a look at it.

I successfully access the 4K camera on my iPhone.

I found out that if followed the code in the description, it will request the camera configuration at the same time as the app starts, and this will return nothing to me.

So I set up a button to manually request the camera configuration after the app finished loading the scene, and everything worked fine.

It requests the configuration one frame after app start actually. Note the yield return new WaitForEndOfFrame: What's new in version 5.1 | Apple ARKit XR Plugin | 5.1.5

Are you saying camera configurations were still not available on the following frame? I’ve never seen that

I have noticed that it requests one frame after app starts, but it still doesn’t work.

So I tried various other methods and finally got it working when manually requesting it.

It’s possible that the session might take more than 1 frame to initialize. The more correct way to make this check is to subscribe to the ARSession.stateChanged event: AR Session component | AR Foundation | 5.0.7

Configurations should be available in SessionInitializing and SessionTracking states