Xcode 8 Storyboards Blank - xcode

For some reason in Xcode 8.1, all my storyboards are now blank, with boxes around where the content used to be:
I tried cleaning, deleting the Derived Data folder, and changing the size to Freeform but nothing has worked.
How do I fix this?

Try these:
Delete your derived data. Close xcode and clean, build again.
If option 1 not work then, Copy your project to another directory/folder. Close Xcode, open project from new directly and clean, build.

Related

Xcode 8.2.1 becomes unresponsive when i click on main.Storyboard

First, there's one old question with the same issue, but since the answers don't work for me, i'm posting this one:
I had problems to open an old project at all. So i deleted xcuserdata and the derived data, from the options tab, too. This one worked fine and i was able to open the project, but now when i click on the storyboard Xcode "hangs" and i have to force it to quit.
This happens only if i click on main.Storyboard, every other file in the project works fine when i click on it.
The last thing i tried was to run the project and in the last 5 minutes, it says Compiling 2 of 2 Storyboard files and that's all; no other result at the moment.
edit: cleaning the project doesn't work too.
edit2: It seems the problem is with my Xcode, not the project. I created a new project and Xcode freeze when i try to open the storyboard. Same with some other old projects.
Next step: reinstalling the Xcode.
Ok, like i comment previously, i tried a lot of things before consider to reinstall Xcode, but the most important were to run the project in other Mac and when i saw that there was no problem to show the storyboard i concluded that the issue were in Xcode.
I reinstalled it and it works fine.
Before everyone does that it's probably a good idea to see if your project run on other mac.
You can also delete xcuserdata, the derived data and the Xcode saved state.
Among the other things i tried:
I restored the version of main.storyboard i have on time machine, just before the crash. Didn't worked, but worth to try.
I also considered to replace the file with the same but from some old version. But the problem was, that i've made too many changes on the actual storyboard, so i needed to find a way to restore it.

Xcode 4.2 Product -> Run Greyed Out

My "Run" button under "Product" is greyed out and after trying a few things from various forums, can't figure out what's gone wrong.
I've tried removing the project.xcworkspace and xcuserdata files and letting xcode generate new ones, but no...
My co-worker uses AppCode from IntelliJ and when he pulls the code, it runs just fine. But if he opens the same files in his Xcode, his "Run" is also greyed out.
"Edit" your current "Scheme":
Make sure you have "Run" checked for that build target:
The scheme need to be fixed (I don't know why xcode changed it)
Here are the required steps:
, ,
Make sure you have the correct target selected.
(Upper-left in Xcode window, near the triangular Run button.)
My co-worker who uses AppCode had edited the configuration file, moved some frameworks around, etc... We noticed that there was a difference between XCode and AppCode in using relative vs. absolute paths in the project.pbxproj file.
Ultimately I just reverted the code to before his changes, so at this stage, I'm not entirely sure which difference in the config file actually caused Xcode to not be able to Run the project.
**EDIT
From the .git logs, it looks like AppCode was adding relative directories with 7 sets of "/../" and before there were only ever instances of 5 "/../" to get back to the root directory.
Rather frustrating that Xcode had no way of dealing with this from inside the IDE.

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

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
I also got this problem and finally I solved this by following procedure:
Open XXXXXX.storyboard
Open Identity and Type tab in your right view of Xcode.
Set the value of Development in Document Versioning to "Xcode 4.2" (my default value is "Default Version (Xcode 4.1)".
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.
The solution that worked for me was just to delete the ~/Library/Developer/Xcode/DerivedData directory for my project.
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.
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.
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:
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.
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!
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.
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...
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.
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!!
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.
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.
After trying all the suggestions above, without success, I got my code to compile doing the following.
Edit -> Refactor -> Convert to Objective-C ARC
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
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.
Uninstall XCode.
Delete user/library/developer/XCode folder.
Reinstall XCode (maybe you should start this before searching for the folder, download took me 20 minutes).
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)!
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.
Here is yet another random, voodoo, disconnect your iPhone if it is connected.
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!

Can't create iPad XIB with Xcode 4

Alright, I have a problem on my hands. I'm trying to convert my project to a universal app for the iPhone and the iPad. I'm trying to make iPad-specific versions of my XIB files. As it's not possible to Create iPad version using autoresizing masks in Xcode 4, I assumed I'd just be able to pop my XIB into Xcode 3's version of IB, and let that do the magic. No dice. Here's the error I get when i try to open the XIB file in IB:
To be honest I don't know where to proceed from here. I guess I could just resize my views manually, but that's quite tedious and I don't really have the time to be doing that. Any ideas?
Alright, I figured out a rather convoluted workaround.
First of all, duplicate your original project and then select your project info. Right-click on your target, and select "Duplicate".
Xcode will then pop up this message. Select "Duplicate and Transition to iPad".
Now Xcode converts the XIB files for you, and presents you with an iPad resources folder.
Now open these XIB files in the Finder, and append ~ipad after the file name.
After doing so, copy these XIB files back into your original project, and then turn your project into a universal project by selecting from the dropdown in your target settings.
And you're done. I found that really convoluted, and I'm hoping Apple can fix this huge usability problem soon.
This should not happen. One way to fix this problem would be t completely remove the Xcode 4 Installation and re install it from scratch . And then re install it.
Use the following command to uninstall and re install Xcode 4
sudo [xcode-path]/Library/uninstall-devtools --mode=all
PS: If you are creating projects in Xcode 4 that you also want to open in Xcode 3 make sure you keep Document Versioning section to Interface Builder 3.1

Deleting included resources causes XCode to crash/complain

If I try to delete some image resources from my (iPhone) XCode project via Finder, XCode will complain with errors on next build that it can't find these files.
If I try to delete them via XCode's 'Delete' command, XCode crashes everytime without fail.
If you didnt copy them into the project (instead of simply reference them) then you may have problems like this, although xcode should not crash when you try deleting them.

Resources