We have an app that's designed for white-branding, where we sell it to multiple customers for them to issue to their end users, re-badged with their own logos and colours.
The way Xamarin works it's really hard to know the "best" way to set up this kind of project.
Here's what I've done so far to set up the project hierarchy in my solution file:
ThisApp <-- Solution
App <-- App for cross-platform
AppDroid <-- Demo app on Android
AppDroidClient1 <-- Live app on Android, client 1
AppDroidClient2 <-- Live app on Android, client 2
AppDroidLib <-- App logic for Android
AppTouch <-- Demo app on iOS
AppTouchClient1 <-- Live app on iOS, client 1
AppTouchClient2 <-- Live app on iOS, client 2
AppTouchLib <-- App logic for iOS
To give an idea of what it looks like in detail, the "AppTouchClient1" project only contains
- AppDelegate.cs
- Entitlements.plist
- Info.plist
- Main.cs
and the Resources folder with icons and other assets needed by this specific client. All application logic is in the AppTouchLib (iOS specific stuff) or App (cross-platform stuff) projects.
This works well, but there's a snag that I'd like some advice about: the time has come to publish the app for a client.
Our client rightly wants to publish the app under their own Apple and Google accounts, not ours. However we still need to have a "development" version of the app that we can use internally to create new features and fix bugs, and it's not practical to add all of our internal testers to the client's TestFlight.
So what I'm thinking of doing is changing the solution structure slightly to give us a "dev" and "prod" project for each client. The "dev" project will have our provisioning profiles and App Id; the "prod" project will have the client's own provisioning profiles and App Id.
Then I should be able to publish each client's "dev" version of the app to our own TestFlight for internal testing, then make a "prod" version for the client to test on their own, and publish to the App Store themselves.
I don't see any alternative since the Xamarin project file can't reference more than one provisioning profile for a given build configuration, and it's not possible to set an App Id per build configuration either.
My solution structure would then become:
ThisApp <-- Solution
App <-- App for cross-platform
AppDroid <-- Demo app on Android
AppDroidClient1Dev <-- Dev app on Android, client 1
AppDroidClient1Prod <-- Live app on Android, client 1
AppDroidClient2Dev <-- Dev app on Android, client 2
AppDroidClient2Prod <-- Live app on Android, client 2
AppDroidLib <-- App logic for Android
AppTouch <-- Demo app on iOS
AppTouchClient1Dev <-- Dev app on iOS, client 1
AppTouchClient1Prod <-- Live app on iOS, client 1
AppTouchClient2Dev <-- Dev app on iOS, client 2
AppTouchClient2Prod <-- Live app on iOS, client 2
AppTouchLib <-- App logic for iOS
Since there are only resources and a tiny number of source files in each project I'm comfortable with the risk. But it seems to me that this is going to be the only way to maintain two versions of the app - one for us to develop, and one for the client to publish.
I realise that the more clients we add, the more this will complicate the solution structure.
So is there a better way?
Thanks for any and all thoughts!