Autofocus Issue with Vuforia Cloud-Based AR on iPhone 16 Pro Max
Summary:
I’m developing a cloud-based AR app using Vuforia that tracks images and displays videos. The app works well on most iPhone models, but I’m encountering a serious autofocus issue on the iPhone 16 Pro Max.
Problem Summary:
The continuous autofocus doesn’t work reliably on the iPhone 16 Pro Max. Despite using Vuforia’s camera configuration for continuous autofocus and implementing it during runtime through scripting, the autofocus remains unstable and slow. This affects image recognition and tracking performance, especially when the target image or phone moves slightly.
Observed Behavior:
-
Other iPhone models: Autofocus works swiftly and accurately without issues.
-
iPhone 16 Pro Max: Autofocus either doesn’t engage at all or is very slow and unreliable. Even when the image appears to be in focus, the app sometimes fails to recognize the target image.
Expected Behavior:
-
The autofocus should work consistently across all devices, including the iPhone 16 Pro Max.
-
The script should successfully engage continuous autofocus after Vuforia initializes, with smooth recognition and stable tracking.
What I’ve Tried:
-
Vuforia Camera Configuration: I set continuous autofocus in the Vuforia Configuration in the Inspector window, but it didn’t resolve the issue.
-
Runtime Autofocus via Script: I implemented continuous autofocus using the script below, but the issue persists.
using UnityEngine;
using Vuforia;
public class CamerafocusController: MonoBehaviour
{
void Start()
{
VuforiaApplication.Instance.OnVuforiaStarted += OnVuforiaStarted;
}
private void OnVuforiaStarted()
{
bool focusModeSet = VuforiaBehaviour.Instance.CameraDevice.SetFocusMode(FocusMode.FOCUS_MODE_CONTINUOUSAUTO);
if (!focusModeSet)
{
Debug.Log("Failed to set focus mode" + focusModeSet);
}
VuforiaBehaviour.Instance.CameraDevice.SetCameraMode(Vuforia.CameraMode.MODE_OPTIMIZE_SPEED);
}
}
However, the autofocus response is still inconsistent on the iPhone 16 Pro Max, and the camera struggles to focus on the target image.
Steps to Reproduce:
-
Create a basic Vuforia project with an image target.
-
Build and deploy the app to an iPhone 16 Pro Max.
-
Observe the autofocus behavior while scanning the target image.
Affected Versions:
-
Vuforia Engine Version: 10.27
-
Unity Version: Unity 6
-
Workstation OS: macOS
-
Device: iPhone 16 Pro Max (iOS 18)
Other Observations:
-
The autofocus works fine on other iPhone models but not on the iPhone 16 Pro Max.
-
Even when the image appears in focus, Vuforia sometimes fails to recognize the target.
Question:
Has anyone encountered similar autofocus issues on the iPhone 16 Pro Max with Vuforia? Are there any workarounds or specific configurations I can apply to improve the autofocus behavior and ensure consistent tracking on this device?
Shalesh Shekhar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.