Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
393 views
in Technique[技术] by (71.8m points)

ios - XCode no valid compiled storyboard at path

I've got a universal XCode Project (ObjC) for iPad and iPhone with a subproject that contains a storyboard. The subproject is a static library that has been added to the main project. Included in this subproject is a bundle containing bespoken storyboard.

Whenenver I tap a certain button the application, the storyboard needs to be loaded;

[UIStoryboard storyboardWithName:@"UIControls.bundle/Config" bundle:nil];

That works perfectly fine for the iPhone (devices and simulators), but whenever I try to run the project an an iPad (device or simulator), I'm getting the following error;

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'There doesn't seem to be a valid compiled storyboard at path...

What's the about? The project is a universal project, so why can't the iPad find the storyboard?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To answer my own question;

This error appears when the bundle target isn't universal. So make sure the Targeted Device Family in the bundle's build settings is set to iPhone AND iPad.

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...