UnityAds/UnityAds.h Not Found in Xcode - Unity 5

Hey,

Just updated to Unity 5 and am having a compile issue in Xcode. Running UnityAds 1.1.2 and Xcode 6.2.

The compile error is "-/Plugins/iOS/UnityAdsUnityWrapper.h:7:9: ‘UnityAds/UnityAds.h’ file not found.

I’m seeing the same thing, any solution yet?

I have same issue. My project has been fine with Unity 4.6, then this problem appear when I upgrade to Unity 5.

I guess it is a bug from Unity. I’m experiencing the same with Unity 4.6.3 so, it is not an issue of Unity 5. It is an issue of Unity Ads update.
Meanwhile to fix this issue replace the path to <UnityAds/UnityAds.h> with this one:
<UnityAds/UnityAds.framework/Headers/UnityAds.h>

Best regards.

1 Like

I’m getting the same error. I tried changing the path as you said but now I’m just getting “ld: framework not found for UnityAds” under a Apple Mach-O-Linker error

Is there any solution to this? I’ve been banging my head against the wall and I’m not at all proficient with Mac so I can’t puzzle my way through this.

Is anyone still getting this error message with the Unity Ads asset package v1.1.4, the latest Unity patch (4.6.4p4 or 5.0.1p3), and the latest version of Xcode v6.3.1?

I am still getting this error latest UnityAds 1.1.4, Xcode 6.3.1 … but I have Unity 4.6.4f1

Whats strange that it worked for me yesterday. The only change I can think of is that I tried integrating Admob today. And this error started happening.

When I change the import address to teh full <UnityAdfs/UnityAds.framework…> Then I get the Match-O Linker error of UnityAd framework not found - even though I see it linked in the project build settings.

Hello! I have some problem too. "-/Plugins/iOS/UnityAdsUnityWrapper.h:7:9: ‘UnityAds/UnityAds.h’ file not found. I have UnityAds 1.1.4, Xcode 6.3.1, Unity 4.6.4f1 too. I added UnityAds.framework and bundle to xcode. But i cant find DeviceInfo.framework. in SDK from asset store. Please, Help me! My game have 2 millions of downloads!

In the XCode. Very Need Help!

2105181--137975--Screen1.png

This is still an ongoing issue. Being that it’s difficult to reproduce, I haven’t been able to nail down what causes it exactly. However, it does appear to resolve itself after updating to the latest versions of Unity Ads, Unity, and Xcode.

Please make sure that you’re using the latest version of Unity Ads in your project (1.1.4), the latest patch release of Unity (4.6.5p1 or 5.0.1p4), and the latest version of Xcode (6.3.1).

Also make sure that the Scripting Backend is set to IL2CPP and Architecture is set to Universal under Player Settings in Unity for iOS before building your Xcode project.

If you have been building your Xcode project from Windows, please build your project from Unity on a Mac instead.

When asked to save your Xcode project, select the option to Replace instead of Append.

If you still experience this issue after all of the above, export the contents of your Unity project as an asset package. Then create a new Unity project and import the asset package into the new project.

If this still doesn’t fix the issue, make the asset package available to download by sending me a Dropbox link in a private conversation so I can look over the contents for any potential issues.

Outside of the above cases, possible causes for this issue under optimal conditions include:

  • Unity Ads assets moved from their original import directories.
  • Legacy Unity Ads build scripts still exist somewhere in the project.
  • Possible conflict with other 3rd party plugins and Unity Ads build scripts.

I have not been able to reproduce this issue. Any additional info would be helpful.

I fixed it in my game by adding the -ObjC into that line in build phases. Looks like if you don’t have iTunes installed a couple steps don’t get run, and that was one of them.

Oh and make sure your slashes are correct in your library paths. Unity put a \ in when it should have been a /

I had to change that too.

Where did you add the -ObjC ? in Xcode somewhere? I am building from windows and then bringing Xcode project to Mac.

OK, so probably what I should have done a week ago … I created a brand new empty project and added UnityAds… and viola it does work on iPhone.

So now, I am going to slowly deconstruct whats wrong with my big ass project.

UPDATE:
It looks some kind of conflict with the admob iOS plugin. I am noob in mac/iOS world so cant say whats wrong but admob requires to set YES to “Enable Modules (C and ObjC)” in build settings. and maybe thats whats causing an issue with Unity Ads?

1 Like

I confirm it. It is conflict with admob plugin for ios! After deleting files of admob in the folder plugins/IOS game work. I use this plugin Unity Asset Store - The Best Assets for Game Making. But i think it use native libraries

1 Like

I found a solution (before this I updated UnityAds to the last version and Unity to 4.6.6f2 and the problem was still there)

For me, I still had the problem after removing admob from iOS.
What I did was delete UnityAds.framework from the UnityAds folder in Xcode and then add it again and it solved it.

I have just started seeing this issue after updating Xcode from 6.2 to 6.3.2. I have the latest Unity Ads package (1.2.1) and Unity 4.6.7.

I don’t have AdMob but have just added the Amazon Mobile Ads plugin. Will remove it and see what happens.

EDIT:

Ok it looks like a conflict with the Amazon Mobile Ads plugin for me.

Or more precisely, it’s the addition of the AmazonAd.framework alone that does it.

i.e. Create new project with Unity Ads 1.2.1 - build to Xcode. Xcode builds ok. Add framework Xcode fails to build.

But then removing the framework, and doing a clean and build does not fix it.

I had this issue after importing 4-5 ad network plugins in the same project.
IvyKun’s solution fixed this for me, basically removing the UnityAds.framework from the Xcode project and then re-adding the file fixes it. However I have to do this everytime I open the Xcode project. This started occurring after I added Vungle’s ad network plugin.

So it seems the problem occurs with certain other plugins (AdMob, Amazon Mobile Ads and Vungle so far).

Well just tried this and it fixed the UnityAds issue - however I now have FacebookSDK/FacebookSDK.h file not found. I have Vungle too but not AdMob or Amazon Mobile Ads.

EDIT:

So I tried the same trick with the FacebookSDK.framework which got me past that issue.

I thought that I’d confirmed it was due to Amazon Mobile Ads but I don’t have that now. I don’t have AdMob either.