Swiftpack.co - quanghits/GoogleMobileAds as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
quanghits/GoogleMobileAds
Swift Package Manager for Google Mobile Ads SDK.
.package(url: "https://github.com/quanghits/GoogleMobileAds.git", from: "8.12.0")

Swift Package Manager for Google Mobile Ads SDK

Currently Google doesn't provide Google Mobile Ads SDK as Swift package manager. This repository is alternate for using that as Swift package manager. Framework is updated directly from the original library, ensuring security. You can completely rest assured to use.

Required Settings

  • Add the -ObjC option to Other Linker Flags in the Build Settings tab of the host project.

Workaround for Xcode 12.0...12.4

Add the following script to Scheme -> Build -> Post-actions.

rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Frameworks/GoogleMobileAds.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/PlugIns/GoogleMobileAds.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Watch/GoogleMobileAds.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/AppClips/AppClip.app/GoogleMobileAds.framework"

rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Frameworks/UserMessagingPlatform.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/PlugIns/UserMessagingPlatform.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Watch/UserMessagingPlatform.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/AppClips/AppClip.app/UserMessagingPlatform.framework"

rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Frameworks/GoogleAppMeasurement.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/PlugIns/GoogleAppMeasurement.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/Watch/GoogleAppMeasurement.framework"
rm -rf "${TARGET_BUILD_DIR}/${PRODUCT_NAME}.app/AppClips/AppClip.app/GoogleAppMeasurement.framework"

Official Information

https://developers.google.com/admob/ios/download
There are release notes, terms of service, SDK binary and more.
You can download official xcframework and construct your own Swift package safely.

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

Donate

GitHub

link
Stars: 28
Last commit: 5 days ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

8.12.0
5 days ago

Update GoogleMobileAds.xcframework 8.12.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics