Closed chrismowbraylit closed 6 years ago
I'm not able to reproduce this behaviour (see console output below).
This plugin uses the plist module to read and write the plist contents, so any issue in formatting the plist file is likely to be caused by that.
plist
installed locally or globally than that specified by this plugin?I cannot replicate the issue with the above setup. Although I cannot see any other plugin changing the plist in my repo.
Aha! I think I've found the cause of it.
This issue originally cropped up in #90. The cause was a bug in plist@2
(outlined in plist.js#79) and the solution was to keep the version pinned at plist@1.2.0
. However, going through the commit history, it seems I inadvertently accepted PR #119 and forgot about #90. That PR bumps the versions to plist@2.1.0
and xcode@0.9.3
(which indirectly depends on plist@2.1.0
via simple-plist@0.2.1). The PR had good intentions, but has re-introduced this bug.
In the meantime, the ownership of xcode
has moved from alunny to apache/cordova. The new cordova-node-xcode
still depends on simple-plist@0.2.1
and hence on plist@2.1.0
.
However, I don't think the problem encountered with this plugin is the indirect use of plist@2.1.0
via xcode
, I think it's the now-explicit dependency thanks to PR #119.
plist.js#79 is still open and it seems no more recent versions have been released which fix that issue, however there's an open PR to fix it. I'm thinking that if I directly reference the fork which contains the fix in the package.json
of this plugin, then not only will this plugin make direct use of that fixed version of plist@2.1.0
, but the version is the same as that depended on by xcode
hence it should hopefully also use the fixed version from the fork, rather than the buggy master version from npm.
Hey @dpa99c thanks for the quick response. Are you going to push this into a release?
@chrismowbray I've just published v5.0.1 of this plugin, which references the forked plist
dependency.
Give it a go in your project and let me know if it works OK. You may need to first remove node_modules
to make sure it installs fresh dependencies.
@dpa99c im not seeing the 5.0.1 in https://github.com/dpa99c/cordova-custom-config/releases or npm. Maybe it takes a while
Yep and now I see it! ill post back when I test it out
@dpa99c All looks good now. Thanks for the quick response. This issue can be closed
Running a standard config update:
This removes any empty string objects from the .plist.
This...
becomes this...
The .plist in now in an unreadable format and cant be used.