在更新一些旧代码的过程中,当代码启动时,它会在启动时立即崩溃。我正在使用 XCode 10,以前这在 XCode 7/8 中可以正常工作
这条线在AppController.mm
[[MKStoreManager sharedManager] requestProductData];
那条线带你到
MKStoreManager.m
- (void) requestProductData
{
SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:
[NSSet setWithObjects: /*featureAllLevels, */ foodIAP, vanityIAP, dressIAP, iceIAP, allIAP, nil]]; // add any other product here
request.delegate = self;
[request start];
}
错误本身是
objc[680]: MKStoreManager object 0x281ecd020 overreleased while already deallocating; break on objc_overrelease_during_dealloc_error to debug
2019-09-19 12:15:18.342037+0100 PoolParty[680:66967] -[_UIBackgroundTaskInfo setStoreObserver:]: unrecognized selector sent to instance 0x281ecd020
2019-09-19 12:15:18.342502+0100 PoolParty[680:66967] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_UIBackgroundTaskInfo setStoreObserver:]: unrecognized selector sent to instance 0x281ecd020'
努力弄清楚这一点,如果有人可以提供帮助,我将不胜感激!