2016-11-14 50 views
1

我正在將項目從Unity3d導出到使用最後一個GoogleMobileAds包的xcode。 我已經安裝和更新的CocoaPods,也有著名的podfile含德下面幾行:cocoapods谷歌手機廣告不生成.xcworkspace文件

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 

,我跑

pod install 

pod update 

成功

的依賴關係是下載好吧,你可以看到下面的結果:

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. 

根據雙方的CocoaPods和谷歌移動廣告的文件,我需要繼續用「MyProject.xcworkspace」,但該文件是無處可尋。

有什麼建議嗎?

+0

閱讀這個答案http://stackoverflow.com/a/10960309/7115714和評論 –

+0

都能跟得上...項目目錄中不會出現名爲something.xcworkspace的文件或文件夾....項目名稱也對應於podfile中的目標名稱。 通常應該在運行pod安裝後創建 – kavehmb2000

回答

0

您使用的是this指南安裝pod?

+0

差不多。我也使用了Google_Mobile_Ads_SDK。 – kavehmb2000

1

看來問題來自使用TextEdit編輯Podfile。

由於它警告您不應該繼續使用TextEdit,人們可能會錯誤地認爲該程序足夠聰明,可以理解並糾正這些不需要的修改。 這是我已經找到了解決辦法:

  1. 從您的工作目錄
  2. 刪除Podfile和Podfile.lock使用吊艙初始化
  3. 安裝SublimeText創建一個新的Podfile並用它來打開Podfile
  4. 添加必要的豆莢,項目 (我還包括線路,雖然它可能不是 需要「use_frameworks!」。)
  5. 運行「莢安裝」和「莢更新」;這次我得到

    [!]請關閉任何當前的Xcode會話並從現在開始使用Orbit.xcworkspace這個項目。

和文件在使用install! 'cocoapods', :integrate_targets => false的CocoaPods不會爲你創建一個xcworkspace現在在項目目錄

1

可用。

這就是預期的行爲。如果遵循命令提示符,您甚至會注意到這一點。這條線告訴你,沒有整合正在發生。

Skipping User Project Integration

如果你想獲得一個xcworkspace只是刪除:integrate_targets => false

+0

這是我的正確答案,刪除':integrate_targets => false',它會生成'.xcworkspace'。謝謝! – rikobo