-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update writeObjectsSections to match current Xcode format #46
Update writeObjectsSections to match current Xcode format #46
Conversation
Tested on Xcode Version 10.1 (10B61)
9f1f7e5
to
2b90c37
Compare
Any pointers how I could reproduce this behavior on Cordova or React Native? P.S. My Xcode shows the following version: Version 10.1 (10B61) |
Absolutely! In my project it was reproducible by editing the file name of any file or group using Xcode. That would force Xcode to rewrite the pbxproj, and that adds in the blank line! (So, modify a project using node-Xcode, and then cause Xcode to modify itself, and compare both versions; Or, take an Xcode generated project, and then force node-Xcode to rewrite it, even though you changed nothing) |
Changes to the release notes are removed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @fbartho.
Travis CI build is now green, merging now. I think this change should be considered a MINOR change as opposed to a "patch fix". |
We've been noticing some thrash where a blank line gets deleted or re-added when adding new NativeModules to our react-native project.
Under the hood, several of our tools are using this npm package. After some experiments, I was able to figure out that current Xcode versions will automatically insert an extra blank line after the
objects = {
section of the Xcode project.Looking at the source-code of this tool, I found that 7 years ago this was an intentional feature:
cordova-node-xcode/lib/pbxWriter.js
Lines 185 to 189 in 4159249
With the current release version of Xcode, and indeed several previous versions of Xcode 10 and possibly later versions of Xcode 9, when Xcode writes out the project.pbxproj file, it will insert this blank line.
This PR brings cordova-node-xcode into line with that style.
Tested on Xcode Version 10.1 (10B61)