Skip to content
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

Fix duplication of Info.plist copying that was causing Xcode errors #194

Merged
merged 3 commits into from
Dec 30, 2018

Conversation

igor-makarov
Copy link
Owner

Under Xcode 9 new build system, the dependency tree checker is much more strict.
If an Info.plist appears both as the target's .plist file, and in the build resource phase, Xcode will halt with an error similar to this:

Multiple commands produce '/Users/Igor/Library/Developer/Xcode/DerivedData/Project-afqnptmawwntueehujlkvjtarbgk/Build/Products/Debug-iphonesimulator/BananaApp.app/Info.plist':
1) Target 'BananaApp' (project 'Project') has copy command from '/Users/Igor/xcake/spec/fixtures/integration/simple_with_info_plist/temp/BananaApp/Supporting Files/Info.plist' to '/Users/Igor/Library/Developer/Xcode/DerivedData/Project-afqnptmawwntueehujlkvjtarbgk/Build/Products/Debug-iphonesimulator/BananaApp.app/Info.plist'
2) Target 'BananaApp' (project 'Project') has process command with output '/Users/Igor/Library/Developer/Xcode/DerivedData/Project-afqnptmawwntueehujlkvjtarbgk/Build/Products/Debug-iphonesimulator/BananaApp.app/Info.plist'

This PR aims to solve the issue by exempting a file if it's the target's plist file.

I've added unit tests for the case, and, for the first time, an integration test that does the following:

  • Verifies that the generated .pbxproj matches the fixture by using Xcodeproj::Differ.project_diff
  • Runs xcodebuild and makes sure it passes
  • Verifies that the xcodebuild output matches the fixture

@igor-makarov igor-makarov merged commit a0a3cbc into master Dec 30, 2018
@igor-makarov igor-makarov deleted the fix-infoplist-build-duplicate branch December 30, 2018 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant