This PR fixes two issues I discovered while using this library to add an app
extension to a pbxproject.
1. `new pbxFile('AppExtension', { explicitFileType:
'"wrapper.app-extension"'})` gets indirectly called when using
`proj.addTarget('AppExtension', 'app_extension')`. This results in an incorrect
extension being added to the basename when trying to determine the extension
from `defaultExtension` (`detectType` sets it to the literal string "unknown"
which fails falsey checks). The result would end up being
`AppExtension.undefined` instead of the correct `AppExtension.appex`. Also
corrected a missing `unquoted()` call in the `defaultExtension()` function
which also led to the same failure.
2. `addTargetDependency()` is indirectly called as well from
`proj.addTarget('AppExtension', 'app_extension')`. In my project,
`PBXTargetDependency` and `PBXContainerItemProxy` sections did not yet exist
which results in the necessary dependencies not being set up properly for
building the extension with the main app. Create these sections if they do not
exist.
[ Full content available at:
https://github.com/apache/cordova-node-xcode/pull/12 ]
This message was relayed via gitbox.apache.org for [email protected]