You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/07/12 08:08:54 UTC

[GitHub] [cordova-windows] dominic-simplan commented on issue #336: Build command needs to be run twice to apply config.xml changes to appxmanifest

dominic-simplan commented on issue #336: Build command needs to be run twice to apply config.xml changes to appxmanifest
URL: https://github.com/apache/cordova-windows/issues/336#issuecomment-510793386
 
 
   @janpio thank you for taking the time to investige. I can confirm your behaviour with an empty project, but I still get the described issue within my project, even with cordova 9.0.0.
   
   I've setup a new project in order to find out what's causing this issue (https://github.com/dominic-simplan/cordova-windows-config). 
   While trying to reproduce the issue, I came across a strange behaviour which I don't understand and which might be related.
   
   After running cordova prepare in the linked project, windows.json contains the following (because of the camera plugin):
   
   ```
   "package.windows10.appxmanifest": {
     "parents": {
       "/Package/Capabilities": [{
           "xml": "<DeviceCapability Name=\"webcam\" />",
           "count": 1
         }
       ]
     }
   }
   ```
   
   Now I add this to the config.xml and build the project:
   ```
   <platform name="windows">
   	<config-file parent="/Package/Capabilities" target="package.appxmanifest">
   		<Capability Name="allJoyn" />
   	</config-file>
   </platform>
   ```
   
   The windows.json now contains
   ```
   "package.windows10.appxmanifest": {
     "parents": {
       "/Package/Capabilities": [{
           "xml": "<Capability Name=\"allJoyn\" />",
           "count": 1,
           "id": "config.xml"
         }
       ]
     }
   }
   ```
   
   Why is the webcam capability gone? `<config-file>` should append the tag, shouldn't it? Even if I remove the `<config-file>` from the config.xml again, the according object in the windows.json is now empty:
   ```
   "package.windows10.appxmanifest": {
     "parents": {
       "/Package/Capabilities": []
     }
   }
   ```
   
   Before I do any further investigation, I need to understand if this behaviour is correct or not.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org