How to Monetize Desktop Bridge App with Windows Store

1. Enable UWP API support in Converted App:

a. If the payment project is above .NET 4.6.1:

Announcing “UWPDesktop” NuGet Package Version 14393

  1. b. If the payment project is lower than .NET 4.6.1, or C++, or VB, create a UWP Wrapper, and call interop functions created in the UWP Wrapper. Refer to:

https://github.com/Microsoft/DesktopBridgeToUWP-Samples/tree/master/Samples/VB6withXaml/UWPWrappers

2. Call UWP API to implement the monetize logic in the payment project:

References:

https://docs.microsoft.com/zh-cn/windows/uwp/monetize/in-app-purchases-and-trials

使用桌面桥的 Windows 桌面应用程序必须执行额外步骤来配置 StoreContext 对象,然后才可以使用此对象。 有关详情,请参阅本部分

来自 <https://docs.microsoft.com/zh-cn/windows/uwp/monetize/in-app-purchases-and-trials>

Sample code:

https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Store

Thanks,

Freist

(48)

How to correct Publisher ID and package the converted app

Install Win 10 SDK if you don’t have:

Latest version:

https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk

Anniversary version: 

10.01.14393.033

In the AppxManifest.xml file of your converted application you will find an entry similar to the following one:

<Identity Name=”myApp”

    ProcessorArchitecture=”x64″

    Publisher=”CN=test.com

Version=”0.6.1.0″ />

The value of the Publisher attribute should match the publisher id (CN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx) of the Store account of your dev center:, for example.

clip_image001

After modifying the appxmanifest.xml, please use the makeappx.exe to package the application again:

C:\Program Files (x86)\Windows Kits\10\bin\x86>makeappx pack /d “C:\myapp\PackageFiles” /p c:\Output\myapp.appx

Thanks,

Freist

(52)

How to check if Centennial App is ready

Install latest Win 10 SDK if you don’t have (till 2017 April, its version is 15063), Windows 10 should be the matched version:

https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk

Run command:

C:\Program Files (x86)\Windows Kits\10\App Certification Kit>appcert test -appxpackagepath C:\Projects\app.appx -reportoutputpath C:\Output\MyReport.xml

The MyReport.xml contains test result and you can follow it to fix known issues. Digitally signed file test, File association verbs, Debug configuration test are optional.

For more details, refer to:

https://docs.microsoft.com/en-us/windows/uwp/debug-test-perf/windows-desktop-bridge-app-tests

Thanks,

Freist

(24)

How to create certificate, sign APPX package and install certificate on Win 10

Install Win 10 SDK if you don’t have:

Latest version:

https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk

Anniversary version: 

10.01.14393.033

1. Create Certificate:

C:\Program Files (x86)\Windows Kits\10\bin\x86>MakeCert.exe -r -h 0 -n “CN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” -eku 1.3.6.1.5.5.7.3.3 -pe -sv c:\output\my.pvk c:\output\my.cer

C:\Program Files (x86)\Windows Kits\10\bin\x86>pvk2pfx.exe -pvk c:\output\my.pvk -spc c:\output\my.cer -pfx c:\output\my.pfx

2. Sign certificate on APPX:

C:\Program Files (x86)\Windows Kits\10\bin\x86>signtool.exe sign -a -f C:\Output\my.pfx -fd SHA256 -v C:\app\app.appx

3. Double click my.cer, install Certificate to local trusted root:

clip_image001clip_image002 clip_image003

clip_image004

Thanks,

Freist

(42)