Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR : perhaps the designated entry point is not set?

Tags:

ios

swift

Hello EveryOne I am following THIS awesome tutorial but I didn't download stater project because I want to create a different app I have done everything where I want to pop up only CenterViewController with Left side ViewController Both are in ContainerViewController But I got This in my Console:

2014-11-19 14:04:46.838 SlideTable[3612:87749] Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set?

I also tried THIS answer but got same result.

What this error means I have done all the required things as the auther provided at start up project but I didnt found any solution for this.

This is the code for may project.

AppDelegate.swift

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    window = UIWindow(frame: UIScreen.mainScreen().bounds)

    let containerViewController = ContainerViewController()

    window!.rootViewController = containerViewController
    window!.makeKeyAndVisible()

    return true
}

Am I missing something? I will provide further information if needed.

like image 398
Dharmesh Kheni Avatar asked Nov 19 '14 09:11

Dharmesh Kheni


3 Answers

I have met the same issue and I found the solution:

  1. Select the Main.storyboard;
  2. Open Attributes inspector and click Is Initial View Controller in the View Controller section.

This operation works well for me according to the same error message.

like image 198
iDevSpread Avatar answered Nov 06 '22 05:11

iDevSpread


The main controller of you app (the entry point), does it have the the "Is Initial View Controller" checked on the right bar? It will show an arrow next to it.

like image 39
hnabbasi Avatar answered Nov 06 '22 06:11

hnabbasi


Update for Xcode 11, and iOS 13.

In addition to elia's answer, you have to change one more attribute in Info.plist file.

In Info.plist file it is needed to change String value for Storyboard Name to the name of your initial file that you want to first appear during launching of the application. By default value for Storyboard Name is set to "Main", and you need to change it.

You can find that attribute in:

Info.plist -> Application Scene Manifest -> Scene Configuration -> Application Session Role -> Item 0 -> Storyboard Name

like image 6
Bane M Avatar answered Nov 06 '22 06:11

Bane M