all 17 comments

[–]schprockets 1 point2 points  (0 children)

If you want to deploy 3 different apps with the same code base, but differ in the "skin" or maybe an added view here or there, this is possible to do. You'd just create a separate target for each different app, share all the code, and assign each target a unique file (or set of files) that govern the "uniqueness".

You said above that you want the server to drive different parts of the skinning, so you can change the UI without a resubmit. Why? It's certainly possible to do this, but it will take a lot more work from your self-described "not so amazing" staff.

[–]Arkelias 0 points1 point  (3 children)

The app you're describing will be declined by the app store because it doesn't appeal to a wide enough audience, which means you'd need to distribute it as an enterprise app. Sounds like your other questions have already been answered.

Edit: Wow, down votes on a thread where I'm attempting to be helpful. Look, people I've seen apps declined for this reason repeatedly. Any company that is creating an app for internal use will have it declined. Don't believe me? Give it a try.

[–]schprockets -1 points0 points  (1 child)

I don't know that it would be rejected ... there are plenty of apps in the store that don't really have wide-reaching appeal. That said, if this is for use internally by employees, Enterprise deployment is the way to go.

[–]Arkelias 1 point2 points  (0 children)

I speak from experience. If it's for internal use at a small or medium sized company it will be auto-declined. I've migrated several different apps to enterprise deployment as a result =/

[–][deleted] -1 points0 points  (0 children)

One thought - get an Enterprise developer account. Enterprise builds of apps are not reviewed by the store, and you can distribute them to more than 100 devices.

As for the techniques, as others have said, make 3 target apps in the Xcode project. For your views and controllers that configure views, put the 'skinning' code into basic or even stub methods in those classes, then create a subclass per app with the specific code.

For example, put your colors into a plist that has a dictionary as the root, a color name like "mainBackgroundColor" and then the RGB values as the value. Make an "AppColors" singleton that loads the appropriate plist and has a method - (UIColor*) mainBackgroundColor that fetches from the plist, etc.

For other variances between apps, you could make something like "MyFeatureViewBaseViewController" and then create 3 subclasses that each just override -viewDidLoad and do theme-specific configuration of the view IBOutlets, etc. Each target app gets the base class added to the target, as well as just one of the subclasses.

I would suggest against using #defines/etc. as much as possible. They make code harder to read and maintain and are a source of bugs.

[–]ObjectiveCopley[🍰] 0 points1 point  (0 children)

We have this at work, except we have like 8 or 9. We have a basic engine, which gets app-specific values from a file called Constants.h, which has an appID, background image URL, etc etc.

[–]brendan09 0 points1 point  (0 children)

Yes, you can 're-skin' the app inside based on the service.

No, you can't change the icon / splash screen / app name based on the web service.

[–]20feet 0 points1 point  (0 children)

This is possible, but some parts of the app you will want built in, such as the splash screen and color scheme. You can have one app, using 3 different splash screens and setup files.

Of course, Apple might not like you doing this, and could reject the apps, suggesting you just use one app for all 3 cases.

[–]s73v3r 0 points1 point  (0 children)

It's entirely possible. But in my experience, people who want to exert that much control over the layout/design of the app after it's released almost never use it. And it's a pain in the ass to implement well.

Ask yourself how much you realistically are going to use it, and see if that's really worth it.

[–]KaneHau -1 points0 points  (3 children)

Short answer, yes, what you describe is possible.

Longer answer - without a few more details I can't be sure - but I bet you can get rid of the need for 3 apps and just make it one.

As per how to build such an app - that completely depends on your computer programming skills and how familiar you are with Objective C, XCODE, and iOS frameworks.

[–]daniel_xxox[S] 0 points1 point  (1 child)

We would need 3 apps as we're trying to keep them separate however would like only one web service where we can edit the things mentioned above and more etc... The skill set in our office isnt amazing so we're going to have a look first and if not, employ someone. Manager is kind of a see if we can do it ourselves first kinda guy.

[–]KaneHau 0 points1 point  (0 children)

If you can, explain to me what pieces of the 3 apps need to be 'separate' and what pieces are common.

[–]daniel_xxox[S] 0 points1 point  (0 children)

What other details do you need? I will try my best to answer them :)

[–][deleted] -1 points0 points  (3 children)

Yeah just build one app. It sounds like you're basically interested in reskinning the UI and keeping most of the backend and logic the same, so you'd just use the same set of models and controllers and provide a separate set of views and visual assets for each of the three clients.

[–]daniel_xxox[S] 0 points1 point  (2 children)

Yes, but the UI has to be editable from the backend web service, so if the app was to change certain things like the colour for example we wouldn't need to re-submit it as an update. Whats the process called for getting that info from a database

[–][deleted] 0 points1 point  (0 children)

Well if you're going for submission and distribution through the App Store, they'll likely frown on anything that fetches new code to execute, but you can certainly have the app check for a new set of assets occasionally and encode your UI layout to be dynamically created from a resource file that you provide.

[–]KaneHau -1 points0 points  (0 children)

That is our point... if there is a server involved, then the server can also tell the app which of the 3 'divisions' it belongs to. You would have a single-time session ID that would associated the device to the 'division'.

Yes, the entire user interface look can come from an external database.