如何为OEM构建同一iOS应用程序的多个版本 [英] How do I build multiple versions of the same iOS application for OEMs

查看:119
本文介绍了如何为OEM构建同一iOS应用程序的多个版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个现有的iOS应用程序,我需要能够为不同的客户端构建和发布多个版本。

I have an existing iOS application that I need to be able to build and release multiple versions of for different clients.

此应用程序与可从少数不同的公司,硬件是相同的,但每个公司以不同的名称销售硬件

This application interfaces with hardware that is available from a handful of different companies, the hardware is identical but each company sells the hardware under a different name

这是一个免费的应用程序,目标不是垃圾邮件与appstore同一个应用程序的多个版本,目标是允许销售重组硬件的公司拥有一个使用他们用于硬件的品牌名称的移动应用程序。

This is a free app, the goal is not to spam the appstore with multiple versions of the same app, the goal is to allow companies that sell rebranded hardware to have a mobile app that uses the brand name that they use for the hardware.

什么我需要能够做到:


  • 构建可以提交给Appstore的同一个应用程序的多个版本,每个版本都会被提交根据不同公司的苹果账户。我认为这意味着多个项目,以便每个项目都可以使用公司特定的配置文件。

  • 每个版本都有一些不同的图像(图标,启动图像,可能还有其他几个)

  • 每个版本都有一些不同的字符串(公司名称,产品名称,可能还有一些其他字符串)

使用Android我只是创建一个库项目,我可以轻而易举地覆盖字符串和图像。

With Android I just create a library project and I can override strings and images with a trivial amount of effort.

对于iOS,我没有找到明显的答案。

With iOS I haven't found an obvious answer.

我考虑在现有项目中添加新目标,但我认为这不会起作用:
- 我无法弄清楚如何替换图标以外的图像并启动屏幕
- 我无法弄清楚如何替换字符串
- 我是否可以为使用同一项目编译的不同应用程序使用不同的配置文件?我知道目标设置允许不同的配置文件,但项目设置是否有自己的配置文件集?

I looked into adding a new target to my existing project but I don't think that will work: - I can't figure out how to replace images beyond the icon and starting screen - I can't figure out how to replace strings - Would I be able to use different provisioning profiles for the different apps that compile with the same project? I know the target settings allow different provisioning profiles, but doesn't the project settings have its own set of provisioning profiles?

我可以将当​​前应用程序打包到一个库中吗?其他项目可以使用和替换图像/字符串?所以每个版本都有自己的xCode项目,但使用相同的代码。

Can I package the current application into a library that other projects can use and replace images/strings? So each version would have its own xCode project but use the same code.

也许我需要更多地利用多个目标的想法......

Maybe I need to work more with the idea of multiple targets...

我正在使用xCode 4.2,但我准备在必要时转移到更新的版本

I am using xCode 4.2, but I am prepared to move to a newer version if necessary

推荐答案

创建使用不同Info.plist文件的多个目标。最大的区别是不同的包标识符。您还可以定义不同的预处理器宏来控制各种代码块的条件编译。

Create multiple targets that use different Info.plist files. The biggest difference will be different bundle identifiers. You can also define different preprocessor macros that will control the conditional compilation of various chunks of code.

或者/另外,您可以设置构建配置设置(包括更改位置)将Info.plist文件转换为* .xcconfig文件并引用项目,信息,配置区域中的文件。然后,您只需更改方案即可构建不同版本的应用。将构建配置文件设置到文件中也是配置控制的一个巨大胜利。

Alternatively/additionally, you can put your build configuration settings (including the changing location of the Info.plist file) into *.xcconfig files and reference those in your project, info, configurations area. Then, you can build a different version of your app by simply by changing your scheme. Putting build configration settings into files is a huge win for configuration control too.

这是设置* .xcconfig文件的链接:http://itcoding.blogspot.com/2011/03/using-xcconfig-abandoning-build-panel.html。我也见过这样的其他文章 - 但是这个会让你开始。

Here's a link to setting up *.xcconfig files: http://itcoding.blogspot.com/2011/03/using-xcconfig-abandoning-build-panel.html. I've seen other articles like this as well -- but this one will get you started.

祝你好运。

这篇关于如何为OEM构建同一iOS应用程序的多个版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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