iOS AR app shows black background rather than a camera overlay in production

Using UE5, the app compiles correctly for a development build. I can download the .ipa file to my iPhone directly and the AR works as expected. However, when compiling for production/distribution, the app does not use the camera to show the user’s real-world surroundings, but instead shows a black background that the virtual objects are set in. The app prompts the user to provide camera permissions and these permissions can be confirmed in the Settings app, but the camera still does not seem to be used in the AR app. What could potentially be causing this?

3 Likes

Have same issue( using ARKit
All works good with development build on ios
But with shipping build camera show only objects on level but with black background

I suggest you officially report this bug.

1 Like

Hi, I have the same issue. Has anyone already found a solution?

Hi, Has anyone solved this, I am also getting black screen on AR camera material. Is there any updates?

I got it working by downloading unreal from GitHub and changed the source so I can sign a development build with a distribution certificate. I only needed to put the app on TestFlight, I wouldn’t recommend doing this for something planned to be released to the store

1 Like

Would you mind giving a little more detail instructions on what you changed?

thx-e

in ‘Engine/Source/Programs/UnrealBuildTool/Platform/IOS/IOSExports.cs’

comment out

Text.AppendLine(“\tget-task-allow”);
Text.AppendLine(string.Format(“\t<{0}/>”, bForDistribution ? “false” : “true”));

I also turned off pak file creation in settings and turned off all compression as the above fixed the camera, but then the images wouldn’t get recognised. turning off compression fixed that issue.

Using unreal 5.0.3 and xcode 13.4.1

2 Likes

For reference, there is an open issue for this in Epic’s Bugtracker.
Unreal Engine Issues and Bug Tracker (UE-156807). It was pushed to 5.2 some time before 5.1’s release.

We are also getting hit with this. We have actually written ObjC code to talk directly to iOS and get the camera feed which we then compose into the 3D scene using a post process material.
It “works”. We get AR but the solution is far from ideal since we don’t have the resources to devote into making this temp solution resource efficient.

Seems like it may have been fixed: Unreal Engine Issues and Bug Tracker (UE-156807)
Finger crossed…

Not fixed, that ticket was a dupe. You can follow progress on the active ticket here: Unreal Engine Issues and Bug Tracker (UE-147930)

2 Likes

Thanks for the link. Any chance of hearing back from the team on a fix seeing as this is an absolutely application breaking issue?

1 Like

Hi there. We noticed that the target fix for this again has been moved. Any updates on why that is? In its current form UE5 is essentially unusable for AR if you plan to ship anything. Just wondering why that specific bug doesn’t have higher priority. Me and I guess the community would really love to hear back if you find the time.

2 Likes

UE 5.2 Preview 1

The problem is still unresolved

1 Like

I solved this problem myself, in a slightly strange way, but everything works, I tested it in 5.1 from the Launcher.

I assume that at the moment when the system asks us to access the camera, the engine does not successfully access certain functions, or cannot get certain rights.

i used this plugin from marketplace “iOS QR Code Reader in Code Plugins”

First, I start an AR session so that this plugin can access the camera, after which
I just spawn this class and initialize it, then destroy it and stop the AR session.
After these manipulations, the engine already receives the information it needs without any problems at the start of the AR session.
I perform this manipulation once at the start of the level, after which all subsequent calls to the StartARSession function work without problems.

however, I do not presume to claim that this will work for you, as the plugin is not free!

2 Likes

When will there be news for this very serious bug? There are so many of us waiting. Thank you so much!

i tried this, but it doesn’t work. I’m using the unreal template for augmented reality, where do you put this code? To test it, I created a new map that I run first and then call the map HandheldARBlankMap

I forgot to write here, the class must be created and don’t delete, otherwise there will be periodic crashes, I spawn this class in GameMode on the Begin play, and the scheme above is not relevant, everything is much simpler, you just need to spawn a class and call the init function

tested on 5.1.1 (works perfect!)

tested on 5.0, 5.2 (not working!)

1 Like

Thanks a lot, but it doesn’t work for me. These are my screens, I don’t understand where I’m going wrong. Also I have 5.1.1 and SDK 14.3.
Thank you so much!
Maybe I



very strange, it works for me, I checked it in several projects.

macOS Monterey 12.6.4
XCode 13.4.1
Metal 2.4
iOS 15
Unreal Engine 5.1.1

maybe the session config are wrong?
try the diagram below to check

1 Like