【发布时间】: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 中启用了它,但似乎没有任何效果。
【问题讨论】:
-
你是在真机上测试吗?