我用Cocoapods创建了一个私人库,该库具有一个依赖。当我在我的Xcode项目中使用这个库时,在运行pod install之后,Xcode的方案现在默认为“MyPodName (Pods Project)”而不是我的应用程序目标。这有点烦人,因为每次运行pod install时,我都必须去改变方案,因为不同的分支可能会对Podfile.lock产生影响。我使用
我认为这可能只发生在我的电脑上。同事说他没有遇到过这个问题。
pod lib create
生成的Cocoapods骨架创建了我的库。这是我的podspec:Pod::Spec.new do |s|
s.name = "MyPodLib"
s.version = "2.0.0"
s.summary = "MyPodLib is just an example name for this question."
s.description = <<-DESC
DESC
s.homepage = "https://github.com/username/MyPodLib"
s.license = 'License'
s.author = { "username" => "email@address.com" }
s.source = { :git => "https://github.com/username/MyPodLib.git", :tag => s.version.to_s }
s.platform = :ios, '8.4'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.resource_bundles = {
'MyPodLib' => ['Pod/Assets/*.png']
}
s.dependency 'DependencyPod', '2.0.0'
end
我认为这可能只发生在我的电脑上。同事说他没有遇到过这个问题。
pod
在生成方案时停止操作,因为我认为这些方案并不必要。如果必须创建方案,我希望能取消选中“显示”选项(在管理方案中可见)。 - aednichols