我知道这个主题在SO上已经有一些问题了,但很少有被接受的答案,并且我不认为我找到了与我的问题完全相同的问题。
我正在构建一个Swift pod,在我的代码中,我依赖于Google Maps iOS SDK,它是一个.framework文件捆绑在一起的。项目在Xcode中构建正常,但我在发布库到Cocoapods时遇到了麻烦。
我设法拥有一个几乎通过使用pod lib lint
命令验证的Podspec
文件。然而,现在我已经将Google-Maps-iOS-SDK
pod添加为Podspec
文件中的依赖项后,它会失败并显示以下消息:
$ pod lib lint
[!] The 'Pods' target has transitive dependencies that include static binaries: (/private/var/folders/n2/qyjfpk6n7zz_mngtwswlmsy00000gn/T/CocoaPods/Lint/Pods/Google-Maps-iOS-SDK/GoogleMaps.framework)
$
这是否是预期的行为?为什么我不能将Google Maps iOS SDK作为自己基于Swift的pod的引用添加进去?
这是Podspec
:
Pod::Spec.new do |s|
s.name = '(name)'
s.version = '1.0.0'
s.summary = '(summary)'
s.platforms = { :ios => '8.0', :osx => '10.10' }
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.license = { :type => 'BSD', :file => 'LICENSE' }
s.source_files = 'Sources/*.{h,swift}', '*.framework'
s.source = { :git => "https://github.com/(Github repo).git", :tag => "1.0.0" }
s.requires_arc = true
s.frameworks = "Foundation", "CoreLocation"
s.author = { 'Romain L' => '(email)' }
s.dependency 'Google-Maps-iOS-SDK'
end
如果我不将Google Maps iOS SDK包含为依赖项,则在桥接标头中
pod lib lint
失败,并抱怨找不到<GoogleMaps/GoogleMaps.h>
(文件未找到)。我卡住了,不知道这是否是Cocoapods 0.36(仍处于Beta版)的错误还是我做错了什么。
谢谢您的帮助!
GoogleMaps 1.12.3
需要Accelerate.framework
。 - Daishi Nakajima