[英]How to handle two projects in Xcode8?
I have two projects called Project A and Project B. Both projects have different pod files. 我有两个名为Project A和Project B的项目。两个项目都有不同的pod文件。
Now I want to add Project B into Project A. So my Project A is final code and I want to use a Project B files in Project A and vice versa. 现在,我想将项目B添加到项目A中。因此,我的项目A是最终代码,我想在项目A中使用项目B文件,反之亦然。 So How can I achieve it in Xcode8? 那么如何在Xcode8中实现呢?
Create a workspace with both Projects A and B. 使用项目A和B创建一个工作区。
When you write your POD file, you can set the workspace file, the project file and the build target. 编写POD文件时,可以设置工作区文件,项目文件和构建目标。
For example: 例如:
project '../Source/Rnd_Lab(iOS).xcodeproj/'
workspace 'RND(iOS).xcworkspace/'
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'RND' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for RND
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Storage'
end
Targets the Rnd_Lab(iOS).xcodeproj
project in a completely other directory and sets the pods to target RND
. 在另一个目录中定位Rnd_Lab(iOS).xcodeproj
项目,并将pod设置为RND
目标。 Then, it writes all of these settings to the specified RND(iOS).xcworkspace
. 然后,将所有这些设置写入指定的RND(iOS).xcworkspace
。 This workspace is the one you would have already setup with projects A and B. 该工作空间是您已经使用项目A和B设置的工作空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.