Unity_uses_webcam, unity_uses_iap

Our builds fail with:

" ‘AdSupport/ASIdentifierManager.h’ file not found" and other errors.

I have to disable the following two in the the “Preprocessor” in Xcode or otherwise it doesn’t build, any ideas why? We don’t use Ads or webcam permissions for anything in our app

Do you have the Unity ads or in-app purchasing packages in your project?

I do not, hence the confusion. I don’t even have the “Services” connected in Project Settings

Can you share your project manifest (Packages/manifest.json) so we can see what packages are installed? It’s possible these were added by default or as a dependency of some other package. A bug report with the full project would be even more helpful.

Massive project to share sorry, but here is the manifest.json, hopefully you can see if there is some package that makes that fail:

{
“dependencies”: {
“com.unity.ai.navigation”: “1.1.5”,
“com.unity.collab-proxy”: “2.2.0”,
“com.unity.ext.nunit”: “1.0.6”,
“com.unity.ide.rider”: “3.0.27”,
“com.unity.ide.visualstudio”: “2.0.22”,
“com.unity.ide.vscode”: “1.2.5”,
“com.unity.mobile.android-logcat”: “1.4.0”,
“com.unity.networking.backgrounddownload”: “file:…/LocalPackages/com.unity.networking.backgrounddownload@856f24b9b2”,
“com.unity.shadergraph”: “14.0.10”,
“com.unity.test-framework”: “1.1.33”,
“com.unity.textmeshpro”: “3.0.6”,
“com.unity.timeline”: “1.7.6”,
“com.unity.ugui”: “1.0.0”,
“com.unity.vectorgraphics”: “2.0.0-preview.17”,
“com.unity.xr.arfoundation”: “5.1.1”,
“com.unity.xr.hands”: “1.3.0”,
“com.unity.xr.interaction.toolkit”: “2.5.2”,
“com.unity.xr.management”: “4.4.1”,
“com.unity.xr.oculus”: “4.1.2”,
“com.unity.xr.visionos”: “1.0.3”,
“com.valvesoftware.unity.openvr”: “file:…/Assets/SteamVR/OpenVRUnityXRPackage/Editor/com.valvesoftware.unity.openvr-1.1.4.tgz”,
“com.unity.modules.ai”: “1.0.0”,
“com.unity.modules.androidjni”: “1.0.0”,
“com.unity.modules.animation”: “1.0.0”,
“com.unity.modules.assetbundle”: “1.0.0”,
“com.unity.modules.audio”: “1.0.0”,
“com.unity.modules.cloth”: “1.0.0”,
“com.unity.modules.director”: “1.0.0”,
“com.unity.modules.imageconversion”: “1.0.0”,
“com.unity.modules.imgui”: “1.0.0”,
“com.unity.modules.jsonserialize”: “1.0.0”,
“com.unity.modules.particlesystem”: “1.0.0”,
“com.unity.modules.physics”: “1.0.0”,
“com.unity.modules.physics2d”: “1.0.0”,
“com.unity.modules.screencapture”: “1.0.0”,
“com.unity.modules.terrain”: “1.0.0”,
“com.unity.modules.terrainphysics”: “1.0.0”,
“com.unity.modules.tilemap”: “1.0.0”,
“com.unity.modules.ui”: “1.0.0”,
“com.unity.modules.uielements”: “1.0.0”,
“com.unity.modules.umbra”: “1.0.0”,
“com.unity.modules.unityanalytics”: “1.0.0”,
“com.unity.modules.unitywebrequest”: “1.0.0”,
“com.unity.modules.unitywebrequestassetbundle”: “1.0.0”,
“com.unity.modules.unitywebrequestaudio”: “1.0.0”,
“com.unity.modules.unitywebrequesttexture”: “1.0.0”,
“com.unity.modules.unitywebrequestwww”: “1.0.0”,
“com.unity.modules.vehicles”: “1.0.0”,
“com.unity.modules.video”: “1.0.0”,
“com.unity.modules.vr”: “1.0.0”,
“com.unity.modules.wind”: “1.0.0”,
“com.unity.modules.xr”: “1.0.0”
},
“scopedRegistries”:
}

Hey! Thanks for sharing the package manifest. I understand that it can be difficult to share your project but without being able to replicate the issue, there’s only so much we can do.

I tried a build with this package manifest. Obviously I don’t have access to those local packages, but as you say nothing there brings in the adds or in-app purchasing packages. My build didn’t have UNITY_USES_IAD enabled in the preprocessor header.

The Webcam issue is indeed a bug. Would you mind submitting a bug report for that one? I confirmed that if any code uses WebCamTexture you will hit compile errors in Xcode. You should be able to at least track that one down and add #if !UNITY_VISIONOS on that code to work around the webcam thing. I think you also need to check for WebCamDevice and a few other classes.

I’m not sure what, other than those Unity packages, would result in UNITY_USES_IAD getting flipped on. I’ll ask around.

I’ll submit the bug report on the Webcam one, thank you. Let us know if you hear anything about the UNITY_USES_IAD one : )

P.S> Bug report sent " IN-68183 - Vision Pro builds fail when using “WebCamTexture” anywhere in the code"

So I got some info back on this. I’m not sure if this is the only cause, but apparently if you use the UnityEngine.iOS.Device.advertisingIdentifier API, that will define UNITY_USES_IAD in the built Xcode project. We’re aware of the breaking issue around UNITY_USES_IAD but if you would like to track our progress on this, please also submit a bug report for this issue.