Update iOS generation to write xcode project via expo mod rather than directly to file system #175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Update iOS generation to write xcode project via expo mod rather than directly to file system
Details
This change relies on the xcode project parsed and provided to the plugin via
withXcodeProject
(viamodResults
) rather than the plugin loading and saving the xcode project itself. Changing the xcode project file within the plugin is not consistent with how expo plugins are expected to function. This is most visible when there are other plugins that also make changes to the xcode project file.This change means we no longer have a direct dependency on the
xcode
package, though it typically is still used as an indirect dependency via expo.Additionally, changing of the pod file and the writing of the NSE were also wrapped within calls to
withDangerousMod
to make clear these steps are writing files directly, rather than modifying the configuration.Motivation
Fixes #166
Scope
This change affects how the xcode project file changes are made, establishing intent how the podfile is updated, and establishing intent on the NSE files being created. No runtime changes are in scope.
Testing
Manual testing
Ran
expo prebuild
for projects and manually inspectedios
output folder. Verified all modifications are made. Also tested the specific scenario raised by #166, and ensured proper output when there are multiple plugins modifying the xcode project file.Checklist
Overview
Testing
Final pass