Search code examples
unity-game-engineadmobcocoapods

cocoapods Google Mobile ads does not generate .xcworkspace file


I am exporting a project from Unity3d to xcode that uses the last GoogleMobileAds package. I have installed and updated cocoapods and also have the famous podfile containing de following lines:

source 'https://github.com/CocoaPods/Specs.git'
install! 'cocoapods', :integrate_targets => false
platform :ios, ‘8.0’

target ‘MyProject’ do
    pod 'Google-Mobile-Ads-SDK', '~> 7.14’
    pod 'Firebase/Core'
    pod 'Firebase/AdMob'
end

and I run

pod install

and

pod update

successfully

dependancies are downloaded alright, as you can see the results below:

Updating local specs repositories

CocoaPods 1.2.0.beta.1 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.0.beta.1

Analyzing dependencies
Downloading dependencies
Using Firebase (3.9.0)
Using FirebaseAnalytics (3.5.1)
Using FirebaseCore (3.4.4)
Using FirebaseInstanceID (1.0.8)
Installing Google-Mobile-Ads-SDK (7.14.0)
Using GoogleInterchangeUtilities (1.2.2)
Using GoogleSymbolUtilities (1.1.2)
Using GoogleToolboxForMac (2.1.0)
Generating Pods project
Skipping User Project Integration
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 8 total pods installed.

According to both cocoapods and google mobile ads documentation, I will need to continue with "MyProject.xcworkspace" but the file is nowhere to be found.

any suggestions?


Solution

  • When using install! 'cocoapods', :integrate_targets => false Cocoapods will not create an xcworkspace for you.

    That's the intended behaviour. You'll even notice this if you follow the command prompt. This line is telling you that no integration is taking place.

    Skipping User Project Integration

    If you want to get an xcworkspace just remove :integrate_targets => false