Fix issue where device builds would be installed in the simulator #71
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.
Fixes #66.
This is one possible solution to resolve an issue where device builds would be installed in the simulator, and then crash on launch because they are built for the wrong architecture.
The main problem I have with this as a potential solution is that we now completely ignore the configuration set in the scheme, in favour of an explicit configuration variable managed by vim-xcode.
However, the only alternative I've been able to think of is to add code to first locate and then parse .xcscheme files, so that we can then communicate various scheme parameters to
xcodebuild -showBuildSettings
andsimctl launch
. This is possibly a little complicated, because it would involve writing logic to try and locate the correct xcscheme file to use. Parsing itself would be less complicated because we should be able to extract values with some straightforward XPath queries and something likexmllint
.Love to know what you think of this approach, and whether we should just go for supporting more features of Xcode schemes.