Unity IAP does not work on UWP platform

Hi,

Steps to reproduce:

  • Select UWP platform and build the game
  • Test locally with mocking UWP store (works fine)
  • Upload app bundle to Windows Store
  • Make it available but hidden - follow the guide
  • Add IAP in the Windows Store - follow the guide
  • Download game and test IAP
  • IAP does not work

Here is the error in Unity.log

Unity Purchasing: UnityIAPWin8:PollForProducts() Exception (persistent = True, delay = 0, retry = 30), exception: Exception of type 'System.Exception' was thrown.
UnityEngine.Logger:LogError(String, Object)
UnityEngine.Purchasing.WinRTStore:logError(String)
UnityEngine.Purchasing.Default.<PollForProducts>d__10:MoveNext()
System.AsyncCallback:Invoke(IAsyncResult)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.AsyncCallback:Invoke(IAsyncResult)
System.Threading.Tasks.AwaitTaskContinuation:RunCallback(ContextCallback, Object, Task&)
System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation:Run(Task, Boolean)
System.Threading.Tasks.Task:FinishContinuations()
System.Threading.Tasks.Task:Finish(Boolean)
System.Threading.Tasks.Task`1:TrySetException(Object)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetException(Exception)
UnityEngine.Purchasing.Default.<DoRetrieveProducts>d__11:MoveNext()
System.AsyncCallback:Invoke(IAsyncResult)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Runtime.CompilerServices.MoveNextRunner:Run()
System.Action:Invoke()
System.AsyncCallback:Invoke(IAsyncResult)
System.Threading.OSSpecificSynchronizationContext:InvocationEntry(IntPtr)

What version of IAP are you using? Please see Unity IAP package 4.12.2 is now available page-2#post-6918326

Unity 2020.3.6f1
Unity IAP 3.1.0

@JeffDUnity3D any ideas or suggestions on how to fix this?

I am checking with the team here on current status on UWP. The core engineer working on this feature is out of the office this week, so replies may be delayed.

OK, thanks.

Unity IAP is not working on UWP, this problem has been over two years. Suggest you roll back to Unity 2017. Since Unity 2018, the bugs cause you unable to read the online IAP item, so Unity IAP is unable to use on UWP anymore.

1 Like

Hi @Oscar-Tsang , thank you for your reply, but for me, it’s not an option, currently I’m using Unity 2020 and it’s impossible to roll back.

Also, I want to hear the Unity team statement on this matter. @JeffDUnity3D any news?

Same error message with 3.2.1 , downgraded back to 2.2.2 . It has been working fine for me.

UWP works with 2.2.2 for you? We are still investigating.

il2cpp in-app purchasing package 2.2.2 and in-app version 2.2.7 combo is working for me.
Most of the time, I get time to time feedback about in-app purchase problems but can be Microsoft Store bugs too :slight_smile:

with mono builds the latest working was 1.20 , 1.23 did not build. I did test some 2.x version and those did not build either with mono.

Support for Microsoft Store subscriptions would be nice someday, not too hard to implement I would guess (I know you have limited resources :)))

1 Like

Does Unity IAP work for UWP?

It does, I’ve two games on the MS store that appear to still work.

However, there are limitations.

No support for subscriptions (if I recall) and it only supports public audiences, not private.

There might be other limitations, but I’m not aware of them.

Unity have hinted at changes on the IAP\UWP front, but haven’t clarified what they are. It could be dropping support for it or improving (as it’s using an old Windows API and hasn’t been updated in a long time)

1 Like