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

xcodeproj_extensions: fix wrong serialization with local swift packages. #122

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/kintsugi/xcodeproj_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ def ascii_plist_annotation
" #{display_name.delete_prefix("plugin:")} "
end
end

# The original implementation is `" #{isa} \"#{File.basename(display_name)}\"` so that means that if we have a
# relative path which is Path/To/Package, the item will be serialized as `XCLocalSwiftPackageReference "Package"`.
# And Xcode will automatically fix this to be `XCLocalSwiftPackageReference "Path/To/Package"`.
# So, we need to patch the implementation and make sure the whole path is used.
class XCLocalSwiftPackageReference
def ascii_plist_annotation
" #{isa} \"#{display_name}\" "
end
end
end
end

Expand Down
Loading