在更新一些较旧的代码的过程中,并且在代码启动时,它在启动时立即崩溃。我使用的是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'
如果有人能帮助我,我会努力解决这一问题!