购买失败,因为购买未正确初始化

时间:2019-01-22 17:58:23

标签: c# ios xcode unity3d

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

我正在使用IAP Button(无代码版本)。我已经输入了我的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中启用了它,但是似乎没有任何作用。

1 个答案:

答案 0 :(得分:0)

让您完成 Apple Tax and Banking Agreement (Apple税收和银行协议)(特别是付费应用程序),它们必须是有效

enter image description here