本文介绍了appStoreReceiptURL错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我不明白为什么它不进入if控件.有人知道向我解释吗?
I can't understand why it does not enter into the if control. Anyone knows explain to me?
- (void)verifyapp{
NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSLog(@"%@", receiptURL);
//CONTROLLO SE ESISTE
if ([[NSFileManager defaultManager] fileExistsAtPath:receiptURL.path]) {
}
}
推荐答案
仅当您从AppStore安装应用程序时,收据才存在.如果从XCode调试模式安装它,它将没有收据.要调试代码,您需要先从AppStore安装应用程序,启动它,然后从其上方的XCode安装应用程序.
Receipt only exist if you install app from the AppStore. If you install it from the XCode Debug mode, it will not have a receipt. To debug your code you need to install app from AppStore first, launch it and install app from XCode above it.
这篇关于appStoreReceiptURL错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!