{"id":4406,"date":"2014-03-30T10:39:54","date_gmt":"2014-03-30T10:39:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ib-connections-in-xcode-crashing-collection-of-common-programming-errors\/"},"modified":"2014-03-30T10:39:54","modified_gmt":"2014-03-30T10:39:54","slug":"ib-connections-in-xcode-crashing-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/ib-connections-in-xcode-crashing-collection-of-common-programming-errors\/","title":{"rendered":"IB Connections in Xcode crashing-Collection of common programming errors"},"content":{"rendered":"<p>I was working on my iOS app last night when I went to test it and it crashed on startup. I wasn&#8217;t even working on the nib that is causing the crash. Anyways, here is the error code:<\/p>\n<pre><code>2\/29\/12 10:32:05.291 AM Safe Flight: *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Airport1.'\n*** First throw call stack:\n(0x2873052 0x33add0a 0x2872f11 0x1ae2032 0x1a53f7b 0x1a53eeb 0x1a6ed60 0x136191a 0x2874e1a 0x27de821 0x136046e 0x1362010 0x114214a 0x1142461 0x11417c0 0x1150743 0x11511f8 0x1144aa9 0x37b7fa9 0x28471c5 0x27ac022 0x27aa90a 0x27a9db4 0x27a9ccb 0x11412a7 0x1142a9b 0x3710 0x2f35)\n<\/code><\/pre>\n<p>Airport1 is just a label with an IBOutlet <strong>correctly<\/strong> connected to it. Also, if I delete the connection the error just is with the next item that has an connection.<\/p>\n<p>Also, my FileOwners class it correctly set to the appropriate viewController.<\/p>\n<pre><code>\/\/  MasterViewController.h\n\n#import \n#import \"MobclixAds.h\"\n\n@class DataViewController;\n@class EditViewController;\n@class SearchViewController;\n\n\n\n@interface MasterViewController : UIViewController{\n\n    UILabel *Airport1;\n    UILabel *Airport2;\n    UILabel *Airport3;\n    UILabel *Airport4;\n    UILabel *Airport5;\n    UILabel *Airport6;\n    UILabel *Airport7;\n    UILabel *Airport8;\n    UILabel *Airport9;\n    UIButton *Airport1B;\n    UIButton *Airport2B;\n    UIButton *Airport3B;\n    UIButton *Airport4B;\n    UIButton *Airport5B;\n    UIButton *Airport6B;\n    UIButton *Airport7B;\n    UIButton *Airport8B;\n    UIButton *Airport9B;\n\n    MobclixAdView* adView;\n}\n\n@property (strong, nonatomic) DataViewController *dataViewController;\n@property (strong, nonatomic) EditViewController *editViewController;\n@property (strong, nonatomic) SearchViewController *searchViewController;\n\n\n@property (nonatomic, retain) IBOutlet UILabel *Airport1;\n@property (nonatomic, retain) IBOutlet UILabel *Airport2;\n@property (nonatomic, retain) IBOutlet UILabel *Airport3;\n@property (nonatomic, retain) IBOutlet UILabel *Airport4;\n@property (nonatomic, retain) IBOutlet UILabel *Airport5;\n@property (nonatomic, retain) IBOutlet UILabel *Airport6;\n@property (nonatomic, retain) IBOutlet UILabel *Airport7;\n@property (nonatomic, retain) IBOutlet UILabel *Airport8;\n@property (nonatomic, retain) IBOutlet UILabel *Airport9;\n@property (nonatomic, retain) IBOutlet UIButton *Airport1B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport2B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport3B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport4B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport5B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport6B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport7B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport8B;\n@property (nonatomic, retain) IBOutlet UIButton *Airport9B;\n\n@property(nonatomic,retain) IBOutlet MobclixAdView* adView;\n\n\n@end\n<\/code><\/pre>\n<p>and<\/p>\n<pre><code>\/\/ MasterViewController.m\n\n\n#import \"MasterViewController.h\"\n\n#import \"DataViewController.h\"\n#import \"EditViewController.h\"\n#import \"SearchViewController.h\"\n\n\n\n@implementation MasterViewController\n\n@synthesize dataViewController = _dataViewController;\n@synthesize editViewController = _editViewController;\n@synthesize searchViewController = _searchViewController;\n\n\n\n@synthesize Airport1, Airport2, Airport3, Airport4, Airport5, Airport6, Airport7, Airport8, Airport9;\n@synthesize Airport1B, Airport2B, Airport3B, Airport4B, Airport5B, Airport6B, Airport7B, Airport8B, Airport9B;\n@synthesize adView;\n\n\n- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil\n{\n\n    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];\n    if (self) {\n        self.title = @\"Safe Flight\";\n        self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@\"Back\" style:UIBarButtonItemStylePlain target:nil action:nil];\n    }\n    return self;\n}\n<\/code><\/pre>\n<p>So is my problem with my code? or with Xcode itself?? I have restarted Xcode and the simulator and even did a &#8220;clean&#8221; build (it sounded like it would help&#8230;)<\/p>\n<p>Thanks, Andrew<\/p>\n<p><strong>EDIT<\/strong> This is my AppDelegate and I&#8217;m setting the correct xib to the window<\/p>\n<pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    [Mobclix start];\n    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];\n    \/\/ Override point for customization after application launch.\n\n    MasterViewController *masterViewController = [[MasterViewController alloc] initWithNibName:@\"MasterViewController\" bundle:nil];\n    self.navigationController = [[UINavigationController alloc] initWithRootViewController:masterViewController];\n    self.window.rootViewController = self.navigationController;\n    [self.window makeKeyAndVisible];\n    return YES;\n\n}\n<\/code><\/pre>\n<p>PROBLEM SOLVED!!!<\/p>\n<p>I can&#8217;t answer my own question because of some stupid spam filter&#8230; and I can post a picture of the problem&#8230; but its fixed!<\/p>\n<p>but here is a link to the problem click here<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was working on my iOS app last night when I went to test it and it crashed on startup. I wasn&#8217;t even working on the nib that is causing the crash. Anyways, here is the error code: 2\/29\/12 10:32:05.291 AM Safe Flight: *** Terminating app due to uncaught exception &#8216;NSUnknownKeyException&#8217;, reason: &#8216;[ setValue:forUndefinedKey:]: this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4406","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4406"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4406\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}