Xcode Unknown class l in Interface Builder file Glitch - ios

I keep encountering what I believe to be a bug in Xcode version Version 9.4.1. My code will run fine, then after making no adjustments to the storyboard/interface that would necessarily affect the ID or any of my outlets, I will get the error Unknown class l in Interface Builder file.
I have tried investigating, but no luck. I can't find any objects in my storyboard with the class l. Last time, I was able to fix the error by hitting undo a few times. However, hitting undo is not fixing the problem this time. Cleaning the project via SHIFT+CMD+K and restarting Xcode also have no affect.
Anyone else run into this error or have any idea how I could fix it?

Update
After opening and closing Xcode a few more times, the problem seems to have "magically" sorted itself out. Odd, right? While I shouldn't look a gift horse in the mouth, I can't help but remain curious about what could've possibly caused this bug in the first place.

Related

XCode 7.2.1 - cdtool cannot compile occurs irregularly

The app I am developing has a weird issue since a few months. Sometimes during building an archive the error cdtool cannot compile occurs. But only sometimes.
When I wipe the derived-data and do a clean-archive it works again.
I found a variety of people asking similar questions, but they all had this error occur nonstop.
To be precise: The error occurs always during archiving and always on the same file which is Config.xcdatamodel. This CoreData model only has one version so version-conflicts aren't a problem (also verified on the file-system).
Unfortunately it is nearly not reproducable at all, it seems to occur 100% randomly. It also doesn't provide an closer information about what exactly it is, that fails.
In the image there are two compile-errors. Thats because the Config.xcdatamodel that fails, is in both targets. They won't be used at the same time, so it should be fine. I also suspect that the second error-message is based on the first (upper) one.
Did anyone ever observe such a behaviour? I'm currently using XCode 7.2.1

Xcode 7 crash every time I try to print something in the debugger console

I've searched around and can't find anything on this.
Using Swift 2 and Xcode Version 7.0.1 (7A1001). Every time I execute something in the debugger console, Xcode crashes.
The project is not very big, and has less than 10 third party frameworks.
I can't think of much more information that's relevant, but I'm sure there's more, so please do ask me if there's anything I should add to my question that would help.
I've of course cleaned build and derived data.
It's driving me insane. Thanks!
UPDATE 16/11/12
Submitted rdar://23559366.
How are you maintaining your third party frameworks? Via Carthage?
If so then this is probably your issue: https://github.com/Carthage/Carthage/issues/924
This is an issue if the location of the /Carthage/Build/iOS folder is in a different location to where it was produced (i.e if it was compiled on a different machine and the absolute file path has changed).
A temporary fix would be to run carthage build --no-use-binaries on your machine to rebuild the symbols using the current absolute file path working around the bug.
But if you wasn't using carthage then its probably not your issue so sorry
I had similar problem with Xcode whenever I hit breakpoint.
In case you see this screen right before your Xcode crashes - you are lucky and my fix might save you. All you need to do is open this window and in the Project Navigator, select any file that you want, so that instead of that white blank view you would get your code. After this you are most likely will be able to successfully stop your app at your breakpoint and perform the debug.
I am not sure why this happens, but I suspect that the reason is Debug View Hierarchy mode, which you might have triggered prior to setting you breakpoint and trying to stop at it. At least this is when it happens to me.
I have similar problem earlier.
If you try to print non-optional variable and unfortunately it holds nil value then it breaks/crash. so that make sure declare all possible variables as "Optional type".

"plugin invalidated" error in iOS keyboard app

i am getting a pretty generic error in my debugger when using the simulator in xCode.
plugin com.XXX.XXX.Shortcut-Keyboard invalidated
this just started occurring yesterday and i don't believe i changed anything. since the error started i had just added a few more outlets and actions. i did try something in the code which changed the first responder on a text field, but i have since removed that code and recompiled. It seems maybe this caused an issue? Now when i cycle thru the keyboards, when it gets to mine i get a few second pause and then this error. in debugging the code, it never seems to hit my viedDidLoad override in my keyboard view controler. So something i did must have changed it.
What would cause something like this to occur? I'm at a loss! Im using Xcode 6.3.1 with a target of 8.3 on an iPad. Any help would be appreciated as this is holding up my development.
Thanks
Mike
start a new project and copy and paste the code resolved this issue

Build failed--attribute must have a defined type

My app crashes on build. Here's the error in it's entirety:
DataModelVersionCompile /Users/AAAAAAA/Library/Developer/Xcode/DerivedData/XXXXXXXXXX-envirswdnpegjccdpxakhoykfnfq/Build/Products/Debug-iphonesimulator/XXXXXXXXXX.app/WMMGDataModel.momd XXXXXXXXXX/WMMGDataModel.xcdatamodeld
cd "/Users/AAAAAAA/Desktop/Everything from DT 1:20:15/App projects/WMMG/XXXXXXXXXX"
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/momc -XD_MOMC_SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -XD_MOMC_IOS_TARGET_VERSION=8.1 -MOMC_PLATFORMS iphonesimulator /Users/AAAAAAA/Desktop/Everything\ from\ DT\ 1:20:15/App\ projects/WMMG/XXXXXXXXXX/XXXXXXXXXX/WMMGDataModel.xcdatamodeld /Users/AAAAAAA/Library/Developer/Xcode/DerivedData/XXXXXXXXXX-envirswdnpegjccdpxakhoykfnfq/Build/Products/Debug-iphonesimulator/XXXXXXXXXX.app/WMMGDataModel.momd
/Users/AAAAAAA/Desktop/Everything from DT 1:20:15/App projects/WMMG/XXXXXXXXXX/XXXXXXXXXX/WMMGDataModel.xcdatamodeld/WMMGDataModel 5.xcdatamodel:WMMGAccount.attribute: error: WMMGAccount.attribute must have a defined type
/Users/AAAAAAA/Desktop/Everything from DT 1:20:15/App projects/WMMG/XXXXXXXXXX/XXXXXXXXXX/WMMGDataModel.xcdatamodeld:0: error: Compilation failed for data model at path '/Users/AAAAAAA/Library/Developer/Xcode/DerivedData/XXXXXXXXXX-envirswdnpegjccdpxakhoykfnfq/Build/Products/Debug-iphonesimulator/XXXXXXXXXX.app/WMMGDataModel.momd/WMMGDataModel 5.mom'
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/momc failed with exit code 1
The relevant part seems to be:
/Users/AAAAAAA/Desktop/Everything from DT 1:20:15/App projects/WMMG/XXXXXXXXXX/XXXXXXXXXX/WMMGDataModel.xcdatamodeld/WMMGDataModel 5.xcdatamodel:WMMGAccount.attribute: error: WMMGAccount.attribute must have a defined type
I've gone into my xcdatamodel, but can't find any attributes that aren't properly defined by type. One suspicious thing I'm seeing is the reference to WMMGDataModel 5. I'm up to version 8 in my model, and can't even find version 5.
This crash began after a recent automatic migration (using MagicalRecord) in which I added an attribute to one of the entities and then recreated the Managed Object Subclass (yes, the new subclass contains the new, properly defined attribute). I've added attributes before, but this is the first time I've encountered this issue.
I've cleaned the thing, quit and restarted Xcode, still crashes. Anybody have any ideas? I also deleted the DerivedData folder for the project. Still won't build.
Edit:
I just recreated all my managed subclass files. Still no dice--same error message.
Edit:
I tried running another project as a control, and got this message:
Unable to run app in Simulator
An error was encountered while running (Domain = FBSOpenApplicationErrorDomain, Code = 4)
So I quit Xcode and the simulator, restarted Xcode. Same error.
Yet more info
I restarted the computer and tried again, but am still getting "Build Failed" with the same error message.
If anyone else has run into anything like this, I sure would appreciate some guidance here... :)
Final edit
Please see solution in my answer below...
Ok, I finally cured the problem with a decision to delete my xcdatamodeld and rebuild the entire model. Some research into how to do this yielded a less destructive and less risky method in this answer.
Here's hoping it will help someone else with this problem.
Thanks to all who took a look!
I've never had the problem you describe, but have a few suggestions. Apologies if you've already tried these:
First, in the model editor, can you access the model version 5 that you suspect is the problem, eg.:
If it's there, you can hopefully fix the attribute error. If it doesn't appear there, have you tried right-click in the Project Navigator and select "Show in Finder":
Then in Finder looking for the version 5?

Xcode going crazy! while coding, loses classes, references and doesn't autocomplete giving often <<error type>>

After I installed the latest version of xcode i'm having a very annoying issue.
While I'm coding, xcode goes nuts. Without me doing anything weird, just typing code, xcode stop recognizing classes.
For example: I want to add UITableViewDelegate to my class, but it doesnt recognize it. After i type it manually sometimes it recognize it and it is shown in purple, some other time it doesnt. But both times it won't really consider it, so if I try to write down a method of that delegate, it won't show it.
Other times if I try to call a variable of a certain class, while trying to autocompleting it, it shows <>.
Other times if I try to call any class, let's say I try to type var test = UIActionSheet, it just shows a few elements in the autocomplete list (raw types, primitives, the classes of my main project, but it doesn't show the majority of classes).
It's like it's missing the documentation and the link with the main frameworks...
I'm working on a simple tabbed app from yesterday and it's the 3rd time i started all over because of this issue, thinking that starting over would fix the issue, but it's not working.
If i open a different project while the issue is going on, the other project works ( but i recoded all over my app so it's not that one the issue, and i also have the same issue on other project... it just doesn't affect 2 project at the same time )
i tried deleting derived data
i tried restarting both xcode and the comp
What's going on?
Here are two screenshoots where you can see what's happening:
I had the same problem earlier.
Exit Xcode and delete Derived Data folder here ~/Library/Developer/Xcode
Restart Xcode and you should see the autocomplete working again.
You have to learn how to take it apart and put back together.
Either reinstall Xcode, if it doesn't help, create a new project.
Then copy source files one by one and see when it breaks.
Freshly install the XCode IDE version 6.1
Use CMD + F to find all _element.
Check that if you named one variable _element
The following code may reproduce the error:
class _element:NSObject {
}
let _element:UIImage = UIImage()
// type _element under this line

Resources