Unity 2017.4 / Google Mobile Ads SDK for iOs 7.31.0 / xCode 9.2 (9C40b)

435 views
Skip to first unread message

Andy Llora

unread,
Jun 4, 2018, 2:46:03 AM6/4/18
to Google Mobile Ads SDK Developers
Hello,

I have a Unity project running ads fine on android.
No other in game purchases or API being used except Admob banners.

Without ads it built fine in xCode, now with Admob SDK,
I build and get many .h pathing errors that I have already resolved in xCode build process.

For the Arch= on xCode : armv7s was removed per readme.txt.

I am down to the last few errors, and most refer to to arch keys not found, so removing armv7 eliminates half the errors, and putting back armv7 and removing arm64 removes the other half of the errors.
Obviously, I cannot build if I remove both.

Can anyone tell me how to eliminate these errors. Here are some of the build log entries:

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
      _OBJC_CLASS_$_GADStoreKitProductViewController in GoogleMobileAds(flat-armv7)
  "_OBJC_METACLASS_$_SKStoreProductViewController", referenced from:
      _OBJC_METACLASS_$_GADStoreKitProductViewController in GoogleMobileAds(flat-armv7)
  "_OBJC_CLASS_$_GLKView", referenced from:
      objc-class-ref in GoogleMobileAds(flat-armv7)
  "_OBJC_CLASS_$_SKProductsRequest", referenced from:
      objc-class-ref in GoogleMobileAds(flat-armv7)
  "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
      objc-class-ref in GoogleMobileAds(flat-armv7)
  "_CTRadioAccessTechnologyDidChangeNotification", referenced from:
      l3578 in GoogleMobileAds(flat-armv7)
  "_OBJC_CLASS_$_SKPaymentQueue", referenced from:
      objc-class-ref in GoogleMobileAds(flat-armv7)
  "_SKStoreProductParameterITunesItemIdentifier", referenced from:
      l2106 in GoogleMobileAds(flat-armv7)
  "_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
      objc-class-ref in GoogleMobileAds(flat-armv7)
  "_UTTypeCreatePreferredIdentifierForTag", referenced from:
      l5462 in GoogleMobileAds(flat-armv7)
      l5594 in GoogleMobileAds(flat-armv7)
  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
      objc-class-ref in GoogleMobileAds(flat-armv7)
      objc-class-ref in GoogleMobileAds(GADGestureIdUtil.o)
  "_GLKMatrix4Identity", referenced from:
      l4151 in GoogleMobileAds(flat-armv7)
      l4162 in GoogleMobileAds(flat-armv7)

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
      _OBJC_CLASS_$_GADStoreKitProductViewController in GoogleMobileAds(flat-arm64)
  "_OBJC_METACLASS_$_SKStoreProductViewController", referenced from:
      _OBJC_METACLASS_$_GADStoreKitProductViewController in GoogleMobileAds(flat-arm64)
  "_OBJC_CLASS_$_GLKView", referenced from:
      objc-class-ref in GoogleMobileAds(flat-arm64)
  "_OBJC_CLASS_$_SKProductsRequest", referenced from:
      objc-class-ref in GoogleMobileAds(flat-arm64)
  "_OBJC_CLASS_$_MFMessageComposeViewController", referenced from:
      objc-class-ref in GoogleMobileAds(flat-arm64)
  "_UTTypeCreatePreferredIdentifierForTag", referenced from:
      l16572 in GoogleMobileAds(flat-arm64)
      l16709 in GoogleMobileAds(flat-arm64)
  "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
      objc-class-ref in GoogleMobileAds(flat-arm64)
  "_CTRadioAccessTechnologyDidChangeNotification", referenced from:
      l14594 in GoogleMobileAds(flat-arm64)
  "_OBJC_CLASS_$_SKPaymentQueue", referenced from:
      objc-class-ref in GoogleMobileAds(flat-arm64)
  "_SKStoreProductParameterITunesItemIdentifier", referenced from:
      l13053 in GoogleMobileAds(flat-arm64)
  "_OBJC_CLASS_$_ASIdentifierManager", referenced from:
      objc-class-ref in GoogleMobileAds(flat-arm64)
      objc-class-ref in GoogleMobileAds(GADGestureIdUtil.o)
  "_GLKMatrix4Identity", referenced from:
      l15214 in GoogleMobileAds(flat-arm64)
      l15226 in GoogleMobileAds(flat-arm64)
  "_SecCertificateCreateWithData", referenced from:
      l11668 in GoogleMobileAds(flat-arm64)
  "_SecTrustCreateWithCertificates", referenced from:
      l11668 in GoogleMobileAds(flat-arm64)
  "_OBJC_CLASS_$_MFMailComposeViewController", referenced from:
      objc-class-ref in GoogleMobileAds(flat-arm64)
  "_kUTTagClassMIMEType", referenced from:
      l16572 in GoogleMobileAds(flat-arm64)
      l16709 in GoogleMobileAds(flat-arm64)
  "_SecKeyRawVerify", referenced from:
      l11671 in GoogleMobileAds(flat-arm64)
  "_SecTrustEvaluate", referenced from:
      l11668 in GoogleMobileAds(flat-arm64)
  "_SecTrustCopyPublicKey", referenced from:
      l11668 in GoogleMobileAds(flat-arm64)


Are these build errors something I can even fix without SDK authors getting involved?
I would like to resolve and build my app with ads without removing architectures, lol.

Please help, I would appreciate your time, thanks!



mobileadssdk-a...@google.com

unread,
Jun 4, 2018, 6:03:59 AM6/4/18
to Andy Llora, Google Mobile Ads SDK Developers
Hi Andy, 

Thank you for providing us error logs captured as well as other helpful details.

I tried to build the HelloWorld Unity project on my end and I was able to successfully build and run the exported Xcode project (as is) on my end without encountering the build errors you've mentioned. I'm using Unity 2018.1.1f1, Xcode 9.3 and Google Mobile Ads Unity plugin 3.13.1 (which was built and tested with Google Mobile Ads iOS SDK 7.30.0)

Are there any other modifications made on the build configurations/settings of the exported XCode project on your end? Is it possible for you to try creating an iOS build from our HelloWorld project and see if you still are getting the same build errors?

For us to check on our end, could you provide to us privately (using Reply privately to author option) a copy of the Unity project you are working on where the issue is reproducible?

Regards,
Ivan Bautista
Mobile Ads SDK Team

54 Bones Games

unread,
Jun 4, 2018, 11:51:36 AM6/4/18
to mobileadssdk-a...@google.com, Google Mobile Ads SDK Developers
Yes, I can do both of those requests tonight.

I appreciate you looking to this.

54 Bones Games

unread,
Jun 4, 2018, 3:12:10 PM6/4/18
to google-adm...@googlegroups.com, mobileadssdk-a...@google.com
I am using GoogleMobileAds v 3.12.0.unitypackage, could that be the issue related to these errors, along with 2000+ warnings or deprecation?
--


Thank you,

A Bones

A Bones

unread,
Jun 5, 2018, 12:52:49 AM6/5/18
to Google Mobile Ads SDK Developers
Hello, 

Here is the result of the Hello World with the steps I performed:

For the hello world app I did these steps:

Android Test
  • Opened Hello World in unity
  • Installed GoogleMobilesAds v3.13.1 unity package from GitHub
  • Convert project to Android and assign package name in Player Settings 
  • Ran Unity plugin Resolver for Android and iOs - success.
  • Build and Run to Device, and Hello world app works fine.
  • Sample banners, interstitial and rewarded all request and display fine on mobile.
iOs Test
  • Change project to iOs in Unity
  • Build to iOs.
  • Open project in xCode
  • Set package name in xCode
  • Verified Armv7s was not in listed Arch settings.
  • Set developer Team to my team
  • Ran Product/Clean
  • Ran Product/Archive
       Received 1 error and build failed: File not found GoogleMobileAds.h not found

       Drag file GoogleMobileAdsSDKiOS-7.31.0 from desktop into xCode frameworks
  • On dialog for import
  • [x] Copy items 
  • [x] Create folder references
  • Add to Targets [x] Unity-iphone
  • Run Product/Archive....build fails.
At this point Hello World is exactly where my project is, Apple Mach-0 Linker(id) errors causing build failure.
All the same as what I posted in my op.

Let me know if you need my project files still, seems that would be of little use, seeing Hello World 
build process is identically flawed on my end for some reason.

Thank you.

A.

mobileadssdk-a...@google.com

unread,
Jun 5, 2018, 3:45:18 AM6/5/18
to A Bones, Google Mobile Ads SDK Developers
Hi Andy,

Thank you for your patience and for taking your time to try out the suggestions given earlier.

It is indeed odd that you are still getting the "File not found GoogleMobileAds.h not found" with your exported Xcode project even after running the Unity plugin resolver while your Android build is working fine. That said, we re-tested the HelloWorld Unity project and was able to build and run the iOS app successfully. Using the older 3.12.0 version of the Google Mobile Ads Unity plugin should have not triggered the build error but I tested it and confirmed that I was able to build the project successfully.

That said, I think you may have missed out on attaching your Unity project in your recent private response. Could you try re-sending it again privately?

In the meantime, you may also try manually adding the missing frameworks in your project. Based on the error logs you've captured earlier, below are the frameworks that seem to be missing.
  • GLKit
  • StoreKit
  • Core Telephony
  • AdSupport
  • MessageUI
You may also check on your end what framework you are missing by the prefix of the missing reference. For example, "_SKStoreProductViewController" is from the StoreKit framework.

A Bones

unread,
Jun 5, 2018, 4:43:43 PM6/5/18
to Google Mobile Ads SDK Developers
Ivan,

For those who might read this thread, I have done the following, and it has removed 100% of the errors.

So when adding GoogleMobileAds Unity plugin to a unity project,
and then adding  GoogleMobileAdsSDKiOS to the resulting iOS Unity build, 
there are dependencies to frameworks not mentioned anywhere that I could find:

The following is recommended.
Add frameworks per Ivan:
  • GLKit
  • StoreKit
  • Core Telephony
  • AdSupport
  • MessageUI
Also I had to Add:
  • Security.framework
  • MobileCoreServices.framework.
I added them by going to 
Project Unity-iPhone > Build Phases >  Link Binary with Libraries
Hit + and added frameworks on the popup dialog.

Build Success!

Thank you for your assistance and time Ivan!

-A.
Reply all
Reply to author
Forward
0 new messages