Google Mobile Ads fully supports Swift

Since its release a few years ago, Swift has evolved into a dynamic, modern programming language for developing iOS apps. With its growing popularity and open source, we’ve seen an increase in requests from our publishers to fully support Swift in the Google Mobile Ads SDK. We responded by releasing a complete set of example apps built in Swift, adding Swift code snippets throughout our developer docs, and adding Swift API reference docs to our developer sites.

Our GitHub repo now has Swift example apps for banners, interstitials, and native ads for both AdMob and DFP. We’ve also added a Swift version of our API Demo app. The API Demo app demonstrates features of the Google Mobile Ads SDK, such as new ways to customize ad requests, experiment with multiple ad sizes, and compare AdMob and DFP technologies, to help you improve the user experience and maximize ad revenue.

We’ve also added Swift code snippets to our AdMob, DFP, and AdX developer docs. With nicely formatted widgets that display Swift and Objective-C code side by side, you can now easily compare SDK implementations in both Swift and Objective-C.

Finally, we’ve added Swift API reference docs to our AdMob and DFP developer sites, providing full documentation of our iOS Google Mobile Ads SDK. Now you have access to API reference docs for both Swift and Objective-C, making it easier to integrate with our SDK.

The Google Mobile Ads SDK team is committed to supporting Swift, and we’ll continue to update our SDK, developer docs, and example apps to ensure we provide publishers with full support for the latest version of Swift. Whether you currently develop your iOS apps in Swift, or have plans to do so in the future, we hope the actions we’ve taken to support Swift in our SDK will help make your experience with Swift more enjoyable and your transition to Swift a whole lot easier.

If you have any questions or feedback regarding our SDK or Swift support, feel free to contact us through our forum.