【发布时间】:2018-10-19 16:14:58
【问题描述】:
我有一个拥有庞大代码库的项目,它有 4 个不同的目标应用程序。
现在有许多视图、模型和控制器对于所有 4 个目标应用程序都是通用的。因此,这些常用文件、类和图像资产被放置在 central 文件夹中,该文件夹充当 pod 库。我必须运行 pod install 来获取所有 central 代码依赖项。
这是我的Podfile 文件的样子。
#Pod sources
source 'https://github.com/CocoaPods/Specs.git'
source 'https://bitbucket.org/ttttt/xxxxxxxx.git'
source 'https://xx-xxxxxx/xxxxx/xxx/xxxx.git'
# Use the same pod library for all these targets
def myPods
pod 'ABC', :path => '.' #'ABC' is name of pods in .podspecs file, which I want to remove
end
target 'target1' do
myPods
end
target 'target2' do
myPods
end
target 'target3' do
myPods
end
target 'target4' do
myPods
end
这里,ABC 是项目名称。并在本地路径导入ABC.podspecs。
现在,我想删除 ABC.podspecs 文件并在本地制作所有代码(而不是作为 pod 库)。
有人可以建议我怎么做吗?
如果我直接删除它并运行pod install,它会产生很多错误和架构问题。
【问题讨论】:
-
pod deintegrate guides.cocoapods.org/terminal/commands.html#pod_deintegrate
-
它帮助我删除了我的 pod 项目,但它也删除了所有其他有用的 pod。我只想从 pod 中删除我的项目文件、资产(
central文件夹),并希望将其添加到 bundle 中以用作 bundle,而不是用作 pod。
标签: ios xcode cocoapods podspec podfile