I use a view for my splashscreen in React native app on iOS and now we have two schemes and we want to change this view color.
if scheme === App scheme A? "green": "purple"
if scheme === App scheme A? "green": "purple"
is there a way to make this multiple values like bundle id and product name
It is certainly possible to have different splash screens, resources etc. per app version, and there is a number of ways to achieve that. One that I would recommend looking into is using different build configurations. A working example:
Steps:
In Project->Info->Configurations, duplicate existing configurations and give them meaningful names (eg. matching your custom scheme):
Edit your custom scheme to use the new build configuration (in the 'Run' tab, select the debug version, in the 'Archive' tab, select the release version):
Create a new storyboard for your launch screen
In your Target Build Settings, add a new User Defined setting, name it sth like 'LAUNCH_SCREEN_NAME' and set value according to build configuration:
Finally in your Info.plist, edit or add a 'Launch screen interface file base name' key and set value to the custom build setting from point 4 ( $(LAUNCH_SCREEN_NAME)
)
For React Native, you will also need to add and configure react-native-schemes-manager - I'm assuming you might have already done this since you are using schemes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.