Today We will learn how to create Multiple Targets in Xcode Project and setting different image.xcassets for them.
- Create a new Xcode Project (Lets say MultipleTargetInIos).
- Now download tw0 different launch Screen .
- open Assets.xcassets and add one image with name splash.
4. Now add one new xcasets in your project. Go to File- New- Resource- AssetCatalog
5. Now rename this image xcasets to NewTarget.
- Now go to Targets and right click on the target and click on duplicate.
7. Now a new target will be created . Now rename this target to NewTarget.
8. A plist will be also created with the name MultipleTargetInIoscopy.plist. Just change the name of Plist to NewTarget.plist. Go to Bundle Identifier and change it with the name com.Nilesh.NewTarget.
- Now go to NewTarget and select the choose plist option and choose the NewTarget.plist.
10. Now we will have to manage the schemas.
We will rename the target to NewTarget.
11. Now just click on both image xcassests and make sure that the target for them is thier desired target.
12. Now clean and run the project by selecting different targets. You will see different launch Screen in both of them.
Please do share your Views.
You can download the whole source code from here.
Enjoy Coding. 🙂