我想創建一個火力地堡依賴新的吊艙框架,但是當我運行吊艙框架:發生如何創建與依賴火力地堡
pod lib lint
以下錯誤:
- NOTE | [iOS] xcodebuild: Headers/Private/Firebase/Firebase.h:1:9: fatal error: 'FirebaseAnalytics/FirebaseAnalytics.h' file not found`
這是「 PushSDK.podspec「:
我想創建一個火力地堡依賴新的吊艙框架,但是當我運行吊艙框架:發生如何創建與依賴火力地堡
pod lib lint
以下錯誤:
- NOTE | [iOS] xcodebuild: Headers/Private/Firebase/Firebase.h:1:9: fatal error: 'FirebaseAnalytics/FirebaseAnalytics.h' file not found`
這是「 PushSDK.podspec「:
我剛剛用CocoaPods 1.1.1和下面的Podspec進行了測試。它通過了pod lib lint,沒有問題。
Pod::Spec.new do |s|
s.name = 'StackO-Dependency-Demo'
s.version = '0.1.0'
s.summary = 'A demo of Dependency in a Podspec.'
s.description = <<-DESC
This pod demonstrates including dependencies to other Pods in a developed-pod.
DESC
s.homepage = 'https://github.com/ericwastaken/CocoaPod-Dependency-Demo'
# s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Some Dev' => '[email protected]' }
s.source = { :git => 'https://github.com/ericwastaken/CocoaPod-Dependency-Demo.git', :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/ericwastaken'
s.ios.deployment_target = '8.0'
s.source_files = 'StackO-Dependency-Demo/Classes/**/*'
# s.resource_bundles = {
# 'StackO-Dependency-Demo' => ['StackO-Dependency-Demo/Assets/*.png']
# }
# s.public_header_files = 'Pod/Classes/**/*.h'
# s.frameworks = 'UIKit', 'MapKit'
s.dependency 'RxSwift', '~> 3.0.1'
s.dependency 'Firebase/Core'
s.dependency 'Firebase/Messaging'
end
我的結果:
EricWkSta:StackO-Dependency-Demo eric$ pod lib lint
-> StackO-Dependency-Demo
-> StackO-Dependency-Demo (0.1.0)
StackO-Dependency-Demo passed validation.
難道是在舊版本的CocoaPods的錯誤嗎?
在爲我工作的podspec文件中添加下面的行。
我得到這個從here
s.pod_target_xcconfig = {
"OTHER_LDFLAGS" => '$(inherited) -framework "FirebaseCore" -framework "FirebaseMessaging"',
"CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES" => 'YES',
"FRAMEWORK_SEARCH_PATHS" => '$(inherited) "${PODS_ROOT}/FirebaseCore/Frameworks" "${PODS_ROOT}/FirebaseMessaging/Frameworks"'
}
加上''火力地堡/ Analytics''的依賴?另外,我不確定您是否可以通過這種方式放置各種依賴關係,或者必須將它們放在一行中。 – Larme