-
-
Notifications
You must be signed in to change notification settings - Fork 320
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 adding file reference to bundle and package files #234
Conversation
Thanks for opening this pull request! Please check out our contributing guidelines. |
- Replace check `isFile` with `exists` for a filePath in `addFile` method defined in PBXProjObjects+Helpers.swift - Add checks for supported files based on PBXFileReference's `fileTypeHash` - Add some more test cases Misc: - Add XCTAssertThrowsSpecificError assert to check if specific error was thrown
e7a718e
to
88e37ea
Compare
cfc5cca
to
87bd1bc
Compare
π |
87bd1bc
to
d9349ed
Compare
} | ||
|
||
guard let fileType = PBXFileReference.fileType(path: filePath) else { |
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.
I don't think we should require that it's a file we know about. PBXFileReference.fileType
isn't an exhaustive list of every possible file, and explicitFileType
and lastKnownFileType
are optional properties anyway that get filled in by Xcode when the project is opened.
@yonaskolb fixed |
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.
Cool, thanks!
Congrats on merging your first pull request! We here at xcode.swift are proud of you! Join our slack channel to talk to other contributors. |
Short description π
Resolves #230
Solution π¦
As it was discussed in original issue,
addFile
method ofPBXProjObjects+Helpers.swift
now checks an existence of a file by given path.Implementation π©βπ»π¨βπ»
isFile
withexists
for a filePath inaddFile
methodMisc:
thrown
Review notes
XCodeProjEditingError
enum was changed in this PR, please review if it should be considered as a breaking change.This change isβ