question

AppyNation Ltd. avatar image
AppyNation Ltd. asked ·

[Unity iOS Plugin] AmazonAd.framework headers are missing

Have just put the latest AmazonAd.framework into my project and Xcode cannot find the headers. Looking in the framework you can see that they're not there:

https://dl.dropboxusercontent.com/u/46041424/no_headers.png

And this is the previous framework:

https://dl.dropboxusercontent.com/u/46041424/headers.png

mobile ads
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Justin Kovac avatar image
Justin Kovac answered ·
Hi AppyNation, Could you please try dragging your framework back into the project? There is a Versions/A directory that contains the necessary header files. I just tested the latest version and didn't have any issues. Thanks!
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AppyNation Ltd. avatar image
AppyNation Ltd. answered ·
Which project are you talking about? Unity or Xcode?
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AppyNation Ltd. avatar image
AppyNation Ltd. answered ·
If you're talking about Xcode then that's not the way things work with Unity 5. There is now a plugin inspector in Unity which allows frameworks (and other native files) to be added into the Unity project as assets. These files will then be incorporated into the build for the desired platforms. This system worked nicely with your previous AmazonAd.framework. https://dl.dropboxusercontent.com/u/46041424/Screen%20Shot%202015-10-22%20at%2009.59.37.png Using the new framework however causes build errors in Xcode because the headers cannot be found. /Users/andymaddison/OCCW/UnityProject/Builds/40d/Libraries/Plugins/iOS/AMAZONAmazonMobileAdsImpl.h:25:9: 'AmazonAd/AmazonAdRegistration.h' file not found In file included from /Users/andymaddison/OCCW/UnityProject/Builds/40d/Libraries/Plugins/iOS/AMAZONAmazonMobileAdsObjectiveCControllerImpl.m:27: I tried deleting the framework and then adding manually in Build Phases but no difference. I tried dragging it into the Project Navigator but still no difference.
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AppyNation Ltd. avatar image
AppyNation Ltd. answered ·
Any chance of further help? I cannot get past the 'AmazonAd/AmazonAdRegistration.h' file not found error. I've tried building from Unity, then in Xcode adding the new framework to Build Phases and explicitly adding to the Frameworks folder in the Project navigator.
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Pfeiffer avatar image
David Pfeiffer answered ·
I had the same issue. I went to the AmazonAd.framework file and copied the header file from amazonad.framework/versions/a into amazonad.framework file and deleted the rest. After that i importet the framework into xcode and right now i have no compile errors. Got some new compile errors which don't belong to that problem, so i couldn't see if it really worked but maybe it'll help.
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Pfeiffer avatar image
David Pfeiffer answered ·
I'm sorry this didn't fix the issue. Got the same problems later again.
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AppyNation Ltd. avatar image
AppyNation Ltd. answered ·
Yeah, I think I tried doing this too.
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin avatar image
justin answered ·
Hi all, I'm very sorry but I'm still unable to reproduce these errors. I did notice, however, that your framework has some dependencies checked on it. Could you please try unselecting all dependencies prior to building? I understand this may defeat the purpose of needing to add these frameworks manually, but any help in narrowing down a root cause will allow us to dive deeper on the issue. If you could share any type of empty sample project for us to look at, we'd be more than happy try to troubleshoot directly on that!
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AppyNation Ltd. avatar image
AppyNation Ltd. answered ·
Ok, no problem, I'm using Unity 5.2 (currently 5.2.2) and Xcode 7 btw. (1) Get this zip that uses the old framework and extract to a new Unity project. https://dl.dropboxusercontent.com/u/46041424/UnityProjectWithOldFramework.zip Build for iOS and open in Xcode. Builds ok for me. (2) Now get this zip that uses the new framework and extract to another new Unity project. https://dl.dropboxusercontent.com/u/46041424/UnityProjectWithNewFramework.zip Again build for iOS and open in Xcode. Build fails with: /Users/andy/Unity/AmazonMobileAds2/Builds/8d/Libraries/Plugins/iOS/AMAZONAmazonMobileAdsImpl.h:25:9: 'AmazonAd/AmazonAdRegistration.h' file not found Note that framework is in Frameworks/Plugins/iOS in Project Navigator. If you expand the framework the actual header files cannot be seen (just a single file named Headers). (3) Now get this zip that has no framework and extract to another new Unity project. https://dl.dropboxusercontent.com/u/46041424/UnityProjectWithoutFramework.zip Again build for iOS and open in Xcode. Manually add the new framework via Build Phases - Link Binary With Libraries and build. Same error for me. /Users/andy/Unity/AmazonMobileAds2/Builds/9d/Libraries/Plugins/iOS/AMAZONAmazonMobileAdsImpl.h:25:9: 'AmazonAd/AmazonAdRegistration.h' file not found
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin avatar image
justin answered ·
Hi AppyNation, Thanks for your samples and patience on the matter. Looking at the framework in the project you've provided, it appears the file contents have somehow been modified. If you navigate to Apps-SDK/Ads/AmazonAd.framework, you will see the Headers folder as an OSX folder alias. For some reason, your header file is showing as plain text in Xcode, so your headers aren't being pointed to the appropriate directory. A few suggestions of what this could be: Are you using Cloud Build or any other service to build your Unity app? Did you completely unzip the whole Apps-SDK zip file prior to putting it in the Plugins/iOS? Browsing the package and dragging the framework out may break it's alias relationships. Are you using the default OSX archive utility? I'm very curious as to why your package is importing differently, so please let us know!
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.