我想创建一个具有Firebase依赖关系的新pod框架,但是当我运行时:
pod lib lint
发生以下错误:
- 注意| [iOS] xcodebuild:Headers / Private / Firebase / Firebase.h:1:9:致命错误:' FirebaseAnalytics / FirebaseAnalytics.h'文件未找到`
这是" PushSDK.podspec ":
答案 0 :(得分:4)
在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"'
}
答案 1 :(得分:0)
我刚用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' => 'somedev985635214@gmail.com' }
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中的错误吗?