XCode:项目可移植性:如何处理应用程序之间共享的代码文件?

发布于 2024-10-05 04:44:49 字数 439 浏览 3 评论 0原文

当我创建更多应用程序时,我的 /code/shared/* 会增加。

这就产生了一个问题:压缩和发送项目不再是小事。看起来我的选项是:

  1. 在 Xcode 中将共享文件设置为使用绝对路径。然后,每次我压缩并发送时,我还必须压缩并发送 /code/shared/* 并给出指示,并希望收件人在该位置没有任何东西。 这确实不切实际;它使 zip 文件太大

  2. 为每个项目维护一个单独的库文件副本 这实际上是不可接受的,因为修改/改进必须在各处单独实施。这使得维护变得异常繁琐。

  3. 一些实用程序可以遍历 Xcode 项目中的每个文件,找出最低的公共文件夹,并创建一个仅包含必要文件的压缩文件结构,但位于正确的相对文件夹位置,以便代码仍然可以构建

(3) 是我正在寻找的,但我有一种感觉它还不存在。

有人吗?

As I create more applications, my /code/shared/* increases.

this creates a problem: zipping and sending a project is no longer trivial. it looks like my options are:

  1. in Xcode set shared files to use absolute path. Then every time I zip and send, I must also zip and send /code/shared/* and give instructions, and hope the recipient doesn't have anything already at that location.
    this is really not practical; it makes the zip file too big

  2. maintain a separate copy of my library files for each project
    this is not really acceptable as a modification/improvements would have to be implemented everywhere separately. this makes maintenance unreasonably cumbersome.

  3. some utility to go through every file in the Xcode project, figure out the lowest common folder, and create a zipped file structure that only contains the necessary files, but in their correct relative folder locations, so that the code will still build

(3) is what I'm looking for, but I have a feeling it doesn't as yet exist.

Anyone?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清醇 2024-10-12 04:44:49

您应该重新考虑当前的流程。您在 (3) 中描述的工作流程不正常。这一切听起来非常复杂,如果您使用源代码控制,那么基本上处理起来都相对容易。 (3) 根本不存在,而且很可能永远不会存在。

正确配置的 SCM 将允许您管理多个库(包)的多个版本,并允许您共享项目(在分支中),而无需压缩任何内容。

You should rethink your current process. The workflow you're describing in (3) is not normal. This all sounds very complicated and all basically handled with relative ease if you were using source control. (3) just doesn't exist and likely never will.

A properly configured SCM will allow you to manage multiple versions of multiple libraries (packages) and allow you to share projects (in branches) without ever requiring zipping up anything.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文