Google AdMob in Swift
Let's create a simple single view application Create a new Xcode project Choose a template for your new project -> select "Single View Application" -> Next Fill your product name and choose Language : Swift Build and run your new project, the app will show a blank screen. Let's add AdMob SDK into your application Note: CocoaPods is the dependency manager for Swift and Objective-C We will install AdMob SDK by using CocoaPods. There are 2 steps for the installation. 1.Create the Podfile (in the same directory as the example.xcodeproj) File name : Podfile File contents : source 'https://github.com/CocoaPods/Specs.git' platform :ios, '7.0' pod 'Google-Mobile-Ads-SDK', '~> 7.0' 2.Install AdMob SDK by using Podfile Close all projects Open terminal Go to directory which has Podfile Run pod install Let's make a simple banner in your application 1.Open up file "example.x...
Comments
Post a Comment