具有多个品牌的 iOS 应用 [英] An iOS app with multiple brandings

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

问题描述

我有一个 iphone 应用程序运行良好 - 它基本上只显示来自提要的新闻,但现在我们想要第二个应用程序,它是第一个应用程序的克隆,但以不同的方式标记并显示来自不同提要的新闻 -xml 提要和图形/颜色将是唯一的区别.

I have an iphone app working just fine - it basically just displays news from a feed, but now we want to have a second app that is a clone of the first but branded a different way and displaying news from a different feed - the xml feed and the graphics/colors would be the only difference.

我正在努力不重复任何努力.我可以使用不同的颜色和图像以及带有一个代码库的 xml 提要 url 轻松设置定义和构建应用程序.但是,这样做的首选方法是什么,以便我可以更改一些通用代码并轻松重建这两个应用程序并在应用程序商店中更新它们,而无需维护单独的 xcode 项目、单独的文件等?

I'm trying to not duplicate any effort. I can easily set a define and build the app using different colors and images and the xml feed url with one codebase. But what is the preferred way to do this so that I can make a change to some common code and easily rebuild both apps and get them updated in the app store without maintaining separate xcode projects, separate files, etc?

推荐答案

您可以通过向项目添加新目标来轻松完成此操作.

You can do this easily by adding a new target to your project.

创建具有相同名称的独特品牌资产和配置文件,但将它们保存在不同的文件夹中.准备好后,将每个文件夹添加到项目并将目标成员资格"设置为适当的目标.如果您犯了错误,您可以在文件检查器"窗格中进行更改.

Create unique branded assets and configuration files with identical names, but keep them in different folders. When you're ready, add each folder to the project and set the "Target Membership" to the appropriate target. If you make a mistake, you can change it in the File Inspector pane.

当您从共享代码库构建特定目标时,只有那些资源会与应用程序捆绑在一起.只要文件名相同,它应该可以工作.

When you build a specific target from the shared codebase, only those resources will be bundled with the app. As long as the filenames are identical, it should work.

这篇关于具有多个品牌的 iOS 应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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