白色标记iOS应用程序 [英] White labeling an iOS app

查看:182
本文介绍了白色标记iOS应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,我想白色标签。基本上只需更改图标,启动图像和info.plist。问题是项目太大了,我真的不想为它添加额外的目标和资源。

I have a project which I'd like to white label. Basically only icons, launch images and info.plist have to be changed. The problem is that project is too big and I really don't want to add additional targets and resources to it.

我看到的解决方案是创建一个单独的项目并将第一个项目添加为依赖项目。这个白色标签项目没有代码,只有一堆具有不同图像和info.plists的目标。在这种情况下,每次我想要为应用程序添加白色标签时,我只会使用自己的一组图像创建另一个目标。每当我想要制作另一个版本时,我都可以轻松构建所有这些目标并为同一个应用程序获取一系列变体。听起来很简单。

The solution I see is to create a separate project and add the first one as a dependency project. This white labeling project would have no code but a bunch of targets with different images and info.plists for them. In this case every time I want to white label the app I would just create another target with its own set of images. And whenever I want to make another release I could easily build all of those targets and get a bunch of variations for the same app. Sounds easy.

问题在于实施。我将项目链接为依赖项,因此我对目标也一样。但每次我构建应用程序时,它都会创建一个带有原始名称的可执行文件,即使它在info.plist中有所不同。可能这是因为原始目标有自己的info.plist。另一件事是如何用原来的目标替换原始目标的资源。

The problem is in implementation. I linked the project as a dependency so did I the same with target. But every time I build the app it creates an executable with the original name, even though it is different in info.plist. Probably this is because original target has its own info.plist. Another thing is how to replace the resources from the original target with another ones.

感谢任何帮助

推荐答案

我在工作中做到了这一点我是如何做到的是我有一个我编写的python脚本,该脚本进入并操作Info.plist,其中包含我存储在备用plist文件中的替换值列表。我们还有一个构建步骤脚本,可以为该特定构建注入所需的任何资源。

I did this at my job and how I did it is I have a python script that I wrote that goes in and manipulates the Info.plist with a list of replacement values that I store in an alternative plist file. We also have a build step script that goes and injects any resources we need for that particular build.

您可以随意操作捆绑包,但必须在Xcode签署应用程序之前进行操作。在某些情况下,你可能想要进入并编辑捆绑包中的Info.plist,这很好,只需在签名步骤之前完成。

You can manipulate the bundle all you want but you have to do it just before Xcode signs the app. In some cases you might want to go in and edit the Info.plist in the bundle as well which is fine, just do it before the signing step.

这篇关于白色标记iOS应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆