-
Notifications
You must be signed in to change notification settings - Fork 12
Description
Hi there, I found some time to play again with RNTester and this package.
I wanted to report a few differences I noticed when reading and rewriting the project file.
Keys are not sorted alphabetically
All keys are always sorted alphabetically by Xcode. This package does not.
When reading and rewriting the project with no changes, we get this diff:
// !$*UTF8*$!
{
archiveVersion = 1;
+ objectVersion = 54;
classes = {
};
- objectVersion = 54;
objects = {where the objectVersion field has been moved up after the archiveVersion.
This should not happen if we sort the keys alphabetically when writing the project.
Not handling the Frameworks build phase properly.
In the PBXBuildFile section, if some files are included in the Frameworks build phase (for example they are part of a Swift Package) they are not listed properly in the xcode project file.
In PBXFileReference fileEncoding and includeInIndex are always added
The parser always adds the fileEnconding and the includeInIndex property in the PBXFileReference section.
This should not happen as these are unnecessary changes to the project. If the original project does not specify them, they should not be written.
Empty outputPath and inputPath in Script phases
In all the script phases, if we don't specify inputPath and outputhPath, those should be omitted.
The writer adds them everywhere, when they are empty.
They are also added without respecting the alphabetical ordering of the keys.
How to Reproduce
Clone React Native and checkout the branch cipolleschi/bacons/xcode-issues.
git clone https://github.com/facebook/react-native
git checkout cipolleschi/bacons/xcode-issues
cd react-native
yarn
cd packages/rn-tester
node scripts/update-xcode.js
then inspect the changes in the pbxproject.
For the [missing build phase] issue I don't have a good reproducer yet. I found it while investigating how to integrate Swift PM in RNTester and the set of changes are not ready yet to be shared.