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

40,335

Solution 1

I also got this problem and finally I solved this by following procedure:

  1. Open XXXXXX.storyboard
  2. Open Identity and Type tab in your right view of Xcode.
  3. Set the value of Development in Document Versioning to "Xcode 4.2" (my default value is "Default Version (Xcode 4.1)".
  4. Change the value of Deployment from Project SDK Version (iOS 5.0) to iOS 5.0, then back to Project SDK Version (iOS 5.0)

Rebuild the project and the error should be resolved.

Solution 2

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

Solution 3

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.

Solution 4

This seems to be a bug in the latest XCode that I've also run into too, did try the OP's solution of changing debugger and that had no effect.

It cropped up for me since I tried storyboard with 4.3 and then tried to change back.

My solution was to close XCode, open it again and clean. Then I compiled and it worked fine.

Hope this helps others.

Solution 5

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.

Share:
40,335
Alex Stone
Author by

Alex Stone

When people asked me what I wanted to do for work 10 years ago, I did not know too well, so I just said "Something to do with computers". As I look at the last 10 years, I see that I did quite a lot of work all kinds of computers. From fiddling with microcontrollers and assembler code to writing data processing scripts to physically assembling computer consoles. The big step forward came when I learned to think about software in a structured, object-oriented way, as this allowed me to make software do things that I want it to do. Right now I'm proficient in two high level programming languages - Objective-C and Java and have touched just about every framework available for iOS. I've also became a hacker/maker and have completed a number of projects involving software and hardware. Right now I'm in my early 30s and when I ask myself "What would I like to do in the next 10 years?", my answer is "something with the human brain". The seeds are already there - I've picked up an interest in biology, cognitive science and neuroscience, enough to converse with real people. I've done first-hand research into sleep and made discoveries. I've taken classes in synthetic biology, performing manipulations on the bacteria genome. I've learned a lot about the neurotransmitter systems of the human brain, as well as how a biological organism develops. It seems like there are a lot of similarities between the object-oriented concepts I use in the daily programming tasks and how biological organisms operate. This makes me hopeful that by the time I'm in my late 30s, I would be able to work and program some form of biological computer or just plain hack the human brain.

Updated on July 16, 2020

Comments

  • Alex Stone
    Alex Stone almost 4 years

    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 project settings and selected 4.3.

    The app failed to build with the following error message:

    Storyboards are unavailable on iOS 4.3 and prior

    Both the iPhone and iPad storyboards tell me that.

    The issue that when I switched back to iOS5 target, I still keep getting these errors from both storyboards, and the product won't build! I checked: iOS Deployment target in projects settings is 5.0 Target app deployment target is 5.0 Build settings uses iOS 5.0 SDK

    What else do I need to do to restore my project to a buildable state? Is this a brand new bug or am I forgetting something?

    Update: I kept getting this error even after doing a clean. I changed the debugger in Schemes to "LLDB" and did an additional clean, the project now builds and compiles

  • FractalDoctor
    FractalDoctor over 12 years
    This worked for me too, changing from GDB to LLVM didn't seem to do the trick. It seems changing the Deployment Target to anything less than 5.0 on the Target->Summary screen sets the Storyboard Document Versioning Development (Xcode) back to 4.1, but changing back to 5.0 doesn't change the Xcode version back to 4.2.
  • beryllium
    beryllium over 12 years
    Cmd+Q - to close xCode. Common 'close' is not helpful.
  • Tyler Collier
    Tyler Collier over 12 years
    My experience is similar to FiddleMeRagged's answer: this worked for a while, and at the moment is not working (though neither is the solution by cotton5415). So unfortunately you can't expect this to work 100% of the time, even if it works sometimes.
  • Bushra Shahid
    Bushra Shahid over 12 years
    i also had to clean before rebuilding
  • smcmahon
    smcmahon over 12 years
    I had the same problem, but wasn't able to correct it this way. I was finally able to correct it by removing the reference to the storyboard, build, add it back, then build again.
  • Hlung
    Hlung over 12 years
    Oww Yeahh! That 'Another idea' works! Tried everything else but none of them work!
  • LilMoke
    LilMoke over 12 years
    I know this is an old post, but I did the above steps and I can build now, but my launch screen appears and then the screen goes blank. Did you experience this also?
  • Nicolas Renold
    Nicolas Renold about 12 years
    This seems like it would be the most reliable. It worked for me when no other answers here did.
  • Joe D'Andrea
    Joe D'Andrea about 12 years
    I wish this worked for me! I feel like it ought to, based on the feedback, but no dice, sorry. :(
  • David Morton
    David Morton about 12 years
    This is the only one that worked for me, and I'm unashamedly downvoting answers that didn't work. Sorry guys... this one got too frustrating.
  • Berik
    Berik about 12 years
    This worked for me, while changing the Document Versioning and restarting / cleaning did not work.
  • PeterK
    PeterK almost 12 years
    uhhhh i just can not thank you enough (+1), this saved my day :-)
  • JARC
    JARC over 11 years
    Bit weird, but what worked for me was dragging the story board file out of xcode to the desk top, clean then build - makes no sense I know.
  • rob
    rob over 11 years
    This worked for me. Weirdly, deleting the project's derived data from the Organizer didn't work, but deleting the whole folder from the finder did.
  • brainray
    brainray over 11 years
    I can't even remove the references, since Xcode 4.6 crashes as soon as i touch a storyboard
  • brainray
    brainray over 11 years
    deleting the DerivedData folder is always the first thing I try. However, didn't help here
  • brainray
    brainray over 11 years
    This worked for me, and I edited the answer by adding detailed steps. I wonder who was so smart to downvote this suggestion...
  • brainray
    brainray over 11 years
    correction: this worked for me until Xcode re-corrupted the project. I also had to reinstall Xcode...
  • brainray
    brainray over 11 years
    Thanks, that finally fixed it here. Just for others: you may identify that problem if the error message "ibtool failed with exit code 255" appears.
  • Adeel Pervaiz
    Adeel Pervaiz about 11 years
    Yes, Another Project Build Successfully, now old one also build without errors. Thanks.
  • LearnCocos2D
    LearnCocos2D about 11 years
    Simply deleting both <deployment..> and <development..> (if existing) from the storyboard file fixed it for me.
  • LearnCocos2D
    LearnCocos2D about 11 years
    Deleting both <deployment..> and <development..> entries worked at least for one storyboard file. Weirdly, this fixed the same "not available in iOS 4.3" error in a different, unrelated project with storyboards.
  • Emadpres
    Emadpres about 11 years
    Yes! Simple Solution: reopen xCode and just the Clean , Done ! =)
  • morph85
    morph85 almost 11 years
    I did tried all the methods above but to no avail.. until i met with this solution, which works quite perfectly.