gpt4 book ai didi

ios - Gdx-Pay iOS商店,找不到产品信息

转载 作者:行者123 更新时间:2023-12-02 05:53:46 25 4
gpt4 key购买 nike

我已经使用Google App Store在Android上实现了gdx-pay的有效实施。我按照以下步骤进行操作:https://bitbucket.org/just4phil/gdxpayexample/src/

我现在正在尝试使其在iOS上运行,但是找不到有关该操作的任何文档。在上面链接的项目中,没有“ios应用商店”或对ios项目所做的任何更改。是否有人链接到使用ios的示例?

我尝试了一些东西,到此为止:

IOSResolver:

public class IOSResolver extends PlatformResolver {

public IOSResolver(MyGdxGame myGame) {
super(myGame);

PurchaseManagerConfig config = myGame.purchaseManagerConfig;
initializeIAP(null, myGame.purchaseObserver, config);
installIAP();
}

IOSLauncher:
@Override
protected IOSApplication createApplication() {
IOSApplicationConfiguration config = new IOSApplicationConfiguration();
config.orientationLandscape = false;
config.orientationPortrait = true;
config.useCompass = false;
config.useAccelerometer = false;
game = new MyGdxGame(new IOSPlatform());
return new IOSApplication(game, config);
}

@Override
public boolean didFinishLaunching(UIApplication application, UIApplicationLaunchOptions launchOptions) {
boolean finished = super.didFinishLaunching(application, launchOptions);
game.setPlatformResolver(new IOSResolver(game));
return finished;
}

核心:
// ---- IAP: define products ---------------------
purchaseManagerConfig = new PurchaseManagerConfig();
purchaseManagerConfig.addOffer(new Offer().setType(OfferType.ENTITLEMENT).setIdentifier(ios_productId));

这给了我错误:
[GdxPay/AppleIOS] Requesting product info for test.product.id
2017-02-20 16:58:58.089803 IOSLauncher[5611:2144625] [info] gdx-pay: calls purchasemanager.purchase()
[GdxPay/AppleIOS] Error purchasing product (wrong product info count returned: 0)!
com.badlogic.gdx.utils.GdxRuntimeException: java.lang.RuntimeException: Error purchasing product (wrong product info count returned: 0)!
at com.scene2d.space_camp.MyGdxGame$1.handlePurchaseError(MyGdxGame.java)
at com.badlogic.gdx.pay.ios.apple.PurchaseManageriOSApple$AppleProductsDelegatePurchase.didReceiveResponse(PurchaseManageriOSApple.java)
at com.badlogic.gdx.pay.ios.apple.PurchaseManageriOSApple$AppleProductsDelegatePurchase.$cb$productsRequest$didReceiveResponse$(PurchaseManageriOSApple.java)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
at com.scene2d.tut.IOSLauncher.main(IOSLauncher.java)
Caused by: java.lang.RuntimeException: Error purchasing product (wrong product info count returned: 0)!
... 5 more

我在iTunes Connect上注册了该应用程序并设置了产品。但是我没有发布二进制文件,我需要测试IAP吗?它在iTunes Connect中显示此消息:

Your first In-App Purchase must be submitted with a new app version. Select it from the app’s In-App Purchases section and click Submit.

Once your binary has been uploaded and your first In-App Purchase has been submitted for review, additional In-App Purchases can be submitted using the table below.



不上传实际应用程序就无法进行测试吗?

最佳答案

我遇到了同样的问题,并且看到了同样的错误消息。

我认为,使您的IAP发挥作用的两个关键是:

  • 使用真实的设备进行测试,而不是模拟的设备。
  • 使用沙箱帐户登录,而不是真实帐户。

  • 在itunesconnect上创建您的沙箱帐户。
    生成您的应用程序,然后使用xcode将其安装到ipad / iphone上。
    在您的设备上,进入设置并注销。这个很重要。
    运行您的应用并进行购买。系统将提示您登录。使用您的沙盒帐户。

    我做到了,它奏效了。

    关于ios - Gdx-Pay iOS商店,找不到产品信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42375710/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com