Skip to content

Commit 3baf433

Browse files
authored
Add .icon folder support for IconComposer (#1600)
1 parent 8045fc5 commit 3baf433

5 files changed

Lines changed: 41 additions & 0 deletions

File tree

Sources/ProjectSpec/FileType.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ extension FileType {
7373
"xcassets": FileType(buildPhase: .resources),
7474
"storekit": FileType(buildPhase: .resources),
7575
"xcstrings": FileType(buildPhase: .resources),
76+
"icon": FileType(buildPhase: .resources),
7677

7778
// sources
7879
"swift": FileType(buildPhase: .sources),

Sources/XcodeGenKit/XCProjExtensions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ extension Xcode {
6565
return "wrapper.swiftcrossimport"
6666
case ("xcstrings", _):
6767
return "text.json.xcstrings"
68+
case ("icon", _):
69+
return "wrapper.icon"
6870
default:
6971
// fallback to XcodeProj defaults
7072
return Xcode.filetype(extension: fileExtension)
Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"groups" : [
3+
{
4+
"layers" : [
5+
{
6+
"image-name" : "back.svg",
7+
"name" : "back",
8+
"position" : {
9+
"scale" : 1,
10+
"translation-in-points" : [
11+
0,
12+
0
13+
]
14+
}
15+
}
16+
],
17+
"shadow" : {
18+
"kind" : "neutral",
19+
"opacity" : 0
20+
},
21+
"translucency" : {
22+
"enabled" : false,
23+
"value" : 0.1
24+
}
25+
}
26+
],
27+
"supported-platforms" : {
28+
"squares" : "shared"
29+
}
30+
}

Tests/Fixtures/TestProject/Project.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
6B0BCD3573931F7BE133B301 /* TestProjectTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D132EA69984F32DA9DC727B6 /* TestProjectTests.swift */; };
106106
6C02002A4EE169CEBEC7BA7F /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; };
107107
6E8F8303759824631C8D9DA3 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9E17D598D98065767A04740F /* Localizable.strings */; };
108+
6F3848C1EF3E43A5AC2A4D40 /* TestIcon.icon in Resources */ = {isa = PBXBuildFile; fileRef = FD5AEA58D3C0A1C8EEDF00F7 /* TestIcon.icon */; };
108109
713F57A10C62F70058D7FB0A /* FrameworkFile.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81E4CCE342955E0E934BE533 /* FrameworkFile.swift */; };
109110
7148A4172BFA1CC22E6ED5DB /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 753001CDCEAA4C4E1AFF8E87 /* MainInterface.storyboard */; };
110111
71A2AAC5934BDC9EDB6F0D9E /* libStaticLibrary_ObjC.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B221F5A689AD7D3AD52F56B8 /* libStaticLibrary_ObjC.a */; };
@@ -826,6 +827,7 @@
826827
FA86D418796C1A6864414460 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = "<group>"; };
827828
FD05F36F95D6F098A76F220B /* XPC_Service.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPC_Service.h; sourceTree = "<group>"; };
828829
FD4A16C7B8FEB7F97F3CBE3F /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
830+
FD5AEA58D3C0A1C8EEDF00F7 /* TestIcon.icon */ = {isa = PBXFileReference; lastKnownFileType = wrapper.icon; path = TestIcon.icon; sourceTree = "<group>"; };
829831
FDB2B6A77D39CD5602F2125F /* Contacts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Contacts.framework; path = System/Library/Frameworks/Contacts.framework; sourceTree = SDKROOT; };
830832
FED40A89162E446494DDE7C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
831833
/* End PBXFileReference section */
@@ -1045,6 +1047,7 @@
10451047
01E6934B571B91EAAFF0EDCB /* Resource.abc */,
10461048
325F18855099386B08DD309B /* Resource.abcd */,
10471049
8AF20308873AEEEC4D8C45D1 /* Settings.bundle */,
1050+
FD5AEA58D3C0A1C8EEDF00F7 /* TestIcon.icon */,
10481051
0704B6CAFBB53E0EBB08F6B3 /* ViewController.swift */,
10491052
);
10501053
name = App;
@@ -2615,6 +2618,7 @@
26152618
61601545B6BE00CA74A4E38F /* SceneKitCatalog.scnassets in Resources */,
26162619
28A96EBC76D53817AABDA91C /* Settings.bundle in Resources */,
26172620
E8A135F768448632F8D77C8F /* StandaloneAssets.xcassets in Resources */,
2621+
6F3848C1EF3E43A5AC2A4D40 /* TestIcon.icon in Resources */,
26182622
818D448D4DDD6649B5B26098 /* example.mp4 in Resources */,
26192623
2C7C03B45571A13D472D6B23 /* iMessageApp.app in Resources */,
26202624
);

0 commit comments

Comments
 (0)