iOS5 Storyboard error: Storyboards are unavailable on iOS 4.3 and prior

前端 未结 18 1089
礼貌的吻别
礼貌的吻别 2020-12-02 09:33

I\'ve built a small app using storyboards and it ran great. Just before final testing I decided to try it out to see if it runs on iOS 4.3. I clicked on the gray 5.0 in the

相关标签:
18条回答
  • 2020-12-02 10:10

    The only solution that has worked for me is to create another project without Storyboarding enabled, build it, then switch back to the storyboard project, clean and build.

    0 讨论(0)
  • 2020-12-02 10:11

    While other solutions helped me, they didn't work 100% of the time. I don't know enough about XCode to know how reliable this solution is, but at least it worked for me so you can try it in your project.

    In the left hand side of Xcode, open the project navigator. Click the top item, which is your project. In the panel immediately to the right, you'll see a choice to choose between your project and its targets. Click the project, and then in the panel to the right, under the "Info" tab, set "Command-line builds use" to Debug (in my two projects where I was having the error, both were set to Release).

    A picture is probably easiest:

    Picture from Xcode

    Another idea: Open another project with storyboards in Xcode and try to run that. If it succeeds, you can come back to the current project and it should build. I think this clearly indicates a bug in Xcode.

    0 讨论(0)
  • 2020-12-02 10:12

    I also had this problem, and nothing helped. Even opening another project and trying to build failed.

    What I did, and what for me, was going to project -> info and under "Deployment Target" change iOS Deployment Target to whatever, build and than change back to whatever it was and build again.

    0 讨论(0)
  • 2020-12-02 10:13

    I'm just going to add this one as another possible answer here, as the first solutions worked for me several times (as I mentioned in my previous comment) until today when I couldn't get my project to compile for love nor money with the same error. With the debugger changed and Xcode set to 4.2 and restarting several times I could not compile. However I discovered another way to get around this issue.

    Select the storyboard in the left column and 'Show in Finder' and drag the storyboard to the desktop. Xcode will now change its colour to red and be unable to compile.

    Clean the project, drag the storyboard back from the desktop to the directory in finder.

    Then, it builds and the error goes away again.

    I don't know what triggered the error originally as I'm developing under iOS5 and building for 4.3, but it seems to come up from time to time and.

    0 讨论(0)
  • 2020-12-02 10:14

    The solution that worked for me was just to delete the ~/Library/Developer/Xcode/DerivedData directory for my project.

    0 讨论(0)
  • 2020-12-02 10:14

    I was having the same problem. I tried all the above answers and all combinations and nothing worked. Then later after doing some research, I analysed that the simple fact that the error that was throwing at me was straight forward.

    Just go to the Build settings and instead of selecting the xcode project file, select the product file and change the Deployment target to 5.0 or 5.1. The error should go off.! I did this in Xcode 4.3 in Lion OSX. It worked fine for me!!

    0 讨论(0)
提交回复
热议问题