Skip to content

Commit

Permalink
Merge pull request #122 from barakwei/feature/fix-local-switch-packag…
Browse files Browse the repository at this point in the history
…e-path-serialization

xcodeproj_extensions: fix wrong serialization with local swift packages.
  • Loading branch information
barakwei authored Sep 16, 2024
2 parents b2001c8 + 90117e1 commit 2fabf9b
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 2fabf9b

Please sign in to comment.