2019-09-16 Objective-C project without storyboard in Xcode 11

Create a new project and open the ViewController.h. Optionally add the following lines to viewDidLoad:

    self.view.backgroundColor = [UIColor greenColor];
    self.title = @"My first viewcontroller";

Then open the SceneDelegate.m file and add the following lines to the scene:willConnectToSession:connectOptions function:

    ViewController *vc = [ViewController new];
    UINavigationController *nc = [[UINavigationController alloc] initWithRootViewController:vc];
    
    UIWindow *window = [UIWindow new];
    [window setWindowScene:(UIWindowScene *)scene];
    window.rootViewController = nc;
    self.window = window;
    [window makeKeyAndVisible];

Run the project. You should now be able to see a green viewcontroller.

You can delete the Main.storyboard file, then go to the project, click on the target, and in the General tab, clear the "Main Interface" textfield. Then open the Info.plist, click open Application Scene Manifest, Scene Configuration, Application Session Role, Default Configuration, then click the minus button next to Storyboard Name.