-2

I have a problem with Xcode 6 !!

I have a problem at run-time as follows:

Terminating app due to uncaught exception 'NSUnknownKeyException', 
reason: '[<productDetailsView 0x7c29fa60> setValue:forUndefinedKey:]: 
this class is not key value coding-compliant for the key description.' 

App crashes at start:

Class STinAppPurchaseMngr.m  ------> STinAppPurchaseMngr: inAppPurchaseManager 

//Called when app start

    -(void)initialize:(STAppDelegate*)delegate {
    [self requestProductsWithCompletionHandler:^(BOOL success, NSArray *products) {
        if (success) {
            initialized_ = YES;
        } else {
            STLog(@"<Error> Unable to retrieve in-app purchase product list");
        }

    }];
    self.MyAppDelegate = delegate;

    [[productDetailsView sharedInstance] setMyAppDelegate:self.MyAppDelegate];   //Here I have Thread 1: signal SIGABRT
}


//Class productDetailsView.m ————>productDetailsView : UIView

+(productDetailsView*) sharedInstance {

    static dispatch_once_t once;
    static productDetailsView * sharedInstance;
    dispatch_once(&once, ^{                           //Here I have Thread 1: signal SIGABRT
        sharedInstance = [[self alloc] init];     
    });
    return sharedInstance;
}

With Xcode 5 everything works perfectly! Anyone has a problem like this? How to solve it?

Thanks

Marcus Rickert
  • 4,138
  • 3
  • 24
  • 29
robz S
  • 25
  • 1
  • 7

1 Answers1

1

Does your productDetailsView actually define a property named description? If so, do you see compile warnings for it? (Xcode 6 seems to have made using description more of a problem than it used to be because of its use in NSObject.) If it exists and you change it and references to it to some other name, it should clear up the issue.

If you don't have a description property that's the problem because something (probably in a xib or storyboard) thinks you do.

Phillip Mills
  • 30,888
  • 4
  • 42
  • 57