WuglyakBolgoink commented on issue #156:
URL: https://github.com/apache/cordova-common/issues/156#issuecomment-777824462


   @raphinesse 
   
   What I have:
   
   - cordova - v10.0.0
   - node - 14.15.5
   - npm - 6.14.11
   
   ----
   
   1. create cordova project
   
   ```bash
   cordova create test157 com.example.test157 test157
   ```
   
   2. open folder
   
   ```bash
   cd test157
   ```
   
   3. install ios platform
   
   ```bash
   cordova platform add [email protected]
   ```
   
   4. Do prepare -> this should be OK
   
   ```bash
   cordova prepare --verbose --debug
   ```
   
   5. Add this two commented edit-config's into ios section
   ```xml
   
   <!--        <edit-config file="*-Info.plist" mode="merge" 
target="NSContactsUsageDescription">-->
   <!--            <string>NSContactsUsageDescription test</string>-->
   <!--        </edit-config>-->
   
   
   <!--        <edit-config file="*-Info.plist" mode="merge" 
target="NSPhotoLibraryUsageDescription">-->
   <!--            <string>NSPhotoLibraryUsageDescription test</string>-->
   <!--        </edit-config>-->
   ```
   
   6. Do prepare -> this should be OK
   
   ```bash
   cordova prepare --verbose --debug
   ```
   
   7. Uncomment first config
   
   ```xml
           <edit-config file="*-Info.plist" mode="merge" 
target="NSContactsUsageDescription">
               <string>NSContactsUsageDescription test</string>
           </edit-config>
   ```
   
   8. Do prepare -> this should be OK
   
   ```bash
   cordova prepare --verbose --debug
   ```
   
   9. Uncomment second config
   
   ```xml
           <edit-config file="*-Info.plist" mode="merge" 
target="NSPhotoLibraryUsageDescription">
               <string>NSPhotoLibraryUsageDescription test</string>
           </edit-config>
   ```
   
   10. this should throw an error
   
   ```bash
   cordova prepare --verbose --debug
   ```
   
   
   ```
   Prepared iOS project successfully
   doc.find is not a function
   TypeError: doc.find is not a function
       at Object.resolveParent 
(/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/util/xml-helpers.js:132:24)
       at 
/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:315:59
       at Array.forEach (<anonymous>)
       at PlatformMunger._is_conflicting 
(/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:307:21)
       at PlatformMunger.add_config_changes 
(/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:176:44)
       at 
/Users/xxxUSERxxx/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare/platforms.js:66:24
       at async Promise.all (index 0)
   ```


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to