A change to the Google Mobile Ads SDK that makes the framework greater than 100MB has been introduced as of version 7.32.0, and Firebase 5.7.0 is locked to this new version.
Files greater than 100MB cannot be pushed to GitHub:
remote: error: File Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds is 102.08 MB; this exceeds GitHub's file size limit of 100.00 MB
The recommended CocoaPods workflow is to commit dependencies to source control in order to be able to rebuild the app exactly as it was deployed: https://guides.cocoapods.org/using/using-cocoapods#should-i-check-the-pods-directory-into-source-control
Without changing this workflow solely to accommodate Firebase, developers are forced into either using the previous release of Firebase, or excluding this dependency from source control. If the framework size for AdMob cannot be reduced in order to allow pushing to GitHub, the Firebase podspec should not require 7.32.0 as a hard minimum version.
The reason why I've opened this issue against this repository is because I'm unable to use the latest version of Firebase due to the AdMob dependency being locked to 7.32.0, and this could be resolved by reducing the minimum required version.
Thanks for the report @stevenp. We'll follow up with the Google Mobile Ads SDK on a solution. (Internally tracked at b/113496608).
In the meantime, the workaround would be to stick to Firebase 5.6.0.
A workaround that will enable using the latest Firebase and Google Mobile Ads is removing the i386 slice from the framework. It's not likely that you need to run the simulator on a 32bit mac:
$ ls -l Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds
-rwxr-xr-x 1 paulb eng 107034736 Aug 29 07:44 Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds
$ mv Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds input
$ lipo -remove i386 input -o Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds
$ ls -l Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds
-rwxr-xr-x 1 paulb eng 81208216 Aug 29 13:36 Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds
While the lipo trick worked well with Google-Mobile-Ads-SDK v7.32.0, unfortunately it doesn't work with v7.33.0 (released 2018‑09‑10), as the resulting binary is still > 100MB without the i386 slice.
I am having the same issue with 7.33.1 File size too large to push to GitHub remote. I need this for
Firebase ad tie-in. Has a workaround been found?
Just tried lipo on 7.33.1 and it only reduced the binary size from 123733208 to 112246088, still too large
This is planned to be fixed in the next release of the Google-Mobile-Ads-SDK CocoaPod.
It's just totally messed up my project and I cannot push my work to github anymore. I followed the instructions for large file storage. Didn't work. I did your thing above, to remove the google admob sdk, but it still comes back with this error message when pushing...it is like git thinks the files are still there? But they aren't. I am not a master of github so i don't know what to do now and I have kept localling committing my work for a few days now since this push problem occurred...
Currently I removed ALL the firebase PODS, did a POD INstall to remove them, and tried to push but I get the same error!! Help.
This is the push error i get (but i removed googlmobileads!):
Pushing to https://github.com/benSmith1981/TheDiveAdvisor.git
POST git-receive-pack (chunked)
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.
remote: error: Trace: 18425b444fbe736d7318ca5917c7954f
remote: error: See http://git.io/iEPt8g for more information.
remote: error: File Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/GoogleMobileAds is 118.00 MB; this exceeds GitHub's file size limit of 100.00 MB
To https://github.com/benSmith1981/TheDiveAdvisor.git
= [up to date] BUILD1 -> BUILD1
! [remote rejected] newMapDisplay -> newMapDisplay (pre-receive hook declined)
error: failed to push some refs to 'https://github.com/benSmith1981/TheDiveAdvisor.git'
@benSmith1981 The issue is that once you put this big file into your repo, it creates a giant nightmare because even if you remove it, if you've committed it at all, Git tries to push the big file that's still in your commit history. The best way to fix it for now is to search for the various ways to go back and edit your commit history to remove the commit where you added the file. I also wasted several hours on this when it happened. I ended up using BFG Repo Cleaner. Just be careful with it.
Hmm i dunno about that... I switched my repo to gitlab and it stopped complaing.... removed the admobs pod tho
@benSmith1981 If you don't want to use GitHub anymore, that's your choice. I just provided you with a solution to the problem you asked for help with.
Fixed in Google-Mobile-Ads 7.34.0
I verified that the library successfully pushes to github at https://github.com/paulb777/BigBinaryTest
Thanks !!!
I downloaded GoogleMobileAds from https://github.com/paulb777/BigBinaryTest and substitute it from the original GoogleMobileAds.framework/GoogleMobileAds
but I got this linking error when building:
`
Undefined symbols for architecture x86_64:
“_OBJC_CLASS_$_GADInterstitial”, referenced from:
“_OBJC_CLASS_$_GADRequest”, referenced from:
“_OBJC_CLASS_$_GADMobileAds”, referenced from:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`
@xinyu-liu https://github.com/paulb777/BigBinaryTest was only a test. Please use Google-Mobile-Ads 7.35.1
thanks for the quick response!!!
I downloaded https://developers.google.com/admob/ios/download and unzipped it.
GoogleMobileAds.framework/GoogleMobileAds is still too big to push to github :(
137.4 MB
Oh right. The CocoaPods version is split into two pieces, but the version in the binary framework download is not.
Is there a place I could download the two pieces version please?
This is not a supported use case, but you can see the vendored_framework and vendored_library in the CocoaPod at https://github.com/CocoaPods/Specs/blob/master/Specs/5/9/a/Google-Mobile-Ads-SDK/7.35.1/Google-Mobile-Ads-SDK.podspec.json#L40
This is AWESOME! Thank you so much!!
Getting the same error again with v7.37.0:
remote: error: File Frameworks/GoogleMobileAds.framework/GoogleMobileAds is 132.69 MB; this exceeds GitHub's file size limit of 100.00 MB
@iMinichrispy I'm not able to reproduce with CocoaPods:
~/qs/quickstart-ios/admob $ ls -l Pods/Google-Mobile-Ads-SDK/Libraries/libGoogleMobileAds.a
-r-xr-xr-x 1 paul primarygroup 67304024 Dec 25 14:15 Pods/Google-Mobile-Ads-SDK/Libraries/libGoogleMobileAds.a
~/qs/quickstart-ios/admob $ ls -l Pods/Google-Mobile-Ads-SDK/Frameworks/frameworks/GoogleMobileAds.framework/
total 140312
-rwxr-xr-x 1 paul primarygroup 71838256 Dec 25 14:15 GoogleMobileAds
drwxr-xr-x 77 paul primarygroup 2464 Dec 25 14:15 Headers
drwxr-xr-x 3 paul primarygroup 96 Dec 25 14:15 Modules
~/qs/quickstart-ios/admob $ grep -r Mobile-Ads-SDK Podfile.lock
Podfile.lock: - Google-Mobile-Ads-SDK (~> 7.37)
Podfile.lock: - Google-Mobile-Ads-SDK (7.37.0)
If you're using the zip distribution, see https://github.com/firebase/firebase-ios-sdk/issues/1759#issuecomment-432872499
Ah, my b! Think it was the zip distribution. Thanks!
Most helpful comment
Fixed in Google-Mobile-Ads 7.34.0
I verified that the library successfully pushes to github at https://github.com/paulb777/BigBinaryTest