xUnique icon indicating copy to clipboard operation
xUnique copied to clipboard

Swift packge manager support

Open CrazyFanFan opened this issue 5 years ago • 3 comments

Uniquify done
Following lines were deleted because of invalid format or no longer being used:
		636D7944239107EC005672E7 /* Yams in Frameworks */ = {isa = PBXBuildFile; productRef = 636D7943239107EC005672E7 /* Yams */; };
 				636D7944239107EC005672E7 /* Yams in Frameworks */,
 				636D7943239107EC005672E7 /* Yams */,
 				636D7942239107EC005672E7 /* XCRemoteSwiftPackageReference "Yams" */,
 		636D7942239107EC005672E7 /* XCRemoteSwiftPackageReference "Yams" */ = {
 		636D7943239107EC005672E7 /* Yams */ = {
 			package = 636D7942239107EC005672E7 /* XCRemoteSwiftPackageReference "Yams" */;
Sort done
Uniquify and Sort done

CrazyFanFan avatar Dec 04 '19 14:12 CrazyFanFan

More details, please

truebit avatar Dec 06 '19 09:12 truebit

  • Create a project with Xcode which version >= 11.0
  • Project ==> Swift Packages ==> +,
  • Add an arbitrary dependency
  • run xunique Name.xcodeproj on your terminal Here's a Demo xUniqueDemo.zip

CrazyFanFan avatar Dec 07 '19 02:12 CrazyFanFan

I can assure. xUnique breaks SwiftPM related nodes like the following:

/* Begin XCRemoteSwiftPackageReference section */
		D6B1CDCF2476BE73007A80F8 /* XCRemoteSwiftPackageReference "MBProgressHUD" */ = {
			isa = XCRemoteSwiftPackageReference;
			repositoryURL = "https://github.com/jdg/MBProgressHUD";
			requirement = {
				kind = upToNextMajorVersion;
				minimumVersion = 1.2.0;
			};
		};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
		D6B1CDD02476BE73007A80F8 /* MBProgressHUD */ = {
			isa = XCSwiftPackageProductDependency;
			package = D6B1CDCF2476BE73007A80F8 /* XCRemoteSwiftPackageReference "MBProgressHUD" */;
			productName = MBProgressHUD;
		};
/* End XCSwiftPackageProductDependency section */

And removes all the lines related to that dependency you try to use with SwiftPM.

Here is a the output:

Uniquify...
Uniquify done
Following lines were deleted because of invalid format or no longer being used:
		D6B1CDD12476BE73007A80F8 /* MBProgressHUD in Frameworks */ = {isa = PBXBuildFile; productRef = D6B1CDD02476BE73007A80F8 /* MBProgressHUD */; };
 				D6B1CDD12476BE73007A80F8 /* MBProgressHUD in Frameworks */,
 				D6B1CDD02476BE73007A80F8 /* MBProgressHUD */,
 				D6B1CDCF2476BE73007A80F8 /* XCRemoteSwiftPackageReference "MBProgressHUD" */,
 		D6B1CDCF2476BE73007A80F8 /* XCRemoteSwiftPackageReference "MBProgressHUD" */ = {
 		D6B1CDD02476BE73007A80F8 /* MBProgressHUD */ = {
 			package = D6B1CDCF2476BE73007A80F8 /* XCRemoteSwiftPackageReference "MBProgressHUD" */;
Sort...
Sort done
File 'project.pbxproj' was modified, please add it and then commit.

andrassomogyi avatar May 21 '20 13:05 andrassomogyi