I'm using a 13" Macbook Pro. I'm beginning a project for University; I'm making an iPhone application. I bought the DevKit but had some problems opening Xcode, I realiased I'd upgraded to Lion since I downloaded it and needed to upgrade, so I did, so Xcode 4.3.
Now I can use Xcode fine (as far as I can tell) but Interface Builder gives me this error when I try to make a new iPhone Application Template/Project:
This version of Interface Builder does not support documents of type "Interface Builder Cocoa Touch Document (XIB 3.x)" targeting "iPhone/iPod touch".
And this one if I try to make a blank one, of any other the other options:
Interface Builder was unable to open the document "Empty.xib". iPhone/iPod touch development requires the iOS 3.1 SDK.
Now, I checked, and according the the AppStore (which is where I was forced to download it from) iOS 5.0/5.1 SDK is included. I tried to redownload a few times but to no avail. I have a feeling this is something really stupid, so feel free to call me so.
You should be using Xcode itself to create, view, and modify xib files for iOS 5 projects. Interface Builder as a separate application is no longer provided by Apple for iOS development.
Xcode 4 allows creation of user interface files from the File > New > New File menu item. When you select a user interface file from Xcode's project navigator (which you can show via View > Navigators > Show Project Navigator or by pressing Cmd-1), a user interface editor appears where the source code editor typically appears.
Related
I was using using Xcode 4.5 to create an iPad application yesterday and completed it. But today when I took that same Xcode project and tried to run it on an older machine running Xcode 4.2, it is giving me an error about IBNSLayoutConstraint. Which i guess was due to the new features that were included in the new Xcode 4.5. So I was thinking is there a way to open project from new Xcode in the older version without having to install a new Xcode and OSX.
I am not sure if this question is asked here yet or not, but i tried to find a solution but no luck in that either.
PS. I already know that the best solution is to not opent those projects in older version but that is not what i am looking for.
There is an option in the inspector window when you select the xib file that will not use the constrains under "Show file the inspector" in the inspector called "Use autolayout".
Here is a screen shot of it.
uncheck autolayout feature from each xib file the open your project on xcode4.2, it works on my case, as autolayout is only available in iOS6
I just bought the book: Sams Teach Yourself iPhone Application Development in 24 Hours.
In the book it uses xCode 3.2.4, so I went ahead and tried xCode 4.3 (the current version), but I didn't understand what to do...
I then found this page...
https://developer.apple.com/downloads/index.action
I downloaded the version of xCode used in the book (just so I could see the same thing the book shows).
But, I'm getting two errors each having something to do with the Interface Builder...
"This version of Interface Builder does not support documents of type "Interface Builder Cocoa Touch Document (XIB 3.x)" targeting "iPhone/iPod touch"."
And it comes up twice for two different documents in my xCode project.
How can i get it to work? In the book the code I put in works just fine.
Also my Mac Version is: 10.7.3
Do not waste time learning anything about Xcode 3.x. That would be like learning how to build catapults and siege engines in preparation for a career in the military.
Apple completely rewrote Xcode with version 4.0, and every single thing about the user interface is totally and completely different. If you invest time learning 3.x, you will be totally lost and confused when you move up to 4.x (version 4.3. was just released, and there is yet a new version on the horizon.)
I was totally lost and confused for about 2 weeks when I made the move from Xcode 3.x to 4.x, and I do this for a living and have been using Xcode for over 6 years now.
Unfortunately, the iOS development books are behind the curve when it comes to versions of Xcode.
Do yourself a favor and set the Xcode 3 book aside and find an Xcode 4 book (an ebook might be a better choice, since they can be updated.)
From what I just read, the xib files you have are not compatible with the newest version of Xcode.
You may learn loads by fixing this.
Don't delete the two files yet...
Will the xib documents still display in IB?
Try this:
Rename the two xib files to some other name.
*) With the old file open in IB, click View, Utilities, Show File Inspector.
Click File's Owner, Rename
1) In toolbar click File, New, File
2) Choose User Interface, Empty, Next, Next
3) Type the name of the corresponding .h file, be case sensitive. Click Create.
4) Click File's Owner
5) With the new file open in IB, click View, Utilities, Show Identity Inspector.
6) For the class name, Use the class name in which you are attempting to fix.
7) Drag a New View object to to the canvas, right click the new view, and set a Reference to the file owner's view variable by dragging to File Owner.
At this point, you could attempt to copy all the objects out of the old xib and paste to the new one. Make sure you check all referencing outlets and target action stuff.
8) Delete the old files in Xcode by right clicking and choose Delete, References Only.
Let me know if this works or not.
I have installed xCode 4.0.2 on my mac mini, every thing is working fine, I have compiled some sample applications too, but the interface builder is missing in the directory Developer/Application while xCode.app is there.
Interface Builder is no longer a sperate app, it is fully integrated in Xcode 4.
Interface Builder is inbuilt with Xcode 4 now. So you can just select your .xib file and it will show at right side. You may need to select last icon on right side top navigator to display Interface builder.
I really don't understand this. I downloaded the recent version of xCode 3.2.5 and Interface Builder 3.2.5. I follow these steps:
Create: Window Based Application (iPhone)
Double Click: MainWindow.xib
-- Launches Interface Builder --
selects -> File -> Build and Go in XCode
I get the following error in Interface Builder:
"Interface Builder could not build and go in Xcode.
Build failed (1 error)"
But there are no build errors in Xcode. I don't quite understand what is happening since I am new to this platform. Can anyone assist?
It's generally not a good idea to Build and Run from Interface Builder. Just switch back (cmd-tab) to XCode and hit cmd-R to Build and Run from there.
Interface Builder is trying to run the xib itself instead of running your Application.
Have you added any code?
The best place to start is with one of the getting started documents. If you are a registered developer, there are also videos available in the developer center.
Just save and Build and Go in Xcode. I have a feeling it's because it's a UIWindow rather than a UIViewController. Why did you choose a window-based project?
I'm developing a new app but I've a little issue with Interface Builder...
I've installed Xcode 3.2.3 and iPhone SDK 4.0 GM.
When I create a new Tab Bar Application project in Xcode, opening the MainWindow.xib file in IB, the Tab Bar Controller won't open... I tried reclicking it but nothing!
I also uninstalled and reinstalled all developer tools but without any results...
Finally if I try to build and run the project in the simulator, the tab bar controller shows normally!
Can anyone help me? :)
It sounds like something similar to what I have experienced with my projects and the new sdk. Some of my IB files such as ones that contain UIViews when double clicking on them they refuse to open.
I haven't had to reinstall or nothing usually quitting IB and xcode and restarting helps I can't remember if I have done anything else to fix it. It may be an issue with the new 3.2.3 xcode as I don't recall having anything like this happen in my 3.2.2 build.
If it becomes a large problem for you have you considered removing the tab bar and rebuilding it? Just a thought. It may be troublesome to do so but if it fixes it and allows you to continue coding your project it would be worth it.
You said in your question that you're running iPhone SDK 3.2.3 with iOS4 GM. You should update your SDK, as the SDK is now at version 4.0 officially.
Otherwise, it sounds like your Xcode installation is somehow corrupted in some way. You may need a complete reinstall.