-2
我有一個Xcode 6的問題!終止應用程序由於未捕獲的異常'NSUnknownKeyException'原因:'[<productDetailsView 0x7c29fa60> setValue:forUndefinedKey:]
我在運行時有問題如下:
Terminating app due to uncaught exception 'NSUnknownKeyException',
reason: '[<productDetailsView 0x7c29fa60> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key description.'
應用程序崩潰的開始:
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;
}
在Xcode 5一切完美!任何人都有這樣的問題? 如何解決它?
感謝
菲利普謝謝你!它被重新宣佈沒有隻讀屬性! – 2014-09-21 13:25:05