简体   繁体   English

将两个Xcode项目与一个目标一起使用

[英]Using two Xcode projects with one target

I have one app I am trying to build called "App". 我正在尝试构建一个名为“ App”的应用程序。 I have an Xcode project called App.xcodeproj that lives in a Xcode workspace called App.xcworkspace . 我有一个名为App.xcodeproj的Xcode项目,该项目位于一个名为App.xcworkspace的Xcode工作区中。 That is all working. 一切正常。

This is what I want: 这就是我要的:

A second Xcode project ( AppCore.xcodeproj ) that I can separately build on iOS or Mac. 我可以在iOS或Mac上分别构建的第二个Xcode项目( AppCore.xcodeproj )。 However there is no need to actually run the project (app). 但是,没有必要实际运行项目(应用程序)。 It will be the data layer of my app. 这将是我应用程序的数据层。

I then need to be able to access the files inside AppCore.xcodeproj from App.xcodeproj . 然后,我需要能够从App.xcodeproj访问AppCore.xcodeproj的文件。


Update: 更新:

In this project, I will be using CloudKit. 在这个项目中,我将使用CloudKit。 The Core project is the only thing interacting with CloudKit, however the actually target (app) using CloudKit is the "main" project. Core项目是与CloudKit进行交互的唯一对象,但是使用CloudKit的实际目标(应用程序)是“主”项目。


How can I accomplish this? 我该怎么做?

Here is the tutorial GIF: 这是教程GIF:

在此处输入图片说明

Remarks: 备注:

You can add existing project as well, just drag it into you xCode project. 您也可以添加现有项目,只需将其拖动到xCode项目中即可。

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

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