我创建了一个新的podspec文件,其中包含一些依赖项。
Pod::Spec.new do |s|
s.name = "ChatSDK"
s.version = "4.2.5"
s.summary = "Chat SDK - Mobile messaging framework for iOS"
s.homepage = "http://chatsdk.co"
s.license = 'MIT'
s.author = { "Ben Smiley" => "ben@chatsdk.co" }
s.source = { :git => "https://github.com/chat-sdk/chat-sdk-ios.git", :tag => s.version.to_s }
s.platform = :ios, '7.0'
s.requires_arc = true
s.subspec 'Core' do |core|
core.source_files = ['Core/**/*']
core.dependency 'Firebase/Core'
core.dependency 'Firebase/Database'
core.dependency 'Firebase/Storage'
core.dependency 'Firebase/Auth'
end
end
我使用Xcode 8.2创建了一个新的Xcode项目,并添加了一个podfile。
source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!
target 'PodTest' do
pod "ChatSDK/Core", :path => "../"
end
我使用Cocoapods 1.2.0运行pod安装。
该项目找不到FirebaseAnalytics / FirebaseAnalytics.h文件的错误消息。这可以防止项目编译。但是,如果我删除use_frameworks,它会起作用!标记或如果我将Firebase依赖项直接添加到Podfile。
CocoaPods环境
CocoaPods : 1.2.0
Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
RubyGems : 2.0.14.1
Host : Mac OS X 10.12.2 (16C67)
Xcode : 8.2 (8C38)
Git : git version 2.10.1
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ dee0949e9974fff9df1e6dcacec3b0f1675165df
master_old - https://github.com/CocoaPods/Specs.git @ 55393b63a3da4576423ef07b8d1f6f244594638d
private - https://bensmiley@bitbucket.org/bensmiley/pods.git @ 4f14e0b26b6c6e249d49c8fa37d0eba40dde3d99
Installation Source
Executable Path: /usr/local/bin/pod
Plugins
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.1.2
cocoapods-try : 1.1.0
此问题的演示项目可用here。