Why does Ionic/Cordova build for Windows UWP add Content URI to appxmanifest?

回眸只為那壹抹淺笑 提交于 2019-12-25 01:56:08

问题


I have an Ionic(3) Cordova application, where I want to include a Windows UWP version. On iOS and Android I have no problems, but UWP I just cannot get my ajax to work and be store compliant. My issue is with my ajax calls being blocked on corporate networks as outlined here

So, the issue was I needed to add privateNetworkClientServer, which when testing locally, fixed the blocking issue. Also, as explained in the link, I have attempted to add the "local mode".

The store now rejects it with

Error Found: The app manifest test detected the following errors:
    o    The Application cannot include an ApplicationContentUriRule with 'all' or 'allowForWebOnly' WindowsRuntimeAccess while any of the following capabilities are enabled: enterpriseAuthentication, sharedUserCertificates, musicLibrary, picturesLibrary, videosLibrary, removableStorage, documentLibrary, internetClientServer, privateNetworkClientServer.

So, now I am trying to remove the

<uap:ApplicationContentUriRules>
            <uap:Rule Match="http://localhost:8080/*" Type="include" WindowsRuntimeAccess="all" />
 </uap:ApplicationContentUriRules>

from the appmanifest, but when I do the Ionic/Cordova build, it keeps adding it back.

It seems there is something wrong with everything I do, all I want to do is run ajax calls across a network (seems like a pretty common case to me)

Anyway, does anyone have any ideas on this latest problem, Ie the

 <uap:Rule Match="http://localhost:8080/*" Type="include" 
     WindowsRuntimeAccess="all" />

Thanks in advance for any help.

来源:https://stackoverflow.com/questions/52960298/why-does-ionic-cordova-build-for-windows-uwp-add-content-uri-to-appxmanifest

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