Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2018-09-03 20:18:01.276518-0400 DemoApp[3201:585828] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x283e21280>) doesn't contain a view controller with identifier 'unitySplashStoryboard'' #100

Closed
aiursrage2k opened this issue Sep 4, 2018 · 3 comments

Comments

@aiursrage2k
Copy link

2018-09-03 20:18:01.276518-0400 DemoApp[3201:585828] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x283e21280>) doesn't contain a view controller with identifier 'unitySplashStoryboard''

@nominedisorder
Copy link

nominedisorder commented Sep 7, 2018

Due to a bug in the Unity export, you have to update a function in this class /Classes/UI/SplashScreen.mm:

void ShowSplashScreen(UIWindow* window)
{
    bool hasStoryboard = [[NSBundle mainBundle] pathForResource: @"LaunchScreen" ofType: @"storyboardc"] != nullptr;

    if (hasStoryboard)
    {
        UIStoryboard *storyboard = [UIStoryboard storyboardWithName: @"LaunchScreen" bundle: [NSBundle mainBundle]];
        //_controller = [storyboard instantiateViewControllerWithIdentifier: @"unitySplashStoryboard"];
        
        _controller = [storyboard instantiateInitialViewController];
        window.rootViewController = _controller;
    }
    else
    {
        _controller = [[SplashScreenController alloc] init];
        [_controller create: window];
    }

    //[_controller create: window];
    [window makeKeyAndVisible];
}

@nominedisorder
Copy link

I added a Pull Request to fix this issue: #102
Hopefully the admin has time to review soon.

@jiulongw
Copy link
Owner

#104 merged which should handle this issue. Please have a try and re-open if it is still not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants