I'm very very new to the target concept in Xcode. I have followed this tutorial to learn to create two targets in the same project. I just want to know how to make target A use AppDelegateA.swift
as its designated app delegate, and target B use AppDelegateB.swift
as its designated app delegate. Because on the tutorial, it actually teaches how to make two apps from the same AppDelegate. But I make two (almost) completely different apps, that share a lot of resources and libraries.
And while we're on the subject, can I also have target A use a storyboard called Main
, and target B also use a storyboard called Main
, but they are actually a different storyboard (but put together inside the same project)?
Yes you can create 2 different based upon the target make following changes:
in the projects
you could do something like
But IMO you should not do it.
Instead doi it as apple does it to, in app delegate load different view controllers or different XIBs.
Hope my answer here helps for second part of including multiple AppDelegate files based on targets. https://stackoverflow.com/a/43227300/2715840
For first part of using multiple targets you can do so by simply doublicating the base target , you will get your plist already copied , change name based on new target or keep it same name plist.info but in different path. for separating code files(like Appdelegates) , storyboards and Assets , or firebase plist config files you can find my answer in the above like valid for these purposes.
Hope this helps.