CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects.
CocoaPods is built with Ruby and is installable with the default Ruby available on OS X. We recommend you use the default ruby. Using the default Ruby install can require you to use sudo when installing gems.
sudo gem install cocoapods
List the dependencies in a text file named Podfile in your Xcode project directory:
platform :ios, '8.0'
target 'YOUR_PROJECT_TARGET' do
use_frameworks!
pod "nbcu_mps_ios_sdk/google_mobile_ads", :git => 'https://github.com/NBCUOTS/mobile_mps_sdk_ios_examples.git', :tag => 'release-2.1.0'
end
Then install all your dependencies.
pod install
You should have access to “https://github.com/NBCUOTS/mobile_mps_sdk_ios_examples.git” repository.
Google Mobile Ads SDK requires adding the NSAllowsArbitraryLoads exception to make sure your ads are not impacted by App Transport Security (ATS) on iOS 9 devices.
For iOS 10 devices, NSAllowsArbitraryLoadsForMedia and NSAllowsArbitraryLoadsInWebContent are required to make sure your ads are not impacted by ATS.
Add these values to the info.plist file of your application.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
Reference: Google ATS details.
If you want to disable system log messages, you can optionally add OS_ACTIVITY_MODE=disable to the Environment Variables under Arguments of the scheme.
Make sure you are using cocoapods >= “1.3.1”.
And make sure Swift Version of the pod was successully set
If you see a message about updating the Google Mobile Ads SDK, please contact the MPS SDK Support team prior to updating.
Email: mps-sdk-support@nbcuni.com, DPIM Slack channel: #mps_sdk_support