I've created different Targets in my Xcode project to version my app for different clients. Each client uses different xcassets, one for each target. This way I can have different images with the same names. So just by selecting the target, the correct image will show.
This works for any view in my app. Whenever I run the app in a different target, all the images change automatically. The problem is when I have an image in my Launch Screen. I created .xib files for my Launch Screen (one for each client).
By selection the target, the correct .xib runs, but the image that it loads is always the same from the base project.
This is how I organised the project so having different targets would automatically pick different images:
- Base.xcassets:
- Target Membership = Base
- image-launch (base project launch screen)
- Other images for base project
- Client1.xcassets:
- Target Membership = Client1
- image-launch (client 1 version launch screen)
- Other images for client 1 version
- Client2.xcassets:
- Target Membership = Client2
- image-launch (client 2 version launch screen)
- Other images for client 2 version
When I select a target, all elements with that Target Membership should be loaded. Only my Launch Screen loads the image-launch from the Base.xcassets.