繁体   English   中英

具有多个项目和Coca Pod设置的Xcode工作区

[英]Xcode Workspace with Multiple Projects and Coca Pods Setup

好的,让我们从基础开始,因为我无法精通此功能(请参阅Xcode Workspace-从框架项目pod中找不到导入 )...

我想创建一个具有两个项目的Xcode工作区:

  1. 可可触摸框架Swift项目
  2. 框架的Swift Demo应用项目

NR。 2还应包含一个UI测试目标。

然后,我想使用Cocoapods作为Pod提供整个工作区(两个项目!),并且我想将框架项目“链接”到演示应用程序项目中以便可以在其中使用。

有人可以指导我通过这包括。 pod文件需要如何查找呢?

您需要先定义所有项目通用的Pod

# Uncomment this line to define a global platform for your project
platform :ios, '8.2'
# Uncomment this line if you're using Swift
use_frameworks!

# Define main pods.
def main_pods

    #your main pods
    pod 'AwesomeCache', '~> 5.0'
    pod 'DZNEmptyDataSet', '1.8.1'


end

# Your FirstProjectName.
target 'FirstProyectName' do

    main_pods
    #here you can add any other for this specific project
    pod 'Branch'

end

# Your SecondProjectName.
target 'SecondProjectName' do

    main_pods
    #here you can add any other for this specific project
    pod 'Alamofire'
    pod 'Fabric'
    pod 'Crashlitycs'

end

target 'FirstProjectTestName' do

end

target 'FirstProjectTestUIName' do

end

post_install do |installer|
        puts("Update debug pod settings to speed up build time")
        Dir.glob(File.join("Pods", "**", "Pods*{debug,Private}.xcconfig")).each do |file|
            File.open(file, 'a') { |f| f.puts "\nDEBUG_INFORMATION_FORMAT = dwarf" }
        end
    end
end

希望这可以帮助

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM