【问题标题】:Purchase failed because Purchasing was not initialized correctly采购失败,因为采购未正确初始化
【发布时间】:2019-06-16 06:14:51
【问题描述】:

在 Unity3D 中,我的应用内购买工作,在应用购买问题中显示测试环境。但是,当我将它上传到 xcode 并运行它时,它给了我一个错误。

我正在使用 IAP 按钮,即无代码版本。我已经输入了我的 Apple SKU、团队 ID 和 AppleStoreID 覆盖,但它仍然给我这个错误:

IAPButton.PurchaseProduct() with product ID: No Ads Subscription
UnityEngine.Purchasing.IAPButton:PurchaseProduct()
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction'1) 

UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()

(Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

Purchase failed because Purchasing was not initialized correctly
UnityEngine.Purchasing.CodelessIAPStoreListener:InitiatePurchase(String)
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()

(Filename: ./Runtime/Export/Debug.bindings.h Line: 45)

IAPButton.OnPurchaseFailed(Product , PurchaseFailureReason PurchasingUnavailable)
UnityEngine.Purchasing.IAPButton:OnPurchaseFailed(Product, PurchaseFailureReason)
UnityEngine.Purchasing.CodelessIAPStoreListener:InitiatePurchase(String)
UnityEngine.Events.UnityEvent:Invoke()
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)
UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()
UnityEngine.EventSystems.StandaloneInputModule:Process()

我已经在 Unity 中开启了 In App Purchasing,并在 Xcode 中启用了它,但似乎没有任何效果。

【问题讨论】:

  • 你是在真机上测试吗?

标签: c# ios xcode unity3d


【解决方案1】:

让您完成Apple 税务和银行协议(尤其是付费应用),它们必须有效

【讨论】:

    【解决方案2】:

    在我的情况下,它是捆绑标识符(包名称)确保您拥有与 Appstore 上完全相同的包。

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2022-06-14
    • 1970-01-01
    • 2020-06-10
    • 1970-01-01
    • 2014-08-20
    • 2016-03-14
    • 2019-11-02
    • 2011-12-25
    • 2016-10-15
    相关资源
    最近更新 更多