Interface Builder XIB Compiler error - interface-builder

I get this error message when connecting two UISwipeGestureRecognizers to a single view in my project inside of a XIB file (though not in a new project, curiously). Anybody know what this error means? It is a compile error, not a runtime error. I'm using Xcode 4.4 (this error doesn't happen on Xcode 4.5 actually). This is an error from inside interface builder.
Assertion failure in -[IBCocoaTouchToolObjectPackage connectionsByProcessingConnections:], /SourceCache/IBSimulatorComponents/IBSimulatorComponents-223/IBCocoaTouchTool/IBCocoaTouchToolObjectPackage.m:1132012-08-03 16:52:01.428 Interface Builder Cocoa Touch Tool[5646:11903] Exception producing nib: Mismatched addsContentToExistingCollection value for the coalescing outlet connection & one of its fragments.

I suspect this occurs because Interface Builder allows your outlets to get into an inconsistent state. It's a logic bug in Interface Builder that manifests as a run-time exception in the ibtool compiler. I was able to work around it by disconnecting the outlets and outlet collections I had recently created, and then rewiring them.

I was actually able to get rid of the error by deleting the entire Panel in the XIB, and then just undoing the delete. Clean + Build and the error was gone. Not sure if that will work for others as well.

Related

Error when clicking any UI element in Xamarin.iOS

I have an issue with an iOS app I'm working on (https://github.com/nodoid/WeatherApp). It builds and deploys fine but when you hit any UI element that isn't a label, it crashes with an error such as
ViewController btnGetWeather unrecognised selector sent to instance
Error: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: ViewController btnGetWeather unrecognised selector sent to instance
It's been a long time since I've done anything with iOS native (I was still using xibs!). It looks like everything is correct on the storyboard but I'm at a loss as to why this is happening given everything builds.
I've done the usual trick of deleting the obj folder in the iOS project, but still get this issue.
I downloaded your code to try it out. When I click the button, the error message :Name: NSInvalidArgumentException Reason: Application tried to present modal view controller on itself. Presenting controller is <UIAlertController: 0x7fb648008a00>.
I found the reason for this problem: In the ShowError method of your ViewController.cs, you use the alert.PresentViewController() method, you need to change the alert of this line of code to "this.PresentViewController()".

iOS Swift how to debug SIGABRT :"fatal error: call of deleted method" from a CocoaPod?

I have an app which uses SlideMenuControllerSwift. I've modified some code to see how to present different panels, then rolled back my changes.
When running the project I get SIGABRT fatal error: call of deleted method in console when SlideMenuControllerSwift is initializing. No other error messages are given.
The project's source control appears to be in exactly the same state as before
changes.
I did a "clean"
Reinstalled pods.
Deleted pods directory and made a clean install
Deleted app from device and ran again
Did a fresh checkout into a different folder
Updated cocoapods gem
Even modified the function to use self.addLeftGestures()
How do I debug an issue caused by cocoa pod throwing "fatal error: call of deleted method"?
UPDATE: seems like something is seriously broken with the functions inside that pod, calling another function within init causes bad access exception:
In my case, I had created a project scheme that uses the release build configuration:
In this configuration, if your project build settings does not allow testability in this release mode then setting custom breakpoints or app crashes do not let you debug properly and you are served the fatal error: call of deleted method
Solution:
Check the project build settings for "testability".
Ensure it is "Yes" for the build configuration you are testing under.
In my case, I temporarily enabled testability for Release by making it Yes.
For anyone seeing this error using SwiftUI on XCode 11.4 and trying to access a property on an ObservableObject subclass eg.
class Model: ObservableObject {
#Published var name = ""
}
class ModelSub: Model {}
let model = ModelSub()
// This line causes `fatal error: call of deleted method` on XCode 11.4
$model.name
// Instead do
model._name.projectedValue
See more details here

'Could not instantiate class named NSLayoutConstraint' while auto layout is disabled

My application is crashing on iOS 5 when I call presentModalViewController on a new view with the error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
I know that this error should be fixed by unchecking auto layout, but it isn't. I unchecked it in all my nibs.
The very puzzling part is that using a view I created one month ago, there is no crash, but using one that I created today, it crashes.
Is there another setting that I should know about?
I'm using XCode 4.5.2, with SDK 6.0, and deployment target 5.0.
I guess you would have solved the problem by now.
But for others who would stumble into this post, please check this post: https://stackoverflow.com/a/13201690/942966

Error: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIApplication 0x6887a30> setValue:forUndefinedKey:]

The full error is: Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key.
So I have been trying what other people have been saying with similar problems. I have tried getting rid of every mention of landscapeView in the project, including the Connections in the FIle's Owner in the ViewController_iPhone.xib and then I started fresh by making outlets in the super class ViewController (since I want to use landscapeView and portraitView for iPad also) then I set up connections in ViewController_iPhone.xib and ViewController_iPad.xib to the UIView named Landscape in each respectively, and I still get this error.
I'm just starting out in app development so I'm trying to make a template for an app that is supportive of all orientations on both iPhone and iPad. Thanks for any help
EDIT: Here is a link to all my app delegate h and m and main.m : I am getting the Applications are expected to have a root view controller at the end of application launch error
EDIT 2: So I also tried to make landscapeView a property of ViewController and I made a setter method in ViewController.m but it still has the same problem.
I've found the most common place this error happens is when you instantiate a view from a xib from within a class that is not the xib's owner.
What I mean by this is you might be calling something similar to this:
[[NSBundle mainBundle] loadNibNamed:#"MyView" owner:self options:nil];
You're changing the owner, so you have to be sure that the class that self refers to has all the IBOutlet properties needed by "MyView". Usually this is done in Interface Builder, but in this case you're setting your owner programmatically, which means you can't make the connections in IB. When the IBOutlets aren't there, the app tries to make those connections and fails, giving the error you see.
My advice (without knowing any more info than you've given so far) is to check to see if you've made this call without having the proper IBOutlets.
I had to remove the NIB or XIB (or whatever they are this iteration) for the Main Interface.
It sure would be nice if Apple fully tested the broken software before unleashing it on the unsuspecting public. They could have handled the problem in any number of ways; but instead they chose a runtime crash and obscure [meaningless] error message.
Two main reason is follow
your iboutlet may break please check in storyboard or IB.
if you don't select module for custom class, see into your storyboard.
What I found is I deleted a WebView in viewcontroller.h , but haven't delete the xib file that point to this WebView !

Map View on Tab Bar project

I've got a tab-bar project in Xcode 4 and I'm trying to implement a map view on one of the tabs.
I've followed this tutorial: http://www.youtube.com/watch?v=ZrePrrHgXYA but I'm getting an error: Program received signal: "SIGBART" whenever I click the tab.
How come? Is it because the tutorial is only for view based projects? And if so, how do I get around it?
Error SIGBART can be shown when you don't import a Framework (like mapkit), o you try to use an object that has been released. Is a common error occurred when you badly connect (in IB o in code) with link pages or objects. You surely have done a big error in the code that prevent your app to run! Try to redo the last steps before the app stopped!

Resources