can't compile in Xcode to build a ios app using Unity SDK

642 views
Skip to first unread message

Zhao Ximing

unread,
May 22, 2017, 12:51:09 AM5/22/17
to Google Mobile Ads SDK Developers
Hi,
  
  I am using Unity SDK and have already download the ios SDK and import the framework to Xcode, and it keeps showing that

 " error: unknown type name 'GADNativeExpressAdView'; did you mean 'GADUNativeExpressAd'?

@property(nonatomic, strong) GADNativeExpressAdView *nativeExpressAdView;

                             ^~~~~~~~~~~~~~~~~~~~~~

                             GADUNativeExpressAd"

After googled a while, I have set the `enable Modules (C and Objective-C)` flag of Apple LLVM 8.1 - Language - Modules of Building Settings to YES, But things still not work out

Here is the environment:

   Unity 5.5.2f
   Xcode version

      Xcode 8.3.2

屏幕快照 2017-05-22 上午12.44.02.png

Ivan Bautista (Mobile Ads SDK Team)

unread,
May 22, 2017, 6:47:51 AM5/22/17
to Google Mobile Ads SDK Developers
Hi Zhao, 

The exported Xcode project from Unity already includes the Mobile Ads SDK in it. Have you tried building and running a fresh copy of the exported XCode project as specified in this guide without importing the Mobile Ads framework and see if you still encounter the build errors?

Regards,
Ivan Bautista
Mobile Ads SDK Team

ximing

unread,
May 22, 2017, 11:26:58 AM5/22/17
to google-adm...@googlegroups.com
Hi, Ivan

Thanks for reply, I have re-exported the project from Unity in a new folder and build that via Xcode, and didn't import the Admob IOS SDK manually as adviced it will be imported via Unity SDK, but seems things are still no good.

picture of Xcode settings were attached.



--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/yteyEGMZjfg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

屏幕快照 2017-05-22 下午11.23.07.png
屏幕快照 2017-05-22 下午11.17.29.png
屏幕快照 2017-05-22 下午11.17.53.png

Ivan Bautista (Mobile Ads SDK Team)

unread,
May 23, 2017, 6:56:31 AM5/23/17
to Google Mobile Ads SDK Developers
Hi Zhao,

Did you do any modifications, aside from the required Build configurations, in the exported project or just build and run it as is? Could you try doing the same process of building using our sample app and see if you encounter the same build errors?

For us to investigate further, could you provide us a copy of your exported Xcode project so we can test it on our end?

ximing

unread,
May 25, 2017, 1:18:45 AM5/25/17
to google-adm...@googlegroups.com
Hi Ivan,

I Have successfully build your demo and build my app on the other mac, but when coming to build my app on this mac, the error keeps showing, have been struggled for this for about two days now, and try to clean/reset everything on Xcode and Unity.

BUT ON THE OTHER MAC, IT JUST COULD BUILD LIKE CHARM.

And your demo could build, so yes, maybe it's not AdMob's fault.

Have compared the Xcode Version, Unity Version and even the OS version, they are the same on the machine that could build my app and the one couldn't. except that the one couldn't build has a newer version of OSX(10.12.5 vs 10.12.3).

Frankly, I am not very familiar with the f**king Xcode's Build Logic, Especially the damn cache logic of it maybe?

So, if you could give some advice on how to troubleshoot this problem on this specific Mac, will be very appreciated. I am despairing. :-(


内嵌图片 1



--

Ivan Bautista (Mobile Ads SDK Team)

unread,
May 25, 2017, 3:36:50 AM5/25/17
to Google Mobile Ads SDK Developers
Hi Zhao,

We could try this one thing and see if it helps. After applying the required Build Settings modifications, could you try cleaning before rebuilding the project and see if the build errors persist? I tried setting Enable Modules (C and Objective-C) to No, then rebuild the project and was able to reproduce similar build error. Setting it back to Yes, then cleaning and rebuilding the project fixed it.

Being that you were able to build your project and our sample app in another machine suggests that this could most probably be a build setup issue exclusive in your machine. I suggest that you double check as well in the Apple Developer forums to get more insights regarding this and possible causes for build errors like this.

Md Khalid Musa Sagar

unread,
Jul 16, 2017, 8:41:21 AM7/16/17
to Google Mobile Ads SDK Developers
Hi,
I faced the exact same problem and was able to resolve it by downloading the latest GoogleAdmob package.
Hopefully, it'll work for you too.
Regards
Reply all
Reply to author
Forward
0 new messages