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/02/22 12:55:10 UTC

[GitHub] skocks opened a new pull request #546: (ios) Fix setting of target-device to handset in combination with plugins and resource files

skocks opened a new pull request #546: (ios) Fix setting of target-device to handset in combination with plugins and resource files
URL: https://github.com/apache/cordova-ios/pull/546
 
 
   …nd resource-file
   
   ### Platforms affected
   IOs
   
   ### Motivation and Context
   when:
   - setting the target device `<preference name="target-device" value="handset" />`
   - using (any) plugins
   - Adding a resource file `<resource-file src="GoogleService-Info.plist" />`
   
   then:
   `TARGETED_DEVICE_FAMILY` is reset to the default value of "1,2" while adding the resource file after handling the target device.
   
   ### Description
   Instead of creating a new instance of the xcode project via `new xcode.project([...])` use the wrapped xcode project via `projectFile.parse([...])`.
   This will reuse the cached xcode project, which is created when adding the plugins, and therefore maintain the changes when setting the target device.
   The cached xcode project will then also be used when adding the resource file.
   
   ### Testing
   - add plugins
   - set target-device to handheld
   - add a resource file
   
   verify, that `TARGETED_DEVICE_FAMILY = 1;` is written to the project.pbxproj file.
   
   ### Checklist
   
   - [X] I've run the tests to see all new and existing tests pass
   - [X] I added automated test coverage as appropriate for this change
   - [X] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [X] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [X] I've updated the documentation if necessary
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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