Windows Phone Capabilities with Cordova

2019-04-15 02:09发布

问题:

I have problems with the capabilities of the windows phone according to UDP Socket Access.

I know that i have to set up the capabilities "internetClientServer" and "privateNetworkClientServer" (see: https://msdn.microsoft.com/en-us/library/windows/apps/hh464936.aspx)

But I dont know where I have to setup the manifest file where these capabilities should be inserted. I found a older question with a similar problem but thats not working. (see:Adding privateNetworkClientServer capability to Windows 8 Cordova Application)

I extended the UDP Plugin "in.girish.datagram" with the Windows Phone Part and adapt the according plugin.xml file with the following lines. (only the capability part)

      <config-file target="res/cert/windows8/AppxManifest.xml" parent="/Package/Capabilities">
    <Capability Name="internetClientServer" />
    <Capability Name="privateNetworkClientServer" />
  </config-file>

I think the target information is wrong but i dont know what is the right one. It would be very nice if somebody knows a solution.

Thanks for help!

回答1:

I think I found what my problem is, the capabilities internetClientServer and privateNetworkClientServer should be inserted into the package.appxmanifest file which is only available inside Windows Phone 8.1 solutions.

In windows phone 8 solutions this file is named WMAppManifest.

see this articel about the difference of the package.appxmanifest and the wmappmanifest file: http://bsubramanyamraju.blogspot.in/2014/07/wp80-vs-wp81-all-about.html