简体   繁体   中英

ERROR : perhaps the designated entry point is not set?

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.

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.

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.

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

When you use more than one UIStoryboard and want to init your UIViewController except the Main.storyboard for example Intro.storyboard , then you would probably get this error. You must select

YourProject  -> TARGETS ->  Deployment Info -> Main Interface

In Main Interface , there are several UIStoryboard that you created for your own project. Choose the right one which contains your UIViewController .

I mean

YourProject -> TARGETS -> General -> Deployment Info -> Main Interface.

Not YourProject -> TARGETS -> Deployment Info -> Main Interface.

我通过单击解决了这个问题

Product -> Clean Build Folder

There exists a compatibility issue between IOS 12 and IOS 13. So you have to remove the Application Scene Manifest from the info.plist in order for it to function correctly. Also, you have to remove everything related to scenes from the App Delegate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM