SplitviewController not as rootViewController

Hello,

We all well know about the SplitviewController. Apple highly recommends it to use as a root view controller whenever we use it.

But for me, I have to use SplitViewController in a Framework where my SDK user apps may or may not support the Splitview. So, for common my SDK needs to support splitview even the Apps doesn't.

So here comes the ???

how to present SplitViewController rather than having it as RootViewController

Presenting modely is an option but still not fully aware of its pros and difficulties

What will be the correct way, does anyone tried it?

Even if you don't recommend this kindly share your thoughts about its disadvantages, thanks in advance.

Have a nice day 🤗

Mistakenly marked my previous question as SOLVED, created a new thread kindly refer to the old answer here or from the comment Old Thread: https://developer.apple.com/forums/thread/699012

OLD thread Answer: Apple say: "...the split view controller is typically the root view controller of your app’s window." typically... so it doesn't have to be. Alternatively, can't you just set your rootViewController in code (based on some condition, where the app supports SplitViewController)? if supportsSplitViewController { appDelegate?.window??.rootViewController = splitViewController } else { // something else... }

My Requirement: The problem is I am using this in an SDK, I can't have much complex operation for my user. In this approach going back from SDK may want more concentration. As I need all the VC that is opened before I set the SplitVC as root, Because the APP may have tabbarviewController/UINavigation as root that needs to be restored when the app leaves SDK So kindly gave me any other approaches if possible

SplitviewController not as rootViewController
 
 
Q