Unity Ads Error Causing Cloud Build to Fail

I’m getting the following error when iOS is building to Cloud Build (the build works locally).

[xcode] /BUILD_PATH/ingg.we-r-football-staging.default-ios/temp.8j9nLK/Libraries/UnityAdsUnityWrapper.h:7:9: fatal error: 'UnityAds/UnityAds.h' file not found
565: [xcode] 1 error generated.
566: [xcode] ** BUILD FAILED **
567: ! build of 'default-ios' failed. compile failed
568: Finished: FAILURE
Status: FAILED

I’ve tried adding (to line 95 in UnityAdsPostProcess.cs):

dependencyList.Add ("DeviceInfo.framework");

As some people suggest, but not sure if I have explicitly add the UnityAds header file.

I’m on Unity 4.6.8p1 and the latest Unity Ads plugin.

Many thanks, Alex.

Hi Alex,

Created a simple test project with latest Ads asset store package, and that builds without problems on Cloud Build using Unity 4.6.8f1. You can see the source code at GitHub - rasmus-unity/CloudBuildAdsTest46

Just to be sure, have you added files in Assets/Plugins/iOS/UnityAds.framework/Headers to your repo?

-Rasmus

Hi Rasmus,

I’ve checked the repo and yes the files are there. It’s so weird that a local build works absolutely fine. Funny enough, last night it suddenly came up with same error (locally) but I updated to the latest Unity Ads plugin and it went away (and has done since). I wonder if there is some post process that is messing it up.

Atm, I have no idea how to get UCB working to find the header file :\

So it still fails when building on UCB? In that case, can you try to make a small repro project, which you can share with us for investigation?

/Rasmus

Hi Rasmus,

It looks like it is the same problem found at: UnityAds/UnityAds.h Not Found in Xcode - Unity 5 - Unity Services - Unity Discussions

Ok, I’ll continue the thread there. However would be good if you can provide an example of a project which fails to build on Cloud Build. I got my project above to build, so I believe it’s possible to make it work.

Thanks,
Rasmus