iPhone通用应用程序的一个代码库?

发布于 2024-12-01 23:54:38 字数 334 浏览 5 评论 0原文

我已经构建了一个通用应用程序,可以处理不同的内容数据 - 但对于每个内容数据,它将是一个不同的 iPhone 应用程序(具有不同的名称)。

我当然希望只为所有这些不同的应用程序保留一个代码库(因为这样会更容易维护),但我有两个问题:

1-我需要更改构建设置中的应用程序名称等......可能是这样会不会太过分了……?尤其是上传过程...?您在该领域有哪些经验?您建议我做什么?

2-如何让所有徽标图片(Icon.png 等)共存到一个应用程序中?目前,我有一个全局变量(作为单例模式),我可以切换它来更改应用程序名称并在程序内加载数据。

提前感谢您的帮助

,干杯, 吉比

I have built a generic application which can handle different content data - but for each content data, it will be a different iphone application (with a different name).

I would like of couse to only keep one code base for all these different apps (as it would be easier maintenance) but I have 2 questions:

1- I would need to change the appname in the buildsettings, etc.. and may be it is going to be an overkill...? especially with the upload process then...? What are your experiences in that domain and what would you recommend me to do?

2- how can I have all the pictures for logo (Icon.png, etc...) to co-exist into one app? For the moment, I have a global variable (as a singleton pattern) that I switch to change appname and loaded data inside the program

Thanks in advance for your help

Cheers,
geebee

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

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

发布评论

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

评论(2

浊酒尽余欢 2024-12-08 23:54:38

您可以很容易地做到这一点,这是大多数开发人员在其精简版本中所做的。您所要做的就是添加另一个目标,以使用相同的代码创建新应用程序并使用该全局变量。

为了更改应用程序中包含的图像,您只需编辑目标,然后在复制捆绑资源菜单下删除不必要的资源。您会注意到,当您添加新资源时,您可以选择将其包含在任何一个或多个目标中。只需选择您想要的一个,它就只能由该目标访问。

这样做的原因是每个目标都可以有自己的 info.plist。所有设置和资源都可以分开,并且使用#ifdef global_var 可以使代码不同。

这是一个稍微过时的教程,如果您需要的话可以帮助您入门。
http://www.bit-101.com/blog/?p=2098

You can do this pretty easily, it's what most developers do in their lite versions. All you have to do is add another target to create a new app out of the same code and use that global variable.

In order to change the images included in the app you simply edit the target and under the copy bundle resources menu remove the unnecessary resources. You'll notice that when you add a new resource you have the option to include it in any one or more of your targets. Simply select the one that you want and it will only be accessible to that target.

The reason that this works is that each target can have its very own info.plist. All the settings and resources can be separate, and the code can be different using your #ifdef global_var.

Here's a slightly outdated tutorial that should get you started if you need it.
http://www.bit-101.com/blog/?p=2098

奢欲 2024-12-08 23:54:38

为每个应用程序名称添加一个目标。

为每个目标创建一个 xyz-info.plist。 (在本例中为 xyz.app)

在每个 xyz-info.plist 中分配适当的图标文件等。

在每个目标的构建阶段中,您将定义哪些图像与哪个应用程序搭配。

For each application name add one target.

Create one xyz-info.plist for each of the target. (in this case for the xyz.app)

In each of the xyz-info.plist assign the appropriate icon files etc.

Within your build phases for each of the targets you will define which images go with which app.

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