I created a sport with Cocos Creator 3.6.1, and I attempted to assist IAP of Home windows Retailer. I used the next code to launch IAP, however acquired error”Couldn’t create a brand new view as a result of the principle window has not but been created”:
Home windows::ApplicationModel::Core::CoreApplication::MainView->CoreWindow->Dispatcher->RunAsync(Home windows::UI::Core::CoreDispatcherPriority::Regular, ref new Home windows::UI::Core::DispatchedHandler([=]() {
create_task(CurrentApp::RequestProductPurchaseAsync(storeID)).then([=]
(PurchaseResults^ outcome)
{
this->OnPurchaseOperationDone(outcome, storeID, orderID);
return S_OK;
});
}));