简体   繁体   中英

How to handle two projects in Xcode8?

I have two projects called Project A and Project B. Both projects have different pod files.

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. So How can I achieve it in Xcode8?

Create a workspace with both Projects A and B.

When you write your POD file, you can set the workspace file, the project file and the build target.

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 . Then, it writes all of these settings to the specified RND(iOS).xcworkspace . This workspace is the one you would have already setup with projects A and B.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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