Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I build multiple versions of the same iOS application for OEMs

Tags:

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

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.

What I need to be able to do:

  • Build multiple versions of the same application that can be submitted to the Appstore, each version would be submitted under a different companies apple account. I would assume that means multiple projects so that each project can use a company specific provisioning profile
  • Each version has some different images (Icon, startup image, maybe a few others)
  • Each version has some different strings (Company name, Product Name, maybe a few others)

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

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?

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...

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

like image 370
snctln Avatar asked Jul 13 '12 15:07

snctln


People also ask

Can you have two versions of the same app iOS?

No, it's not possible to install two versions of an app that has the same name. You'd have to ask the developer to rename it, which I doubt he'll be willing to do. Although the iOS doesn't really check “the name” (like a file manager would do), the develop would have to create another “build” if I am not mistaken.

Which platform is best for iOS app development?

Xcode is Apple's IDE (Integrated Development Environment) for both Mac and iOS apps. Xcode is the graphical interface you'll use to write iOS apps. Xcode includes the iOS SDK, tools, compilers, and frameworks you need specifically to design, develop, write code, and debug an app for iOS.

Is Xcode the only way to make iOS apps?

Xcode is the only supported way to develop apps by Apple. So if you're interested in building iOS or MacOS apps you must use it. There are third-party solutions that don't require you to use Xcode, however these are not supported by Apple and there are often issues with these solutions.


1 Answers

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.

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.

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.

Good luck.

like image 148
Erik Avatar answered Oct 23 '22 12:10

Erik