UWP's 'Add-DevAppPackage' Powershell script checks for a developer licence. This is an issue for Sideloading?

回眸只為那壹抹淺笑 提交于 2019-12-01 09:21:55

Is there a way of finding out if the current device is in 'At Least' Sideload apps mode, and if it isn't, show a dialog to prompt the user to enable it?

AFAIK, there is no way to detect whether the Sideload apps mode is enabled for now. And we have no access to show a dialog to prompt the user to enable the sideload apps.

The problem now arises when the users device is in the mode of 'Don't use developer features'. The script crashes.

This is because when install apps in Sideload apps mode, you need to install the app with its trusted certificate. All UWP apps must be signed with a certificate.

Currently users have to enable Developer Mode to be able to sideload an app, which I'd prefer they didn't have to do. I'd fully expect users to only have to enable 'Sideload apps'.

Before create the package of your project, you can open the manifest file and in the Packaging lable:

Here you can choose which certificate to use to sign your app. If you don't want to modify this, it's OK, cause when you packaging your app, a certificate file will automatically generated, and you said you are hoping to distribute the app as a .appxbundle file, alongside a .cer and a Powershell script. In Sideload apps mode, the Powershell script file is not needed. You can just copy the .appxbundle file and a .cer file, and

  1. Enable the Sideload apps mode.

  2. Click the .cer file to trust this certification.

  3. Click the .appxbundle file to install your app.

When the Sideload apps mode is enabled, please don't use .ps1 file to install the app.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!