Search Unity

Unity Ads Error Causing Cloud Build to Fail

Discussion in 'Unity Build Automation' started by poolts, Sep 16, 2015.

  1. poolts

    poolts

    Joined:
    Aug 9, 2012
    Posts:
    113
    I'm getting the following error when iOS is building to Cloud Build (the build works locally).

    Code (CSharp):
    1. [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
    2. 565: [xcode] 1 error generated.
    3. 566: [xcode] ** BUILD FAILED **
    4. 567: ! build of 'default-ios' failed. compile failed
    5. 568: Finished: FAILURE
    6. Status: FAILED
    I've tried adding (to line 95 in UnityAdsPostProcess.cs):
    Code (CSharp):
    1. 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.
     
  2. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    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 https://github.com/rasmus-unity/CloudBuildAdsTest46

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

    -Rasmus
     
  3. poolts

    poolts

    Joined:
    Aug 9, 2012
    Posts:
    113
    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 :\
     
  4. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    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
     
  5. poolts

    poolts

    Joined:
    Aug 9, 2012
    Posts:
    113
  6. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    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