我收到这个错误的坚果。请有一个确切的看看错误信息!它是“SS ErrorDomain”NOT“SK ...”结合代码= 0。到目前为止,我无法在网络上的任何地方找到任何同样的问题。人们似乎有SS ErrorDomain代码= 或SK ErrorDomain代码= 。到目前为止,我的组合没有描述,也没有任何帮助。错误域= SSErrorDomain代码= 0“无法连接到iTunes Store”
好的,这是我的尝试:应用程序工作正常,没有在应用程序自1月1日以来,它是在商店可用。现在我已经添加了应用内购买到我的应用程序。我尝试测试它们,但我得到的只是上面的错误。它甚至不会试图问我一个测试用户或任何东西。
我绝对相信,我退出了商店,在一个真正的设备上工作,并做了所有其他测试(很多次),我可以在网上找到。没有!仍然“无法连接...”
我已检查此处描述的所有内容Ray Wenderlichs In-App Tutorial。我甚至用他的教程从头创建了一个新的应用程序。同样的问题。等了几天也没有帮助。
我已经完成了这里描述的东西Cannot connect to iTunes in Baker Factory。你可以猜出结果。
这是一些代码。只要这就是所谓的viewDidLoad()
开始:
internal class InApp : NSObject, SKProductsRequestDelegate, SKPaymentTransactionObserver {
private var request: SKProductsRequest!
// Start communication with Apple Store to retrieve list of available products
internal func start() {
if let url = NSBundle.mainBundle().URLForResource("InAppProducts", withExtension: "plist") {
if let productIds = NSArray(contentsOfURL: url) {
NSLog("InApp: Product-Id \(productIds)")
SKPaymentQueue.defaultQueue().addTransactionObserver(self)
request = SKProductsRequest(productIdentifiers: Set(arrayLiteral: productIds))
request.delegate = self
request.start()
NSLog("InApp: request started")
}
}
}
日志打印出两款产品的ID,从plist中读取正确。日志还显示“请求已启动”。之后,它直接调用错误例程:
internal func request(request: SKRequest!, didFailWithError error: NSError!) {
NSLog("ERROR: decription: \(error!.description), reason: \(error!.localizedFailureReason), options: \(error!.localizedRecoveryOptions), suggestion: \(error!.localizedRecoverySuggestion)")
}
我正在使用Xcode 6.3和iOS 6的iOS 6。 GameCenter iAdBanner和所有其他功能完美工作。
任何任何建议,我可以看看,我能做什么,是高度欢迎!