天道酬勤,学无止境

NSUbiquitousKeyValueStore and In-App-Purchase

today I just opened my 1,5 month old project and wanted to add a new In-App-Purchase to the app, so I added all the information to iTunesConnect, didn't change anything for the existing ones. When I now run the app ALL of the purchases won't work, I'm using MKStoreKit but the SKRequest also doesn't throw any errors. In addition I'm getting the following logged in console without adding iCloud support:

NSUbiquitousKeyValueStore error: com.mycompany.myapp has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement

Any suggestions what is going on and/or what I could have broken?

评论

I'm getting the same error.

According to this nice blog: http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/, step 7 to be specific, it might take time for Apple to put your new IAP in their sandbox server. So just take a break and come back after a few hours, :)

受限制的 HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。

相关推荐
  • 非续订订阅:已从收据中删除?(Non-renewing Subscriptions: Removed From Receipt?)
    问题 我正在为我的应用程序(即将发布)实施应用程序内购买,并为iOS6和iOS7提供支持。 我的问题与iOS6和iOS7的非续订订阅机制之间的差异有关,更具体而言,与还原的实现方式有关。 为了同时适应iOS6和iOS7,我已经实现了服务器端解决方案以启用还原。 我可以选择允许用户创建一个用户名/密码,该用户名/密码可以在其他设备(或丢失数据的同一设备)上使用以进行还原。 我的大部分工作基本上都可以进行,但是随着测试的进行,我发现了一些奇怪的东西。 我的iOS7还原过程的初始部分使用SKReceiptRefreshRequest刷新应用程序中的收据。 当我从iOS7设备上删除该应用程序后,重新安装(此时没有收据;已使用iExplorer进行了测试),然后进行还原,SKReceiptRefreshRequest会还原10次购买(我在测试过程中为该特定用户创建的) 。 其中之一是不可消费的,其中九张收据是非续签的。 这使我感到困惑。 从Apple文档中,我预计在刷新的收据中只会看到非消耗性的购买。 从https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateLocally.html: “消费品和非续订订阅
  • NSUbiquitousKeyValueStore 同步问题(NSUbiquitousKeyValueStore sync issues)
    问题 我在使用 NSUbiquitousKeyValueStore 并让它在两个设备之间可靠地同步时遇到了麻烦。 它开始让我发疯。 疯狂的。 我看着我的代码调用: [[NSUbiquitousKeyValueStore defaultStore] setObject:_someData forKey:@"SomeData"]; [[NSUbiquitousKeyValueStore defaultStore] synchronize]; 但更多时候,数据永远不会显示在其他设备上。 我看到它在几秒钟内同步,其他时候我等了一个小时却从未看到同步。 我将设备插入 xcode 并开始调试,有时数据会突然弹出,有时则不会。 有时确实如此。 拨打此电话后,退出并重新启动应用程序,如果我阅读它,我会看到旧数据,而不是我刚刚发布的新数据。 在同一台设备上。 当应用程序启动时,我打电话给: _someData = [[NSUbiquitousKeyValueStore defaultStore] stringForKey:@"SomeData"]; 我假设没有需要运行的初始化代码。 我发现没有任何例子可以。 当它工作时,它工作得很好。 然后今晚我正在查看设备日志,并在我上次退出(并尝试发送数据)后立即发现了这一点: Jul 8 21:32:03 unknown syncdefaultsd[17296
  • 仅使用NSUbiquitousKeyValueStore时,如何以编程方式检测是否在用户设备上启用了iCloud?(How to programmatically detect if the iCloud is enabled on user's device when only use NSUbiquitousKeyValueStore?)
    问题 我正在使用NSUbiquitousKeyValueStore将一些首选项数据同步到iCloud。 我发现如果用户在“设置应用程序”中禁用iCloud的“文档和数据”项,则NSUbiquitousKeyValueStore无法将其数据同步到iCloud。 因此,我想首先检查此设置是否已打开。 我找到了以下代码片段: NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; NSLog(@"url=%@",ubiq); if (!ubiq) { UIAlertView *av = [[UIAlertView alloc] initWithTitle:nil message:@"Please enable iCloud in Setting app" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [av show]; return; } 我想知道的是,即使我只是使用NSUbiquitousKeyValueStore (而不是iCloud文档存储),这也是检测的唯一方法。 有更好的选择吗? 回答1 基本上,即使用户没有iCloud帐户,
  • 依靠 NSUbiquitousKeyValueStore 存储基本数据是否安全?(Is it safe to rely on NSUbiquitousKeyValueStore for storing essential data?)
    问题 我了解到NSUbiquitousKeyValueStore始终可用, NSUbiquitousKeyValueStore没有设置 iCloud 帐户也是如此。 这让我相信我可以安全地将基本数据存储在其中,而无需在NSUserDefaults保留副本。 但是,在他们的文档中,Apple 表示如下: 避免将此类用于离线时对您的应用程序行为至关重要的数据; 相反,将此类数据直接存储到本地用户默认数据库中。 我是否忽略了不使用NSUserDefaults (或其他离线商店)作为备份时可能出现的问题? 或者苹果是否过度保护,依赖NSUbiquitousKeyValueStore是否安全? 回答1 Julien 对这个问题发表了以下评论: 这意味着您不应该依赖该商店作为您的本地真实情况,而应更多地依赖于设备之间的简单同步通信渠道。
  • NSUbiquitousKeyValueStore sync issues
    I'm having nothing but trouble with NSUbiquitousKeyValueStore and getting it to reliably sync across two devices. It's starting to drive me mad. Mad. I watch my code make a call to: [[NSUbiquitousKeyValueStore defaultStore] setObject:_someData forKey:@"SomeData"]; [[NSUbiquitousKeyValueStore defaultStore] synchronize]; But more times than not, the data never shows up on the other device. I've seen it sync within a few seconds and other times I've waited for an hour and never seen a sync. I plug the devices into xcode and start debugging and sometimes the data suddenly pops up and other times
  • How to use NSUbiquitousKeyValueStore and NSUserDefaults together
    Documentation is not clear on how to use NSUbiquitousKeyValueStore with edge cases. If I want to set a value, I understand that I should set a value to both NSUserDefaults and NSUbiquitousKeyValueStore since iCloud could be disabled. However in my tests [NSUbiquitousKeyValueStore defaultStore] return a valid object even if iCloud is disabled (tested on Mac OS). Also, to my understanding is that if iCloud is enabled, NSUbiquitousKeyValueStore's values are stored to disk (and available offline). What are the reason to use NSUserDefaults if you are sure that you have less than 64KB of data?
  • Is it safe to rely on NSUbiquitousKeyValueStore for storing essential data?
    I learned that NSUbiquitousKeyValueStore is always available, also when no iCloud account is set up. This makes me believe I can safely store essential data in it, without keeping a copy in NSUserDefaults. However, in their documentation, Apple says the following: Avoid using this class for data that is essential to your app’s behavior when offline; instead, store such data directly into the local user defaults database. Do I overlook issues that might arise when not using NSUserDefaults (or another offline store) as back-up? Or is Apple being overprotective and is it safe to rely on
  • NSUbiquitousKeyValueStore error: no valid com.apple.developer.ubiquity-kvstore-identifier entitlement
    I'm having a problem integrating iCloud with my app. When I set test out iCloud availability, I receive Success for the function NSURL *iCloudURL = [fileManager URLForUbiquityContainerIdentifier:@"AppID"]; but right after this, when I attempt to perform: NSUbiquitousKeyValueStore *iCloudStore = [NSUbiquitousKeyValueStore defaultStore]; I receive the error NSUbiquitousKeyValueStore error: no valid com.apple.developer.ubiquity-kvstore-identifier entitlement. Any ideas on how to fix this? My App.Entitlements file is using the default macro'd prefixes, nothing changed from the auto-generated file
  • How to programmatically detect if the iCloud is enabled on user's device when only use NSUbiquitousKeyValueStore?
    I am using NSUbiquitousKeyValueStore to sync some preference data to iCloud. I found that if the user disable "Document & Data" item of iCloud in "Setting App", NSUbiquitousKeyValueStore can not synchronize its data to iCloud. So, I want to first check if this setting is switched on. I found this Code snippet: NSURL *ubiq = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil]; NSLog(@"url=%@",ubiq); if (!ubiq) { UIAlertView *av = [[UIAlertView alloc] initWithTitle:nil message:@"Please enable iCloud in Setting app" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil
  • Key data not storing to iCloud with NSUbiquitousKeyValueStore.defaultStore
    So I have a simple goal, just to get this working. So theoretically if you ruined this. Triggered save players waited a bit Deleted the app Rebuilt (downloaded) Triggered restore then the word "MEDO" would print to the console But instead it is null, making me pretty sure that it is not saving to iC cloud some reason. I followed this tutorial. Perhaps it is too outdated to work? func c_restoreCharecters() { let icloud = NSUbiquitousKeyValueStore.defaultStore() println(icloud.objectForKey("username")) } func c_savePlayers() { let icloud = NSUbiquitousKeyValueStore.defaultStore() icloud
  • iCloud 键值存储同步问题(未调用 NSUbiquitousKeyValueStoreDidChangeExternallyNotification)(iCloud Key-Value-Store Synchronization issues (NSUbiquitousKeyValueStoreDidChangeExternallyNotification not called))
    问题 我正在为 iOS 编写一个小型通用游戏。 高分将通过 iCloud 键/值存储跨设备同步。 获取最新分数: func retrieveHighestScore() -> Int64 { let iCloudScore: Int64 = NSUbiquitousKeyValueStore.defaultStore().longLongForKey(KeyValueKeyClassification.KeyHighscore.toRaw()) let localScore: Int64 = Int64(NSUserDefaults.standardUserDefaults().integerForKey(KeyValueKeyClassification.KeyHighscore.toRaw())) var result: Int64 = 0 if localScore > iCloudScore { storeNewHighscore(localScore) result = localScore } else { storeNewHighscore(iCloudScore) result = iCloudScore } return result } 存储新的高分 func storeNewHighscore(newScore: Int64) {
  • iCloud Key-Value-Store Synchronization issues (NSUbiquitousKeyValueStoreDidChangeExternallyNotification not called)
    i am writing a small universal game for iOS. the highscore will be synched accross devices through an iCloud Key/Value store. getting the newest score: func retrieveHighestScore() -> Int64 { let iCloudScore: Int64 = NSUbiquitousKeyValueStore.defaultStore().longLongForKey(KeyValueKeyClassification.KeyHighscore.toRaw()) let localScore: Int64 = Int64(NSUserDefaults.standardUserDefaults().integerForKey(KeyValueKeyClassification.KeyHighscore.toRaw())) var result: Int64 = 0 if localScore > iCloudScore { storeNewHighscore(localScore) result = localScore } else { storeNewHighscore(iCloudScore) result
  • ios how can I deselect game center and in-app-purchase when I try to register my app
    I'm trying to register my app in the apple developer portal but there you can select the services your app is going to be using. by my problem is I'm not going to be using:"game center" or "in-app-purchase". How can I deselect those? I'll really appreciate your help.
  • How can I dd in-app-purchase functionality to my flutter app?
    I am going to add in-app-purchase functionality to my flutter app, but could not find any relevant information or sample app about in-app-purchases, can anyone share any links or example apps that contain in-app-purchase functionality? Thank you
  • Android Market In-App-Purchase: How to get the currency a user will pay in?
    I have an Android app using In-App-Purchase that caters to an international audience, so I expect payments in different currencies. Of course I would like to show the items for purchase with the user's local currency, but I don't really know how. Using the region or language of a user seems like a bad indicator, as the currency seems to depend on the region of the Market account the user is using and not on the device settings. How can I find out which currency a user will pay in? Thanks.
  • 当我尝试注册我的应用程序时,ios如何取消选择游戏中心和应用程序内购买(ios how can I deselect game center and in-app-purchase when I try to register my app)
    问题 我正在尝试在苹果开发者门户中注册我的应用程序,但您可以在那里选择您的应用程序将使用的服务。 我的问题是我不会使用:“游戏中心”或“应用内购买”。 我怎样才能取消选择那些? 我会非常感谢你的帮助。 回答1 使用Wildcard App ID 如Registering an App ID页面所示: 应用 ID 后缀显式应用程序 ID 如果您计划合并应用程序服务,例如游戏中心、应用程序内购买、数据保护和 iCloud,或者想要单个应用程序独有的配置文件,您必须为您的应用程序注册一个明确的应用程序 ID。 要创建显式 App ID,请在 Bundle ID 字段中输入唯一字符串。 此字符串应与您的应用程序的捆绑 ID 匹配。 通配符应用程序 ID 这允许您使用单个 App ID 来匹配多个应用程序。 要创建通配符 App ID,请在 Bundle ID 字段中输入星号 (*) 作为最后一位数字。 回答2 我找到了一种禁用 Game Center 和应用内购买的方法,但不确定其影响,也不确定这会起作用多长时间。 因此,请自行承担使用它的风险。 基本上输入一个无效的包标识符,如果您有其他标识符(或类似 com.test.test),您可以使用它并单击继续。 这会刷新显示错误的页面,但现在也允许取消选中 Game Center 和应用内购买。 回答3 您必须先“启用限制”,然后才能使用它们
  • Android In-App-Purchase,如何检查用户是否购买了一件商品(Android In-App-Purchase, how to check if user have purchased one item)
    问题 在 SharedPreference 中设置一个值来标记用户已购买此项目是否可以且安全? 如果用户在 SharedPreference 中修改此值会怎样。 或者我每次都需要连接 IAP 服务来检查,然后用户才能使用它? (1) 使用 Google Android IAP V3 时的最佳实践是什么? (2) 而且如果用户的设备没有安装 Google Play,我可能想使用贝宝付款,但是如果我要求用户使用简单的贝宝付款来获得许可证,如何跟踪购买并为用户解锁功能钥匙? 我不想使用任何其他计费 SDK,如果使用 Paypal 网页购买许可证,如何实现? 回答1 (1) 使用 Google Android IAP V3 时的最佳实践是什么? --> 官方文档说只有支付交易会由google play自己处理,但是在应用程序中你必须设置你的业务逻辑如何处理产品购买后的UI集成和其他事情。 您还可以使用应用内购买 v3。 (2) 而且如果用户的设备没有安装 Google Play,我可能想使用贝宝付款,但是如果我要求用户使用简单的贝宝付款来获得许可证,如何跟踪购买并为用户解锁功能钥匙? 我不想使用任何其他计费 SDK,如果使用 Paypal 网页购买许可证,如何实现? --> 您可以要求用户动态更新 google play 版本。 Google 开发人员文档说 90% 以上的设备使用 2.2
  • Android In-App-Purchase, how to check if user have purchased one item
    is that OK and safe to set a value in SharedPreference to flag that the user have purchased this item? What if user hack this value in SharedPreference. Or I need to connect IAP service everytime to check that before user can use it? (1) What is the best practice when I use Google Android IAP V3? (2) And also if user's device have no Google Play installed, I may want to use paypal to make the payment, but how to track the purchase and unlock the features for users if I ask user to use simple paypal payment to get a license key? I do not want to use any other billing SDK, if with Paypal web
  • Alternative in-app-purchase methods for Android
    I want to use an alternative way for in-app purchases in my Android application such as Fortumo or PayPal libraries. Don't they violate Android Developers Terms of Services? Or will it cause the suspending of my developer account? Can I also sell electronic currencies in my application using Android native In-App-Purchase?
  • New In-App-Purchase are not displayed in the iTunes app product page
    My app provides IAP for our users and We already have one product then, which is listed on the "Top In-App purchases" section in iTunes product page. I submitted the latest version which have two new products. The build successfully went live (almost 2 weeks back) and I was able to purchase the new two products as well. Also the iTunes metrics show the purchase of new products from the users. But it is not displayed under "Top In-App purchases". Only the first IAP is listed under that section. iTunes purchase reports says that my first product has 5 times sales than the new two. Is that the