-
I am working on adding some In App Purchases to my WinAppSDK app and have be encountering error. I'm sure they are related to Since I will probably encounter similar problems with other UWP APIs, what is the best practice for calling these APIs? StoreProduct.RequestPurchaseAsync Here is my failed implementation of using the above API: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I haven't used the API, but since you are using WinUI 3 I bet you need to do the same thing desktop bridge app has to do with this API according to this doc. I reached this doc by looking at the exception section in the doc you linked. If this fixes your issue, the reason why this is needed is that, essentially, the modal normally assumes it's in a UWP app and thus in a core window and can show the modal there. A WinUI 3 app has its own window and thus you need to tell the modal that it should display inside that WinUI 3 window instead. |
Beta Was this translation helpful? Give feedback.
I haven't used the API, but since you are using WinUI 3 I bet you need to do the same thing desktop bridge app has to do with this API according to this doc. I reached this doc by looking at the exception section in the doc you linked.
If this fixes your issue, the reason why this is needed is that, essentially, the modal normally assumes it's in a UWP app and thus in a core window and can show the modal there. A WinUI 3 app has its own window and thus you need to tell the modal that it should display inside that WinUI 3 window instead.