[英]How to add dependency to Cocoapods
我正在嘗試創建一個Cocoapods庫。 我的圖書館將包含Google-Mobile-Ads-SDK作為依賴項。 我使用了以下命令
pod lib create BannerViewController
> my email address
What language do you want to use?? [ ObjC / Swift ]
> Swift
Would you like to include a demo application with your library? [ Yes / No ]
> Yes
Which testing frameworks will you use? [ Quick / None ]
> None
Would you like to do view based testing? [ Yes / No ]
> No
然后我編輯了BannerViewController.podspec添加了以下行
s.dependency 'Google-Mobile-Ads-SDK', '~> 7.0'
我試圖使用pod lib lint BannerViewController.podspec
[!] BannerViewController did not pass validation, due to 1 error and 3 warnings.
You can use the `--no-clean` option to inspect any issue.
我嘗試在示例目錄中進行pod更新並出現以下錯誤
[!] The 'Pods-BannerViewController_Example' target has transitive dependencies that include static binaries: (/Developer/BannerViewController/Example/Pods/Google-Mobile-Ads-SDK/GoogleMobileAdsSdkiOS-7.4.0/GoogleMobileAds.framework)
我不知道如何將Google-Mobile-Ads-SDK添加到我的開發窗格中,以便我可以在本地測試我的代碼。 Cocoapods文檔不清楚。 我正在使用Cocoapods 0.38.2
使用pod lib lint BannerViewController.podspec --use-libraries
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.