简体   繁体   English

如何在App Store项目中创建和测试

[英]How to create and test in app store items

I am using titanium to create my app, the problem that I am having is that I am not able to retrieve the products after creating them in itunes connect 我正在使用Titanium创建我的应用程序,我遇到的问题是在iTunes连接中创建产品后无法检索产品

InAppProducts.addEventListener('receivedProducts', function(e) {
    if (e.errorCode) {
        alert('Error: getProducts call failed! Message: ' + e.errorMessage);
    } else {
        Ti.API.info('getProducts succeeded!');

        productObjects = e.products;
        alert(productObjects);
        Ti.API.info('Product count: ' + productObjects.length);

    }

});

e.products returns 0. My application is not live on the app store,so I am unable to submit the product for review, how can I solve this? e.products返回0。我的应用程序不在应用商店中,因此我无法提交产品以供审核,我该如何解决?

There are a number of reasons your products might not get retrieved by your application: 有多种原因可能导致您的应用程序无法检索您的产品:

  • You are testing from a simulator. 您正在从模拟器进行测试。 In-app purchase testing will only work from an actual device. 应用内购买测试只能在实际设备上进行。

  • Your application is not signed with the proper credentials, that is the certificate and keys for your own app. 您的应用程序未使用适当的凭据(即您自己的应用程序的证书和密钥)签名。 It will fail if you try with sign it with a wildcard certificate. 如果尝试使用通配符证书签名,它将失败。 Be sure to use a "Development" Provisioning Profile and an "App ID" with "In-App Purchase" enabled. 确保使用启用了“应用程序内购买”的“开发”配置文件和“应用程序ID”。

  • You haven't setup properly the in-app purchase module. 您尚未正确设置应用内购买模块。 Environment, shared secret, receipt verification sandbox env,... 环境,共享机密,收据验证沙盒环境,...

  • You have not copied Apple's Root Certificate to the resources folder 您尚未将Apple的根证书复制到资源文件夹中

  • You have not logged out from your itunes account on your device. 您尚未从设备上的iTunes帐户注销。 You should log out and use the test account generated in itunesConnect. 您应该注销并使用itunesConnect中生成的测试帐户。 But don't log in on the settings app, do it when your app prompts for credentials. 但是,请不要登录设置应用程序,而是在应用程序提示输入凭据时执行此操作。

As for your code: if you are using ti.storekit module, there is no event called 'receivedProducts' for the storekit object, so that must a wrapper of your own. 至于您的代码:如果您使用的是ti.storekit模块,则该storekit对象没有名为'receivedProducts'事件,因此它必须是您自己的包装器。 If not, that might be your problem. 如果没有,那可能是您的问题。

For further information check https://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js 有关更多信息,请检查https://github.com/appcelerator-modules/ti.storekit/blob/master/ios/example/app.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在没有 App Store 应用的情况下在 iOS 上测试 Facebook App Invite - How to test Facebook App Invite on iOS without app on App Store 如何从应用商店中为应用购买其他应用内商品? - How to buy additional in-app items for an app from apps store? App Store Connect中的App Store信息项 - App Store Information items in App Store Connect 如何在 App-Store 沙盒 iOS 中测试应用内计费? - How to test in-app billing in App-Store Sandbox iOS? 如何让App Store审阅者使用Stripe测试应用程序? - How can I let App Store Reviewers test the App with Stripe? 在提交到应用商店之前,如何测试此应用功能的功能 - How to test Rate this app functionality before submitting to app store 如何使用已在 App Store 中的应用测试核心数据迁移? - How to Test Core Data Migration With an App Already in the App Store? 如何测试Flutter应用商店更新是否会删除应用数据 - How to test if Flutter app store update will delete app data 如何使用(items-> items-> detail)样式创建collectionView应用 - How to create collectionView app with (items->items->detail) style 如何测试生产的iOS App Store构建? - How can I test a production iOS App Store build?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM