I have come across a really strange issue that has kept me busy for over a week which i believe to be a bug with the GoogleAdMob SDK, Xcode 8.2, cocoapods or a combination of those.
I am posting it here, in hopes an engineer can confirm the bug and point our team in the right direction to resolution.
The problem goes like this:
- Create an empty Xcode project
- Add/Install
GoogleAds-IMA-iOS-SDK-For-AdMob
pod - Commit everything and delete the repository from local machine
- Check out repository again
- Hit Build. Project will fail to build with error
ld: framework not found GoogleMobileAds
- To fix, comment out the
GoogleAds-IMA-iOS-SDK-For-AdMob
pod and runpod update
, then uncomment it again and runpod update
again, project will build. - If you try to commit at this point, git will pick up no changes
- Repeat steps 3 and 4, and you will be back at step 5
I have created a repository here https://github.com/piterwilson/testAdmob where the bug can be reproduced.
The 'fix' that i have found will not work for our team as we commit our code and send it to a Jenkins server that creates a lot of builds with different code signatures required by our business.
The Jenkins build always fails with ld: framework not found GoogleMobileAds
Extra information : This has only happened starting this year. Maybe because of Xcode 8.2 (?) but we can't be sure where the problem is exactly.
I created a PR that resolves the issue in a reliable manner: https://github.com/piterwilson/testAdmob/pull/1
The repository was missing the GoogleAdMobs binary. It's a rather large file (38M), so perhaps the submitter of the question has some local configuration that automatically ignores large files? The binary should have been in this commit: https://github.com/piterwilson/testAdmob/commit/a0834a4d2f2b82da98add1bc3c49d8c0c28ffd86 (at least that's when it appeared for me when I tried to reproduce the issue.)