将 privateNetworkClientServer 功能添加到 Windows 8 Cordova 应用程序应用程序、功能、privateNetworkClientServer、Cordova

2023-09-07 08:42:57 作者:一袭染尽红尘衣

如何/在哪里将 privateNetworkClientServer 功能添加到我的 Cordova 应用程序,以便它最终出现在已编译的 Windows 8 应用程序清单文件中.如果我构建,请修改构建的应用程序清单以手动设置该功能,当我按下播放时它会丢失第二个功能,因为它会覆盖文件.

How / where do I add the privateNetworkClientServer capability to my Cordova application so that it ends up in the compiled Windows 8 app manifest file. If i build, modify the built application manifest to ass the capability manually it is lost the second i press play as it overwrites the file.

谢谢

推荐答案

好的,我找到了答案,你需要在 rescertwindows8 中创建一个 package.manifest 文件

Okay so I found the answer, you need to create a package.manifest file in rescertwindows8

然后,我复制了之前构建的清单中的所有字段,但 Build:MetaData 元素除外,并将我想要的功能添加到现有列表中.

I then copied all of the fields from manifest that was built prior with exception of the Build:MetaData element, and added my desired capability to the existing list.

现在,当我编译它时,它使用 package.manifest 作为基础,我得到了我的能力.如果你问我,有点小技巧,Config.xml 中的一个简单部分就足够了.

Now when I compile it uses package.manifest as the base and I get my capability. Bit of a hack if you ask me, a simple section in Config.xml would suffice.