9

I am running into a strange behavior with swiftlint autocorrect. My project uses a library imported through SPM. But when I run the linter, it changes settings like the following

B4621A7323D0A90F00545ADE /* LibraryName in Frameworks */ = {isa = PBXBuildFile; productRef = B4621A7223D0A90F00545ADE /* LibraryName */; };

files = (
    B4621A7323D0A90F00545ADE /* LibraryName in Frameworks */,

packageProductDependencies = (
    B4621A7223D0A90F00545ADE /* LibraryName */,

packageReferences = (
    B4621A7123D0A90F00545ADE /* XCRemoteSwiftPackageReference "library-name" */,

to something like this

B4621A7323D0A90F00545ADE /* BuildFile in Frameworks */ = {isa = PBXBuildFile; productRef = B4621A7223D0A90F00545ADE /* SwiftPackageProductDependency */; };

files = (
    B4621A7323D0A90F00545ADE /* BuildFile in Frameworks */,

packageProductDependencies = (
    B4621A7223D0A90F00545ADE /* SwiftPackageProductDependency */,

packageReferences = (
    B4621A7123D0A90F00545ADE /* RemoteSwiftPackageReference */,

It basically removes all references to the actual library and replaces them with some generic things. I tried adding two different libraries and it did the same to both libraries.

Any idea what might be going on and how I can fix it?

2
  • 1
    I got the same issue, but I'm not using SwiftLint autocorrect. Are you using the command from the Xcode menu File > Swift Packages > Resolve Package Versions? Maybe that's connected. Commented Feb 27, 2020 at 14:49
  • I have the same issue when running this fastlane plugin. Did you ever find a solution?
    – shim
    Commented Nov 18, 2020 at 14:42

1 Answer 1

0

This is not related to SwiftLint autocorrect nor any fastlane plugin as stated in other comments. As far as I can tell, for now, this is an Xcode bug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.