【发布时间】:2016-03-08 21:56:01
【问题描述】:
我用 Cocoapods 创建了一个私有 pod。 pod 有依赖关系。
当我在我的 Xcode 项目中使用这个 pod 时,运行 pod install 后,Xcode 的方案现在默认为“MyPodName (Pods Project)”而不是我的应用程序的目标。这有点烦人,因为每次运行pod install 时我都必须重新更改方案,因为不同的分支在Podfile.lock 中可能存在差异
我使用pod lib create 生成的 Cocoapods 骨架创建了我的 Pod。
这是我的 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一般停止生成方案,因为我认为它们没有必要。如果必须创建方案,我想取消选中“显示”位(在管理方案中可见)