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

18

98

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

Cornelia answered 15/10, 2011 at 23:57 Comment(5)
For the record, I have tried every single proposed solution (as of 9 Feb 2012). None work. Hmm ...Ancilla
I have the same issue, even with new projects (this is crazy)! I tried all methods here, none worked. Updating Xcode to the latest version (4.3.1) does not help either. grrrrrr.....Gore
None of the answers below worked for me. Tried on March 22..! :(Suburban
I Profileed the application for leaks and then Runed it =)Audra
can't imagine how stupid apple isTeleology
C
111

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.

Carbonation answered 26/10, 2011 at 5:56 Comment(6)
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.Impolitic
i also had to clean before rebuildingMuskogee
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.Oregano
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?Euboea
I wish this worked for me! I feel like it ought to, based on the feedback, but no dice, sorry. :(Ancilla
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.Kauslick
H
20

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

Hoarsen answered 4/3, 2012 at 5:45 Comment(4)
This seems like it would be the most reliable. It worked for me when no other answers here did.Willingham
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.Collis
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.Cosmo
deleting the DerivedData folder is always the first thing I try. However, didn't help hereWinstead
I
17

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.

Impolitic answered 9/11, 2011 at 15:10 Comment(2)
This worked for me, while changing the Document Versioning and restarting / cleaning did not work.Karyolymph
uhhhh i just can not thank you enough (+1), this saved my day :-)Ilise
B
14

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.

Bonhomie answered 26/10, 2011 at 14:27 Comment(3)
Cmd+Q - to close xCode. Common 'close' is not helpful.Anthracnose
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.Verbalize
Yes! Simple Solution: reopen xCode and just the Clean , Done ! =)Koel
V
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.

Verbalize answered 22/11, 2011 at 18:35 Comment(2)
Oww Yeahh! That 'Another idea' works! Tried everything else but none of them work!Tooling
Yes, Another Project Build Successfully, now old one also build without errors. Thanks.Eratosthenes
B
7

After trying all the answers in here (removing the Storyboard reference, quitting Xcode, cleaning, changing debugger, etc.), none worked (with Xcode 4.5).

The only way I got it to rebuild (and it was a total guess) was to open the Storyboard file in a text editor and delete the following line:

<deployment version="1280" identifier="iOS"/>

It should be near the top of the file, in the <dependencies> section. After that, the project was built successfully and Xcode even re-added that line to the file, but, it still builds...

Go figure...! Hopefully it can help someone!

Bantling answered 8/11, 2012 at 15:54 Comment(1)
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.Gratia
H
6

At last, an elegant workaround that seems to do the trick for me! (I sure hope it works for everyone else. This one's stubborn.)

Once your settings are back safely in iOS 5-land, try Cmd-Option-Shift K (aka "Clean Build Folder..." from the menu - hold down Option to see it), then build.

Hew answered 20/4, 2012 at 14:44 Comment(1)
I did tried all the methods above but to no avail.. until i met with this solution, which works quite perfectly.Whoop
G
5

the solution is simple, right click your storyboard file, and show in finder then select the folder where the file is (this would probably be in the en.lproj folder) right click on the MainStoryboard.storyboard file causing the problem and open with text edit find the line that reads or something like this:

<development version="4300" defaultVersion="4200" identifier="xcode"/>

and change it to something like this:

<development defaultVersion="4300" identifier="xcode"/>

save the file and build. Et voila...

Greenes answered 30/3, 2012 at 17:5 Comment(1)
Simply deleting both <deployment..> and <development..> (if existing) from the storyboard file fixed it for me.Gratia
F
4

Ok, I tried everything above and problem still occurred. So I just remove storyboards (as reference not move to trash). then build successfully; after that I added them again; Build, And finally worked.

Florie answered 27/3, 2012 at 1:21 Comment(1)
I can't even remove the references, since Xcode 4.6 crashes as soon as i touch a storyboardWinstead
S
3

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!!

Suburban answered 23/3, 2012 at 3:0 Comment(0)
G
3

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.

Geibel answered 19/7, 2012 at 12:6 Comment(0)
A
2

Here is yet another random, voodoo, flail that seemed to workaround the bug just now. (after other techniques here had not helped) I renamed the storyboard file (and the entry for it in the info.plist file). Haven't tried the "drag to/from desktop" ritual yet.

Tonight, I have lost like 45 minutes to this issue. grrrrr. Ok I feel better now.

Adamantine answered 17/1, 2012 at 7:52 Comment(2)
This worked for me, and I edited the answer by adding detailed steps. I wonder who was so smart to downvote this suggestion...Winstead
correction: this worked for me until Xcode re-corrupted the project. I also had to reinstall Xcode...Winstead
M
1

After trying all the suggestions above, without success, I got my code to compile doing the following.

Edit -> Refactor -> Convert to Objective-C ARC
Malawi answered 26/11, 2011 at 22:27 Comment(0)
C
1
rm -rf $HOME/Library/Application Support/Developer/Shared/Xcode
rm -rf $HOME/Library/Preferences/com.apple.dt.Xcode.*
rm -rf $HOME/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState
rm -rf $HOME/Library/Developer/Xcode

seems to help with Xcode 4.3.2

Candent answered 13/4, 2012 at 22:16 Comment(0)
M
1

Had similar issue. XCode would build and run other projects fine but couldn't get rid of the error on project I had changed, not even backups from server. Tried all the above solutions but nada. Here is what worked.

  1. Uninstall XCode.

  2. Delete user/library/developer/XCode folder.

  3. Reinstall XCode (maybe you should start this before searching for the folder, download took me 20 minutes).

  4. Start up, clean and build.

Worked for me. Saved me some time. Sometimes when the scalpel doesn't work it's time for the hatchet. Now I get to pick a new font to code in (this will clear your preferences)!

Madalene answered 22/5, 2012 at 11:21 Comment(1)
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.Winstead
H
-1

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.

Haggerty answered 3/1, 2012 at 19:35 Comment(0)
G
-1

Here is yet another random, voodoo, disconnect your iPhone if it is connected.

Gore answered 12/3, 2012 at 13:44 Comment(0)
R
-2

I simple changed deployment target to 4.0 and Development to 4.3 from MainStroyboard. I clean the project; and restarted the mac, :) i know it sounds funny but restarting xcode didn't helped. maybe there is a cache in memory...

Then i built the project ; it was ok!

Roomy answered 2/4, 2012 at 10:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.