-2

Xcode 6に問題があります!!

実行時に次のような問題があります。

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 ————&gt;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 では、すべてが完璧に動作します。誰でもこのような問題を抱えていますか?それを解決する方法は?

ありがとう

4

1 に答える 1

1

productDetailsViewという名前のプロパティを実際に定義していますdescriptionか? もしそうなら、それに対するコンパイル警告が表示されますか? (Xcode 6 での使用descriptionにより、以前よりも多くの問題が発生したようですNSObject。) それが存在し、それを変更して別の名前に参照する場合、問題は解決するはずです。

何か(おそらくxibまたはストーリーボード内)があなたがそうしていると考えているため、問題説明プロパティがない場合。

于 2014-09-20T21:59:01.960 に答える