簡體   English   中英

本地CocoaPods干擾其他豆莢

[英]Local CocoaPods interfering with other pods

我正在編寫一個Swift框架和一個Swift iOS應用程序,並且試圖使用Cocoapods將我的框架添加到我的應用程序和其他SDK中。

這是我的快速框架的我的podspec

Pod::Spec.new do |s|
  s.name         = "InfraCocoa"
  s.version      = "0.0.1"
  s.summary      = "A short description of InfraCocoa."
  s.license      = "MIT"
  s.author             = { "" => "" }
  s.platform     = :ios
  s.ios.deployment_target = "7.0 "
  s.source_files  = "Classes", "Classes/**/*.{swift,h,m}"
end

我的iOS應用程序的pod podfile

target 'CocoaProjectTest' do

pod 'InfraCocoa', :path => '~/Documents/workspaces/CocoaPodsTesting/Infra/InfraCocoa'
pod 'CrashlyticsFramework', '2.2.5.2'
pod 'GoogleTagManager', '3.09'
pod 'Google-Mobile-Ads-SDK', '7.0.0'
pod 'Facebook-iOS-SDK', '3.23.0'
pod 'AFNetworking', '2.5.1'

end

現在,首先,如果我運行“ pod安裝”或“ pod更新”,則一切正常。 問題是當我嘗試在Xcode(6.1.1)中進行構建時。 我收到一個編譯錯誤,提示類似“ _sqlite3_close”之類的東西,引用自:

  -[TAGDataLayerPersistentStoreImpl closeDatabase] in libGoogleAnalyticsServices.a(TAGDataLayerPersistentStoreImpl.o)


 (maybe you meant: _fbdfl_sqlite3_close)

經過幾次Google搜索后,我發現這是因為我的GoogleTagManager在“鏈接二進制文件與庫”中缺少庫'libz.dylib'和'libsqllite3.dylib'。 我可以手動添加它們,盡管不是很理想,但可以編譯。

我決定在podfile中不使用以下代碼進行測試並進行編譯

pod 'InfraCocoa', :path => '~/Documents/workspaces/CocoaPodsTesting/Infra/InfraCocoa'

我認為這可能是由於庫版本中的沖突造成的,但是此InfraCocoa框架是完全干凈且空的(沒有File-> New-> Project-> CocoaTouch Framework)。

有任何想法嗎? (應用程序項目也為空且干凈)

我認為您可能已經在PodFile中覆蓋了GoogleTagManager.podspec,而只是在文件的修改版本中添加了缺少的庫。

就像是:

pod 'GoogleTagManager', :podspec => './GoogleTagManager.podspec.json'

在podspec中:

"libraries": ["GoogleAnalyticsServices", "sqlite3", "z"], 

似乎正在使用cocoapods 0.36.rc.1

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM