如何集中管理许多 iPhone 应用程序的核心代码库

发布于 2024-12-01 09:17:20 字数 363 浏览 0 评论 0原文

情况:

我有一个带有一些核心功能的基本应用程序。
我的客户(可能有几十个)都希望在应用程序商店中拥有自己的定制应用程序。

问题

如果我在应用商店中有几十个应用程序,并且我想更改一些核心功能,我必须更新相应项目中的每个文件,编译,通过 iTunes Connect,上传每一个微小的改变都可能需要数天的无意识工作。

问题

有没有一种方法可以使用像 git 这样的版本控制系统来单独管理具有核心功能的代码部分,以便当我提交对核心文件的更改时,所有项目都会自动更新?

有没有其他方法可以使这个过程更易于管理?

The situation:

I have a basic app with some central functionality.
My clients (potentially many dozens) all want their own customized apps in the app store.

The problem

If I have dozens of apps in the app store and I want to change some of the core functionality, I would have to update each file in the corresponding project, compile, go through iTunes Connect, upload etc. Every small change could potentially take days of mindless work.

The question

Is there a way I can use a versioning system like git to administer the parts of my code with the core functionality separately, so that all projects are updated automatically when I commit a change to the core files?

Is there any other way to make this process easier to manage?

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

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

发布评论

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

评论(4

你又不是我 2024-12-08 09:17:20

通常,如果您有一些需要在 iOS 中重用的核心功能,您将创建一个可以包含在其他项目中的静态库,或者(如果核心功能包含无法包含在静态库中的资产之类的内容) )你将有一个子项目。不过,在这两种情况下,您都需要确保每个应用程序项目都与核心功能项目具有目标依赖关系,以便始终使用最新更改进行重建。

  1. 创建一个具有所有核心功能的 MundiCoreFramework xcode 项目,无需引用特定于客户端的代码即可进行编译
  2. 为此核心框架项目创建 git 存储库
  3. 在使用此核心功能的每个应用程序项目中,将 MundiCoreFramework 添加为 git 子模块并将其作为子项目添加到应用程序项目中。
  4. 每当您更新核心框架时,您都可以为每个应用程序发出 git sumodule update 并重新编译。

Typically if you have some core functionality that you need to reuse in iOS you'll either create a static library that you can include in your other projects or (if the core functionality includes things like assets which can't be included in a static library) you'll have a sub-project. In both cases, though, you'll want to make sure each of your app projects has a target dependency with your core functionality project so it is always rebuilt with the latest changes.

  1. Create a MundiCoreFramework xcode project that has all your core functionality and which compiles without having to reference client-specific code
  2. Create a git repo for this core framework project
  3. In each of your app projects that use this core functionality, add the MundiCoreFramework as a git submodule and add it as a subproject to the app project.
  4. Whenever you update the core framework you can issues git sumodule update for each app and recompile.
北斗星光 2024-12-08 09:17:20

我不太熟悉 Xcode“目标”结构,因此这实际上可能是更好的方法。但你绝对可以使用 git 来实现这一点。

也许您想要一个包含所有通用内容的“主”分支,然后为应用程序的每个“自定义”版本提供一个分支。

当主分支发生更改时,您将通过每个自定义分支合并这些更改。然后,您将从每个分支构建一个产品并提交到商店。

在每个分支中,您将分别设置应用程序 ID、从一个版本到下一个版本需要进行的任何艺术和文本更改、适合此版本的任何键设置等。所有这些设置都可以保留在自定义版本分支的本地。

这是 git 中完全有效的工作流程。这不是大多数人使用它的方式,但那是因为大多数人都会选择一种生产产品,而不是很多。

I'm not real familiar with the Xcode "target" structure, so that may in fact be a better approach. But you can definitely use git for this.

Probably you want a "master" branch where all the universal stuff lives, then a branch for each "customized" version of the app.

When there are changes in the master, you'll merge those changes through each of the custom branches. Then from each branch, you'll build a product to submit to the store.

In each branch, you'll separately set the app id, whatever art and text changes are needed from one version to the next, whatever key setup is appropriate to this version, etc. All those settings can stay local to the custom version branch.

This is a perfectly valid workflow in git. It's not how most people use it, but that's because most people are headed to ONE production product, not many.

楠木可依 2024-12-08 09:17:20

另一种选择可能是使用 git 子模块 来组织公共代码,然后让每个单独的代码项目只需将公共代码添加为子模块即可。

Another option might be using git submodules to organize common code, and then have each individual project simply add your common code as a submodule.

定格我的天空 2024-12-08 09:17:20

您可以使用 Target 为每个客户端自定义应用程序,这意味着您可以保留一个代码库,并拥有多个具有相同代码库的应用程序。

这不会解决应用程序商店部分中的应用程序更新问题,据我所知,您仍然需要像 var 一样手动完成此操作。

You can use Target to customize the app for each client, this would mean that you could keep one code base and have multiple apps with the same code base.

This will not solve the updating the app in the appstore part, which you would still have to do by hand as var as I'm aware of.

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