Connecting interface builder with compiled nibs - xcode

I have accidentally deleted my main storyboard. Now I am trying to use the main storyboard from this path:
Users//Library/Developer/Xcode/DerivedData//Build/Products/Debug-iphonesimulator/.
I found here a file named Main.storyboardc which I suppose is my main storyboard but when I am trying to compile it (with this new Main.storyboardc) I am having an error saying Interface Builder cannot open compiled nibs.
I know this question is discussed before but I didn't find anything helpful
Furthermore I am using Xcode 6.3.1 and this discussion was not very healpfull Xcode 6 Interface Builder "cannot open compiled nibs" error, FiksuSDK

Related

Xcode fresh MacOS project shows compile errors like Use of "Undeclared type NSObject"

I'm facing a few problems with Xcode. I have searched around and nothing helps... to make things worst i'm learning everything from scratch. swift, xcode, build mac apps... coming from ruby/rails this is extremely painful!
A while ago all projects started throwing errors like the use of undeclared type 'NSObject' and so on.
I am using Xcode Version 6.1 (6A1052d).
The project still runs if I clean/build it and run. But as soon as I select another file and come back the AppDelegate the errors appear again. Also cmd+clicking just displays "Symbol not found" and autocompletion doesn't work.
I created a new blank project (multiple times) and this still happens. I didn't even touch the code! I have attached two images to show my problems.
The first line error I managed to fix it following Subclass UIApplication with Swift:
Basically I removed #NSApplicationMain from AppDelegate and created a main.swift file with these lines.
import Foundation
import AppKit
NSApplicationMain(C_ARGC, C_ARGV)
this seems to fix the 'NSApplicationMain' class must conform to the 'NSApplicationDelegate' protocol error.
But I can't see how to fix the other errors. Any help please? :) Thanks in advance.

Xcode 6.0.1, Swift, UIKit, CoreGraphics missing

To make it short:
Do never ever give a project a frameworks name! I called my project "CoreGraphics".
Original question:
I cant use CoreGraphics in a newly created simple Single View Application
I start Xcode 6.0.1 (6A317)
New Project: Single View Application: Swift
New File: Cocoa Touch Class "CustomView" of type UIView
I uncomment the template for drawRect(rect: CGRect) {}
Compiler Error: Use of undeclared type 'CGRect'.
import UIKit is in place
I tried to add CoreGraphics to "Linked Frameworks and Libraries"
I already restarted Xcode (and my Mac)
Update
I installed Xcode 6.1 (6A1046a) opened and recreated my simple project.
Same issue: Compiler Error: Use of undeclared type 'CGRect'.
Any further suggestions?
Don't name your Project "CoreGraphics"
Guys you WON'T believe this. Do never ever give a project a frameworks name! I called my project "CoreGraphics". This caused the compiler error. Its reproducable. Issue closed.

.xib file location

I am literally following a iOS Programming book (iOS5). it says that there is a xib file in the navigator but I am unable to find it. I am using xcode 4.5. I am really confused as this is my first time trying out iPhone development or anything in xCode if that matters.
This depends on which kind of project you are creating. For example a project created from the "single view application" template will create a xib file.

Unknown Window class Xcode 4.4

I recently organized the project folder for my Mac app, which contains over 40 custom classes. I organized these classes by putting them in folders.
After making Xcode aware of the new file locations, I ran my app. The following was logged...
Unknown Window class TSDirectoryWindow in Interface Builder file,
creating generic Window instead
I went into the compile sources, removed every file, then added them back (thinking maybe the compiler was still looking at the old locations). No luck.
I'm semi-new to Mac/Objective-C development, and I'm starting to think organizing my files was a bad idea. For all I know, this could be a big no-no. It appears to be a issue with every nib, as I get the same message when MainMenu is the main interface,
Unknown class 'TSAppDelegate', using 'NSObject' instead. Encountered in Interface Builder file at path
/Users/tsilva/Library/Developer/Xcode/DerivedData/Podsnatcher-dlctvrrkdaksfdbblvopdarwlslr/Build/Products/Debug/Podsnatcher.app/Contents/Resources/en.lproj/MainMenu.nib.
Any ideas on how I can get this fixed? Thank you for your time!
I was adding the files to the linker for the "MyAppTests" target, not the application itself. Whoops.

Interface Builder is unable to open documents of type CocoaTouch XIB

I just installed the laster XCode and iOS SDK and I keep getting the following error when I open a XIB file.
"Interface Builder is unable to open documents of type CocoaTouch XIB."
if you are using xcode 4.2.3 or newer version of then you have to no need to set HEADER SEARCH PATH. if you had added these two lines then remove it.
"$(BUILT_PRODUCTS_DIR)/../three20"
"$(BUILT_PRODUCTS_DIR)/../../three20"

Resources