White labeling an iOS app
Asked Answered
F

4

8

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.

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.

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.

Appreciate any help

Frigorific answered 5/9, 2013 at 21:57 Comment(2)
In my opinion, targets is the best way to achieve what you want, you should reconsider this solution.Testaceous
yeah, the more I think about that, the more I understand that would be the simplest solutionFrigorific
C
1

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.

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.

Claytor answered 6/9, 2013 at 2:13 Comment(2)
thanks, that sounds really interesting! Would you share the sample of that script?Frigorific
I am not able to do that, besides its a bit more complicated than what you would need. Do you have a specific part that you need guidance on?Claytor
S
20

I currently manage a whitelabeled iOS app. We add targets for each white label client to the main project, and have made most parts of our app configurable via a Theme.plist file.

So, each target includes all the classes for the app but has custom Info.plist, icons, launch screens, font files, and Theme.plist.

We avoided the approach that @dtrotzjr mentioned above because there were a few things outside of the Info.plist file that we needed to change per target... the Provisioning Profile being a good example as well as preprocessor macros to handle the occasional #ifdef for per-client hacks.

It also made it easier for new devs to understand the build process.

Severally answered 20/4, 2014 at 18:33 Comment(1)
I think this should be the accepted answer, because it's more flexible and doesn't require out-of-band Python.Growth
C
1

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.

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.

Claytor answered 6/9, 2013 at 2:13 Comment(2)
thanks, that sounds really interesting! Would you share the sample of that script?Frigorific
I am not able to do that, besides its a bit more complicated than what you would need. Do you have a specific part that you need guidance on?Claytor
Z
0

Apple will now reject all white label apps, see this : https://blog.summitsync.com/did-apple-just-crush-white-label-apps-4aee14d00b78

Zealous answered 16/10, 2017 at 18:32 Comment(0)
B
0

We use Bash scripts. Copy and replace app icons, splash screens, FAQs, analytics config files etc. Then pass into a config JSON file the brand colours and boolean values for different features. It gets a bit complicated when you start using sed to add and remove tablet support. It takes seconds to run. It also helps using PDFs as assets, if the asset if only one colour, then you can use tintColor for the brand colour.

The good thing about using Bash is that is going to be available on all CI systems.

p.s. Apple still accepts white label apps. As long as the customer is signing the xcarchive file you send them as their own, then you should be fine.

Bancroft answered 17/4, 2019 at 12:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.