diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index db2af319..43334701 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -21,12 +21,12 @@ 0FF26049250F5E4D00D890E1 /* UIComponents.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0FF26041250F5E4D00D890E1 /* UIComponents.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 0FF26054250F5EB700D890E1 /* SolidButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F8F6C6D25090F4900879906 /* SolidButton.swift */; }; 0FF26058250F5F2600D890E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0FF26057250F5F1D00D890E1 /* Assets.xcassets */; }; - 0FF2605C250F7F7A00D890E1 /* UIImage+extension_icons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF2605B250F7F7A00D890E1 /* UIImage+extension_icons.swift */; }; - 0FF2605E250F7F9300D890E1 /* UIColor+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF2605D250F7F9300D890E1 /* UIColor+extension.swift */; }; - 0FF26060250F7FA700D890E1 /* UIImage+extension_illustrations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF2605F250F7FA700D890E1 /* UIImage+extension_illustrations.swift */; }; - 0FF26064250F7FBC00D890E1 /* Label.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF26061250F7FBC00D890E1 /* Label.swift */; }; - 0FF26065250F7FBC00D890E1 /* UIFont+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF26062250F7FBC00D890E1 /* UIFont+extension.swift */; }; - 0FF26066250F7FBC00D890E1 /* LabelStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FF26063250F7FBC00D890E1 /* LabelStyle.swift */; }; + 1F0B4A2B1B6DE81FA15ECE5F /* LabelStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1A098EC7E2840A136A90A2E /* LabelStyle.swift */; }; + 6B86A3CE5140E866246D4E63 /* UIColor+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26544004529E9C3913E349BC /* UIColor+extension.swift */; }; + 6F73358ABD24D9019DC620AE /* UIImage+extension_icons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8654869BAAACD6B2D49C2B27 /* UIImage+extension_icons.swift */; }; + 86AF56B26E2BA693427CFE8B /* UIFont+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3475E8E2126C5DF2C229C7AA /* UIFont+extension.swift */; }; + B046F6739B5D3EB024E58F92 /* UIImage+extension_illustrations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 494D7859E56EB26CD8ABDD0A /* UIImage+extension_illustrations.swift */; }; + BB9EE1EE0F7E020A2AD7909E /* Label.swift in Sources */ = {isa = PBXBuildFile; fileRef = F61D12E3FAB0053729800360 /* Label.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -69,15 +69,15 @@ 0FF26043250F5E4D00D890E1 /* UIComponents.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIComponents.h; sourceTree = ""; }; 0FF26044250F5E4D00D890E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 0FF26057250F5F1D00D890E1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 0FF2605B250F7F7A00D890E1 /* UIImage+extension_icons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+extension_icons.swift"; sourceTree = ""; }; - 0FF2605D250F7F9300D890E1 /* UIColor+extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+extension.swift"; sourceTree = ""; }; - 0FF2605F250F7FA700D890E1 /* UIImage+extension_illustrations.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+extension_illustrations.swift"; sourceTree = ""; }; - 0FF26061250F7FBC00D890E1 /* Label.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Label.swift; sourceTree = ""; }; - 0FF26062250F7FBC00D890E1 /* UIFont+extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIFont+extension.swift"; sourceTree = ""; }; - 0FF26063250F7FBC00D890E1 /* LabelStyle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LabelStyle.swift; sourceTree = ""; }; 11966572636132EBFF5F81BB /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; + 26544004529E9C3913E349BC /* UIColor+extension.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIColor+extension.swift"; path = "UIColor+extension.swift"; sourceTree = ""; }; + 3475E8E2126C5DF2C229C7AA /* UIFont+extension.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIFont+extension.swift"; path = "UIFont+extension.swift"; sourceTree = ""; }; + 494D7859E56EB26CD8ABDD0A /* UIImage+extension_illustrations.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIImage+extension_illustrations.swift"; path = "UIImage+extension_illustrations.swift"; sourceTree = ""; }; + 8654869BAAACD6B2D49C2B27 /* UIImage+extension_icons.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; path = "UIImage+extension_icons.swift"; sourceTree = ""; }; + A1A098EC7E2840A136A90A2E /* LabelStyle.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LabelStyle.swift; path = LabelStyle.swift; sourceTree = ""; }; C2FF91A431F7153FD4C7A3C3 /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; EE92E0072EBEBC415D106D58 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F61D12E3FAB0053729800360 /* Label.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Label.swift; path = Label.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -172,27 +172,13 @@ isa = PBXGroup; children = ( 0FF26056250F5EFC00D890E1 /* Resource */, - 0FF2604E250F5E5300D890E1 /* Source */, 0FF26043250F5E4D00D890E1 /* UIComponents.h */, 0FF26044250F5E4D00D890E1 /* Info.plist */, + C79B77E4BD7D2669DB1CF545 /* Source */, ); path = UIComponents; sourceTree = ""; }; - 0FF2604E250F5E5300D890E1 /* Source */ = { - isa = PBXGroup; - children = ( - 0FF26061250F7FBC00D890E1 /* Label.swift */, - 0FF26063250F7FBC00D890E1 /* LabelStyle.swift */, - 0F8F6C6D25090F4900879906 /* SolidButton.swift */, - 0FF2605D250F7F9300D890E1 /* UIColor+extension.swift */, - 0FF26062250F7FBC00D890E1 /* UIFont+extension.swift */, - 0FF2605B250F7F7A00D890E1 /* UIImage+extension_icons.swift */, - 0FF2605F250F7FA700D890E1 /* UIImage+extension_illustrations.swift */, - ); - path = Source; - sourceTree = ""; - }; 0FF26056250F5EFC00D890E1 /* Resource */ = { isa = PBXGroup; children = ( @@ -218,6 +204,20 @@ name = Frameworks; sourceTree = ""; }; + C79B77E4BD7D2669DB1CF545 /* Source */ = { + isa = PBXGroup; + children = ( + 0F8F6C6D25090F4900879906 /* SolidButton.swift */, + 8654869BAAACD6B2D49C2B27 /* UIImage+extension_icons.swift */, + 26544004529E9C3913E349BC /* UIColor+extension.swift */, + 494D7859E56EB26CD8ABDD0A /* UIImage+extension_illustrations.swift */, + 3475E8E2126C5DF2C229C7AA /* UIFont+extension.swift */, + F61D12E3FAB0053729800360 /* Label.swift */, + A1A098EC7E2840A136A90A2E /* LabelStyle.swift */, + ); + path = Source; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -371,13 +371,13 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 0FF2605E250F7F9300D890E1 /* UIColor+extension.swift in Sources */, - 0FF26060250F7FA700D890E1 /* UIImage+extension_illustrations.swift in Sources */, - 0FF26066250F7FBC00D890E1 /* LabelStyle.swift in Sources */, - 0FF2605C250F7F7A00D890E1 /* UIImage+extension_icons.swift in Sources */, - 0FF26064250F7FBC00D890E1 /* Label.swift in Sources */, - 0FF26065250F7FBC00D890E1 /* UIFont+extension.swift in Sources */, 0FF26054250F5EB700D890E1 /* SolidButton.swift in Sources */, + 6F73358ABD24D9019DC620AE /* UIImage+extension_icons.swift in Sources */, + 6B86A3CE5140E866246D4E63 /* UIColor+extension.swift in Sources */, + B046F6739B5D3EB024E58F92 /* UIImage+extension_illustrations.swift in Sources */, + 86AF56B26E2BA693427CFE8B /* UIFont+extension.swift in Sources */, + BB9EE1EE0F7E020A2AD7909E /* Label.swift in Sources */, + 1F0B4A2B1B6DE81FA15ECE5F /* LabelStyle.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Example/figma-export.yaml b/Example/figma-export.yaml index 8fd72d28..cf3fa98e 100644 --- a/Example/figma-export.yaml +++ b/Example/figma-export.yaml @@ -17,6 +17,10 @@ common: # [optional] iOS export parameters ios: + # Path to xcodeproj + xcodeprojPath: "./Example.xcodeproj" + # Xcode Target containing resources and corresponding swift code + target: "UIComponents" # Path to the Assets.xcassets directory xcassetsPath: "./UIComponents/Resource/Assets.xcassets" # Is Assets.xcassets located in the main bundle? diff --git a/ExampleSwiftUI/ExampleSwiftUI.xcodeproj/project.pbxproj b/ExampleSwiftUI/ExampleSwiftUI.xcodeproj/project.pbxproj index c5eb0475..0b46eb7b 100644 --- a/ExampleSwiftUI/ExampleSwiftUI.xcodeproj/project.pbxproj +++ b/ExampleSwiftUI/ExampleSwiftUI.xcodeproj/project.pbxproj @@ -7,35 +7,32 @@ objects = { /* Begin PBXBuildFile section */ - 0F4B3AF5250AA00800BCB556 /* UIFont+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F4B3AF4250AA00800BCB556 /* UIFont+extension.swift */; }; 0F4B3AF8250B532600BCB556 /* IconsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F4B3AF7250B532600BCB556 /* IconsView.swift */; }; - 0F4B3AFA250B534700BCB556 /* Image+extension_illustrations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F4B3AF9250B534700BCB556 /* Image+extension_illustrations.swift */; }; 0F68F0FD250B55ED007C0614 /* IllustrationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F68F0FC250B55ED007C0614 /* IllustrationsView.swift */; }; 0F68F0FF250B58C4007C0614 /* TabStackedView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F68F0FE250B58C4007C0614 /* TabStackedView.swift */; }; - 0F68F101250B6556007C0614 /* Image+extension_icons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F68F100250B6556007C0614 /* Image+extension_icons.swift */; }; 0F8F6C8E250A539F00879906 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F8F6C8D250A539F00879906 /* AppDelegate.swift */; }; 0F8F6C90250A539F00879906 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F8F6C8F250A539F00879906 /* SceneDelegate.swift */; }; 0F8F6C92250A539F00879906 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F8F6C91250A539F00879906 /* ContentView.swift */; }; 0F8F6C94250A53A100879906 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0F8F6C93250A53A100879906 /* Assets.xcassets */; }; 0F8F6C97250A53A100879906 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0F8F6C96250A53A100879906 /* Preview Assets.xcassets */; }; 0F8F6C9A250A53A100879906 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0F8F6C98250A53A100879906 /* LaunchScreen.storyboard */; }; - 0F8F6CA3250A53FC00879906 /* Color+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F8F6CA2250A53FC00879906 /* Color+extension.swift */; }; 0F8F6CA6250A57B100879906 /* ColorsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F8F6CA5250A57B100879906 /* ColorsView.swift */; }; 0F8F6CA8250A58D900879906 /* TypographyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F8F6CA7250A58D900879906 /* TypographyView.swift */; }; - 0FD3867A250A801F00877D7D /* UIColor+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FD38679250A801F00877D7D /* UIColor+extension.swift */; }; - 0FD3867C250A835200877D7D /* Font+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0FD3867B250A835200877D7D /* Font+extension.swift */; }; 0FD3867F250A837A00877D7D /* PTSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0FD3867D250A837A00877D7D /* PTSans-Regular.ttf */; }; 0FD38680250A837A00877D7D /* PTSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0FD3867E250A837A00877D7D /* PTSans-Bold.ttf */; }; + 1BA6134043D6FD7EDB959061 /* Font+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F46D3C0811B8FEE79BAE1E23 /* Font+extension.swift */; }; + 24F06108CD0560C1B6FAD358 /* UIFont+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A89C77EDA6310E1225EA3505 /* UIFont+extension.swift */; }; + 342F3977C58BAF392D6B502A /* Image+extension_icons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9699B6B4BC5AE70448B60F91 /* Image+extension_icons.swift */; }; + 46B8556D7CB9F7CA5DD7E907 /* Color+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5EF2480241C69680DE1DB6C9 /* Color+extension.swift */; }; + 741C67006CF7E203FB756591 /* UIColor+extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D7F7A1CCA8185878CE03381 /* UIColor+extension.swift */; }; + 97E840BB2F4996C49195DBF7 /* Image+extension_illustrations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74A76F1224A08E5793977374 /* Image+extension_illustrations.swift */; }; 9987473D454F00255EB04D48 /* Pods_ExampleSwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA37F45E22AC1BFA63734CC5 /* Pods_ExampleSwiftUI.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 0F4B3AF4250AA00800BCB556 /* UIFont+extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIFont+extension.swift"; sourceTree = ""; }; 0F4B3AF7250B532600BCB556 /* IconsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconsView.swift; sourceTree = ""; }; - 0F4B3AF9250B534700BCB556 /* Image+extension_illustrations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+extension_illustrations.swift"; sourceTree = ""; }; 0F68F0FC250B55ED007C0614 /* IllustrationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IllustrationsView.swift; sourceTree = ""; }; 0F68F0FE250B58C4007C0614 /* TabStackedView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabStackedView.swift; sourceTree = ""; }; - 0F68F100250B6556007C0614 /* Image+extension_icons.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+extension_icons.swift"; sourceTree = ""; }; 0F8F6C8A250A539F00879906 /* ExampleSwiftUI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ExampleSwiftUI.app; sourceTree = BUILT_PRODUCTS_DIR; }; 0F8F6C8D250A539F00879906 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 0F8F6C8F250A539F00879906 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; @@ -44,16 +41,19 @@ 0F8F6C96250A53A100879906 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 0F8F6C99250A53A100879906 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 0F8F6C9B250A53A100879906 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 0F8F6CA2250A53FC00879906 /* Color+extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+extension.swift"; sourceTree = ""; }; 0F8F6CA5250A57B100879906 /* ColorsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorsView.swift; sourceTree = ""; }; 0F8F6CA7250A58D900879906 /* TypographyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypographyView.swift; sourceTree = ""; }; - 0FD38679250A801F00877D7D /* UIColor+extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+extension.swift"; sourceTree = ""; }; - 0FD3867B250A835200877D7D /* Font+extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font+extension.swift"; sourceTree = ""; }; 0FD3867D250A837A00877D7D /* PTSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "PTSans-Regular.ttf"; sourceTree = ""; }; 0FD3867E250A837A00877D7D /* PTSans-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "PTSans-Bold.ttf"; sourceTree = ""; }; + 5EF2480241C69680DE1DB6C9 /* Color+extension.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Color+extension.swift"; path = "Color+extension.swift"; sourceTree = ""; }; + 6D7F7A1CCA8185878CE03381 /* UIColor+extension.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIColor+extension.swift"; path = "UIColor+extension.swift"; sourceTree = ""; }; + 74A76F1224A08E5793977374 /* Image+extension_illustrations.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; path = "Image+extension_illustrations.swift"; sourceTree = ""; }; + 9699B6B4BC5AE70448B60F91 /* Image+extension_icons.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; path = "Image+extension_icons.swift"; sourceTree = ""; }; + A89C77EDA6310E1225EA3505 /* UIFont+extension.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; path = "UIFont+extension.swift"; sourceTree = ""; }; AC8C22E8BA371578896E49F3 /* Pods-ExampleSwiftUI.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleSwiftUI.release.xcconfig"; path = "Target Support Files/Pods-ExampleSwiftUI/Pods-ExampleSwiftUI.release.xcconfig"; sourceTree = ""; }; D0E8661B3837E2164E3CDF6F /* Pods-ExampleSwiftUI.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExampleSwiftUI.debug.xcconfig"; path = "Target Support Files/Pods-ExampleSwiftUI/Pods-ExampleSwiftUI.debug.xcconfig"; sourceTree = ""; }; DA37F45E22AC1BFA63734CC5 /* Pods_ExampleSwiftUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExampleSwiftUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F46D3C0811B8FEE79BAE1E23 /* Font+extension.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; fileEncoding = 4; path = "Font+extension.swift"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -123,26 +123,13 @@ 0F8F6CA1250A53F400879906 /* View */ = { isa = PBXGroup; children = ( - 0F8F6CA4250A579D00879906 /* Common */, 0F8F6C91250A539F00879906 /* ContentView.swift */, 0F4B3AF6250B530500BCB556 /* Tab */, + 19A7EB3DBB30E71B342BBE9F /* Common */, ); path = View; sourceTree = ""; }; - 0F8F6CA4250A579D00879906 /* Common */ = { - isa = PBXGroup; - children = ( - 0F8F6CA2250A53FC00879906 /* Color+extension.swift */, - 0FD38679250A801F00877D7D /* UIColor+extension.swift */, - 0FD3867B250A835200877D7D /* Font+extension.swift */, - 0F4B3AF4250AA00800BCB556 /* UIFont+extension.swift */, - 0F68F100250B6556007C0614 /* Image+extension_icons.swift */, - 0F4B3AF9250B534700BCB556 /* Image+extension_illustrations.swift */, - ); - path = Common; - sourceTree = ""; - }; 0FD38683250A9D2200877D7D /* Resources */ = { isa = PBXGroup; children = ( @@ -153,13 +140,25 @@ path = Resources; sourceTree = ""; }; + 19A7EB3DBB30E71B342BBE9F /* Common */ = { + isa = PBXGroup; + children = ( + A89C77EDA6310E1225EA3505 /* UIFont+extension.swift */, + F46D3C0811B8FEE79BAE1E23 /* Font+extension.swift */, + 9699B6B4BC5AE70448B60F91 /* Image+extension_icons.swift */, + 74A76F1224A08E5793977374 /* Image+extension_illustrations.swift */, + 6D7F7A1CCA8185878CE03381 /* UIColor+extension.swift */, + 5EF2480241C69680DE1DB6C9 /* Color+extension.swift */, + ); + path = Common; + sourceTree = ""; + }; 2A604A12EEBA8EC6B46D951E /* Pods */ = { isa = PBXGroup; children = ( D0E8661B3837E2164E3CDF6F /* Pods-ExampleSwiftUI.debug.xcconfig */, AC8C22E8BA371578896E49F3 /* Pods-ExampleSwiftUI.release.xcconfig */, ); - name = Pods; path = Pods; sourceTree = ""; }; @@ -271,19 +270,19 @@ buildActionMask = 2147483647; files = ( 0F8F6C8E250A539F00879906 /* AppDelegate.swift in Sources */, - 0F8F6CA3250A53FC00879906 /* Color+extension.swift in Sources */, 0F8F6C90250A539F00879906 /* SceneDelegate.swift in Sources */, - 0FD3867A250A801F00877D7D /* UIColor+extension.swift in Sources */, - 0F4B3AF5250AA00800BCB556 /* UIFont+extension.swift in Sources */, - 0FD3867C250A835200877D7D /* Font+extension.swift in Sources */, 0F8F6C92250A539F00879906 /* ContentView.swift in Sources */, 0F68F0FF250B58C4007C0614 /* TabStackedView.swift in Sources */, - 0F4B3AFA250B534700BCB556 /* Image+extension_illustrations.swift in Sources */, 0F68F0FD250B55ED007C0614 /* IllustrationsView.swift in Sources */, 0F4B3AF8250B532600BCB556 /* IconsView.swift in Sources */, 0F8F6CA6250A57B100879906 /* ColorsView.swift in Sources */, 0F8F6CA8250A58D900879906 /* TypographyView.swift in Sources */, - 0F68F101250B6556007C0614 /* Image+extension_icons.swift in Sources */, + 24F06108CD0560C1B6FAD358 /* UIFont+extension.swift in Sources */, + 1BA6134043D6FD7EDB959061 /* Font+extension.swift in Sources */, + 342F3977C58BAF392D6B502A /* Image+extension_icons.swift in Sources */, + 97E840BB2F4996C49195DBF7 /* Image+extension_illustrations.swift in Sources */, + 741C67006CF7E203FB756591 /* UIColor+extension.swift in Sources */, + 46B8556D7CB9F7CA5DD7E907 /* Color+extension.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Color+extension.swift b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Color+extension.swift index f59f5a1c..67df0034 100644 --- a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Color+extension.swift +++ b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Color+extension.swift @@ -9,12 +9,12 @@ import SwiftUI -extension Color { - static var backgroundPrimary: Color { return Color(#function) } - static var backgroundSecondary: Color { return Color(#function) } - static var button: Color { return Color(#function) } - static var buttonPressed: Color { return Color(#function) } - static var textPrimary: Color { return Color(#function) } - static var textSecondary: Color { return Color(#function) } - static var tint: Color { return Color(#function) } +public extension Color { + static var backgroundPrimary: Color { Color(#function) } + static var backgroundSecondary: Color { Color(#function) } + static var button: Color { Color(#function) } + static var buttonPressed: Color { Color(#function) } + static var textPrimary: Color { Color(#function) } + static var textSecondary: Color { Color(#function) } + static var tint: Color { Color(#function) } } diff --git a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Font+extension.swift b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Font+extension.swift index 3225ea60..91462ae5 100644 --- a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Font+extension.swift +++ b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Font+extension.swift @@ -9,7 +9,7 @@ import SwiftUI -extension Font { +public extension Font { static func largeTitle() -> Font { Font.custom("PTSans-Bold", size: 34.0) diff --git a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_icons.swift b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_icons.swift index 60d63ebd..c924b08d 100644 --- a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_icons.swift +++ b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_icons.swift @@ -9,16 +9,16 @@ import SwiftUI -extension Image { - static var ic16KeyEmergency: Image { return Image(#function) } - static var ic16KeySandglass: Image { return Image(#function) } - static var ic16Notification: Image { return Image(#function) } - static var ic24ArrowRight: Image { return Image(#function) } - static var ic24Close: Image { return Image(#function) } - static var ic24Dots: Image { return Image(#function) } - static var ic24DropdownDown: Image { return Image(#function) } - static var ic24DropdownUp: Image { return Image(#function) } - static var ic24FullscreenDisable: Image { return Image(#function) } - static var ic24FullscreenEnable: Image { return Image(#function) } - static var ic24ShareIos: Image { return Image(#function) } +public extension Image { + static var ic16KeyEmergency: Image { Image(#function) } + static var ic16KeySandglass: Image { Image(#function) } + static var ic16Notification: Image { Image(#function) } + static var ic24ArrowRight: Image { Image(#function) } + static var ic24Close: Image { Image(#function) } + static var ic24Dots: Image { Image(#function) } + static var ic24DropdownDown: Image { Image(#function) } + static var ic24DropdownUp: Image { Image(#function) } + static var ic24FullscreenDisable: Image { Image(#function) } + static var ic24FullscreenEnable: Image { Image(#function) } + static var ic24ShareIos: Image { Image(#function) } } diff --git a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_illustrations.swift b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_illustrations.swift index ceaec3d5..e93691fd 100644 --- a/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_illustrations.swift +++ b/ExampleSwiftUI/ExampleSwiftUI/View/Common/Image+extension_illustrations.swift @@ -9,8 +9,8 @@ import SwiftUI -extension Image { - static var imgZeroEmpty: Image { return Image(#function) } - static var imgZeroError: Image { return Image(#function) } - static var imgZeroInternet: Image { return Image(#function) } +public extension Image { + static var imgZeroEmpty: Image { Image(#function) } + static var imgZeroError: Image { Image(#function) } + static var imgZeroInternet: Image { Image(#function) } } diff --git a/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIColor+extension.swift b/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIColor+extension.swift index fe6dd2cb..868e8291 100644 --- a/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIColor+extension.swift +++ b/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIColor+extension.swift @@ -9,12 +9,12 @@ import UIKit -extension UIColor { - static var backgroundPrimary: UIColor { return UIColor(named: #function)! } - static var backgroundSecondary: UIColor { return UIColor(named: #function)! } - static var button: UIColor { return UIColor(named: #function)! } - static var buttonPressed: UIColor { return UIColor(named: #function)! } - static var textPrimary: UIColor { return UIColor(named: #function)! } - static var textSecondary: UIColor { return UIColor(named: #function)! } - static var tint: UIColor { return UIColor(named: #function)! } +public extension UIColor { + static var backgroundPrimary: UIColor { UIColor(named: #function)! } + static var backgroundSecondary: UIColor { UIColor(named: #function)! } + static var button: UIColor { UIColor(named: #function)! } + static var buttonPressed: UIColor { UIColor(named: #function)! } + static var textPrimary: UIColor { UIColor(named: #function)! } + static var textSecondary: UIColor { UIColor(named: #function)! } + static var tint: UIColor { UIColor(named: #function)! } } diff --git a/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIFont+extension.swift b/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIFont+extension.swift index daaadb67..904d0b41 100644 --- a/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIFont+extension.swift +++ b/ExampleSwiftUI/ExampleSwiftUI/View/Common/UIFont+extension.swift @@ -9,7 +9,7 @@ import UIKit -extension UIFont { +public extension UIFont { static func largeTitle() -> UIFont { customFont("PTSans-Bold", size: 34.0, textStyle: .largeTitle, scaled: true) diff --git a/ExampleSwiftUI/figma-export.yaml b/ExampleSwiftUI/figma-export.yaml index 95ae7592..6af60754 100644 --- a/ExampleSwiftUI/figma-export.yaml +++ b/ExampleSwiftUI/figma-export.yaml @@ -17,6 +17,10 @@ common: # [optional] iOS export parameters ios: + # Path to xcodeproj + xcodeprojPath: "./ExampleSwiftUI.xcodeproj" + # Xcode Target containing resources and corresponding swift code + target: "ExampleSwiftUI" # Path to the Assets.xcassets directory xcassetsPath: "./ExampleSwiftUI/Resources/Assets.xcassets" # Is Assets.xcassets located in the main bundle? diff --git a/FigmaExport.podspec b/FigmaExport.podspec index 66f534a8..08d3d7b8 100644 --- a/FigmaExport.podspec +++ b/FigmaExport.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "FigmaExport" - spec.version = "0.12.0" + spec.version = "0.13.0" spec.summary = "Command line utility to export colors, typography, icons and images from Figma to Xcode / Android Studio project." spec.homepage = "https://github.com/RedMadRobot/figma-export" spec.license = { type: "MIT", file: "LICENSE" } diff --git a/Package.resolved b/Package.resolved index a309933c..a2cfb365 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,9 +1,18 @@ { "object": { "pins": [ + { + "package": "AEXML", + "repositoryURL": "https://github.com/tadija/AEXML", + "state": { + "branch": null, + "revision": "e4d517844dd03dac557e35d77a8e9ab438de91a6", + "version": "4.4.0" + } + }, { "package": "PathKit", - "repositoryURL": "https://github.com/kylef/PathKit.git", + "repositoryURL": "https://github.com/kylef/PathKit", "state": { "branch": null, "revision": "73f8e9dca9b7a3078cb79128217dc8f2e585a511", @@ -46,6 +55,24 @@ "version": "1.2.0" } }, + { + "package": "XcodeProj", + "repositoryURL": "https://github.com/tuist/XcodeProj.git", + "state": { + "branch": null, + "revision": "81bb2bb333eafa68f8ecd8187a4bb56d51e78e97", + "version": "7.14.0" + } + }, + { + "package": "XcodeProjCExt", + "repositoryURL": "https://github.com/tuist/XcodeProjCExt", + "state": { + "branch": null, + "revision": "21a510c225ff2bc83d5920a21d902af4b1e7e218", + "version": "0.1.0" + } + }, { "package": "Yams", "repositoryURL": "https://github.com/jpsim/Yams.git", diff --git a/Package.swift b/Package.swift index 2503a66c..330256e5 100644 --- a/Package.swift +++ b/Package.swift @@ -15,7 +15,8 @@ let package = Package( .package(url: "https://github.com/apple/swift-argument-parser", from: "0.0.1"), .package(url: "https://github.com/jpsim/Yams.git", from: "3.0.0"), .package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"), - .package(url: "https://github.com/stencilproject/Stencil.git", from: "0.14.0") + .package(url: "https://github.com/stencilproject/Stencil.git", from: "0.14.0"), + .package(url: "https://github.com/tuist/XcodeProj.git", from: "7.14.0") ], targets: [ @@ -27,6 +28,7 @@ let package = Package( "FigmaExportCore", "XcodeExport", "AndroidExport", + "XcodeProj", .product(name: "ArgumentParser", package: "swift-argument-parser"), .product(name: "Yams", package: "Yams"), .product(name: "Logging", package: "swift-log") @@ -44,7 +46,7 @@ let package = Package( name: "XcodeExport", dependencies: ["FigmaExportCore", "Stencil"] ), - + // Exports resources to Android project .target( name: "AndroidExport", diff --git a/README.md b/README.md index 63b610e4..2cb558d6 100644 --- a/README.md +++ b/README.md @@ -259,7 +259,6 @@ Run `fastlane sync_colors` to run FigmaExport. To export typography use `typography` argument: `./figma-export typography -i figma-export.yaml` -4. Add generated *.swift files to your Xcode project if your Xcode project doesn’t have these files. ### Arguments @@ -306,6 +305,10 @@ common: # [optional] iOS export parameters ios: + # Path to xcodeproj + xcodeprojPath: "./Example.xcodeproj" + # Xcode Target containing resources and corresponding swift code + target: "UIComponents" # Absolute or relative path to the Assets.xcassets directory xcassetsPath: "./Resources/Assets.xcassets" # Is Assets.xcassets located in the main bundle? @@ -373,6 +376,8 @@ android: * `figma.darkFileId` — (Optional) Id of the file containing dark color palette and dark images. ### iOS properties +* `ios.xcodeprojPath` — Relative or absolute path to .xcodeproj file +* `ios.target` — Xcode Target containing resources and corresponding swift code * `ios.xcassetsPath` — Relative or absolute path to directory `Assets.xcassets` where to export colors, icons and images. * `ios.xcassetsInMainBundle` — Is Assets.xcassets located in the main bundle? * `ios.colors.useColorAssets` — How to export colors? Use .xcassets and UIColor (useColorAssets = true) extension or extension only (useColorAssets = false) diff --git a/Release/figma-export.yaml b/Release/figma-export.yaml index 82df3ab1..27af5442 100644 --- a/Release/figma-export.yaml +++ b/Release/figma-export.yaml @@ -19,6 +19,8 @@ common: # [optional] iOS export parameters ios: + # Path to xcodeproj + xcodeprojPath: "./Example.xcodeproj" # Absolute or relative path to the Assets.xcassets directory xcassetsPath: "./Resources/Assets.xcassets" # Is Assets.xcassets located in the main bundle? diff --git a/Sources/FigmaExport/Input/Params.swift b/Sources/FigmaExport/Input/Params.swift index cb5a02ad..b6f09413 100644 --- a/Sources/FigmaExport/Input/Params.swift +++ b/Sources/FigmaExport/Input/Params.swift @@ -65,6 +65,8 @@ struct Params: Decodable { let labelsDirectory: URL? } + let xcodeprojPath: String + let target: String let xcassetsPath: URL let xcassetsInMainBundle: Bool let colors: Colors diff --git a/Sources/FigmaExport/Output/FileWritter.swift b/Sources/FigmaExport/Output/FileWritter.swift index 941e5026..af335f96 100644 --- a/Sources/FigmaExport/Output/FileWritter.swift +++ b/Sources/FigmaExport/Output/FileWritter.swift @@ -8,10 +8,9 @@ final class FileWritter { init(fileManager: FileManager = .default) { self.fileManager = fileManager } - + func write(files: [FileContents]) throws { try files.forEach { file in - let directoryURL = URL(fileURLWithPath: file.destination.directory.path) try fileManager.createDirectory(at: directoryURL, withIntermediateDirectories: true, attributes: nil) diff --git a/Sources/FigmaExport/Output/XcodeProjectWritter.swift b/Sources/FigmaExport/Output/XcodeProjectWritter.swift new file mode 100644 index 00000000..e75842bf --- /dev/null +++ b/Sources/FigmaExport/Output/XcodeProjectWritter.swift @@ -0,0 +1,82 @@ +import Foundation +import XcodeProj +import PathKit + +enum XcodeProjectWritterError: LocalizedError { + case unableToFindTarget(String) + + var errorDescription: String? { + switch self { + case .unableToFindTarget(let name): + return "Unable to find target \(name)" + } + } +} + +final class XcodeProjectWritter { + + let xcodeprojPath: Path + let rootPath = Path("./") + let xcodeproj: XcodeProj + let pbxproj: PBXProj + let myTarget: PBXTarget + let project: PBXProject + + init(xcodeProjPath: String, target: String) throws { + xcodeprojPath = Path(xcodeProjPath) + xcodeproj = try XcodeProj(path: xcodeprojPath) + pbxproj = xcodeproj.pbxproj + if let target = pbxproj.targets(named: target).first { + myTarget = target + } else { + throw XcodeProjectWritterError.unableToFindTarget(target) + } + project = pbxproj.projects.first! + } + + func addFileReferenceToXcodeProj(_ url: URL) throws { + var groups = url.pathComponents + .filter { $0 != "." } + .dropLast() as Array + + var currentGroup: PBXGroup? = project.mainGroup + var prevGroup: PBXGroup? = nil + + while currentGroup != nil { + if groups.isEmpty { break } + let group = currentGroup?.children.first(where: { group -> Bool in + group.path == groups.first + }) + if let group = group { + prevGroup = currentGroup + currentGroup = group as? PBXGroup + groups = Array(groups.dropFirst()) + } else { + prevGroup = currentGroup + let groupName = groups[0] + currentGroup = try prevGroup?.addGroup(named: groupName).first! + groups = Array(groups.dropFirst()) + } + } + + guard currentGroup?.file(named: url.lastPathComponent) == nil else { return } + + let newFile = try currentGroup?.addFile( + at: Path(url.path), + sourceTree: .group, + sourceRoot: rootPath, + override: false, + validatePresence: true) + newFile?.fileEncoding = 4 // UTF-8 + + if let file = newFile, let buildPhase = myTarget.buildPhases.first(where: { $0.buildPhase == .sources }) { + _ = try buildPhase.add(file: file) + } + + return + } + + func save() throws { + try xcodeproj.write(path: xcodeprojPath) + } +} diff --git a/Sources/FigmaExport/Subcommands/ExportColors.swift b/Sources/FigmaExport/Subcommands/ExportColors.swift index df375867..18bf4799 100644 --- a/Sources/FigmaExport/Subcommands/ExportColors.swift +++ b/Sources/FigmaExport/Subcommands/ExportColors.swift @@ -45,7 +45,7 @@ extension FigmaExportCommand { let colorPairs = try processor.process(light: colors.light, dark: colors.dark).get() logger.info("Exporting colors to Xcode project...") - try exportXcodeColors(colorPairs: colorPairs, iosParams: ios) + try exportXcodeColors(colorPairs: colorPairs, iosParams: ios, logger: logger) logger.info("Done!") } @@ -66,7 +66,7 @@ extension FigmaExportCommand { } } - private func exportXcodeColors(colorPairs: [AssetPair], iosParams: Params.iOS) throws { + private func exportXcodeColors(colorPairs: [AssetPair], iosParams: Params.iOS, logger: Logger) throws { var colorsURL: URL? = nil if iosParams.colors.useColorAssets { if let folder = iosParams.colors.assetsFolder { @@ -90,6 +90,18 @@ extension FigmaExportCommand { } try fileWritter.write(files: files) + + do { + let xcodeProject = try XcodeProjectWritter(xcodeProjPath: iosParams.xcodeprojPath, target: iosParams.target) + try files.forEach { file in + if file.destination.file.pathExtension == "swift" { + try xcodeProject.addFileReferenceToXcodeProj(file.destination.url) + } + } + try xcodeProject.save() + } catch { + logger.error("Unable to add some file references to Xcode project") + } } private func exportAndroidColors(colorPairs: [AssetPair], androidParams: Params.Android) throws { diff --git a/Sources/FigmaExport/Subcommands/ExportIcons.swift b/Sources/FigmaExport/Subcommands/ExportIcons.swift index 8aca6568..c75089a6 100644 --- a/Sources/FigmaExport/Subcommands/ExportIcons.swift +++ b/Sources/FigmaExport/Subcommands/ExportIcons.swift @@ -78,6 +78,18 @@ extension FigmaExportCommand { logger.info("Writting files to Xcode project...") try fileWritter.write(files: localFiles) + do { + let xcodeProject = try XcodeProjectWritter(xcodeProjPath: ios.xcodeprojPath, target: ios.target) + try localFiles.forEach { file in + if file.destination.file.pathExtension == "swift" { + try xcodeProject.addFileReferenceToXcodeProj(file.destination.url) + } + } + try xcodeProject.save() + } catch { + logger.error("Unable to add some file references to Xcode project") + } + logger.info("Done!") } diff --git a/Sources/FigmaExport/Subcommands/ExportImages.swift b/Sources/FigmaExport/Subcommands/ExportImages.swift index 1ff5c7d6..b1857b6e 100644 --- a/Sources/FigmaExport/Subcommands/ExportImages.swift +++ b/Sources/FigmaExport/Subcommands/ExportImages.swift @@ -77,6 +77,18 @@ extension FigmaExportCommand { logger.info("Writting files to Xcode project...") try fileWritter.write(files: localFiles) + do { + let xcodeProject = try XcodeProjectWritter(xcodeProjPath: ios.xcodeprojPath, target: ios.target) + try localFiles.forEach { file in + if file.destination.file.pathExtension == "swift" { + try xcodeProject.addFileReferenceToXcodeProj(file.destination.url) + } + } + try xcodeProject.save() + } catch { + logger.error("Unable to add some file references to Xcode project") + } + logger.info("Done!") } diff --git a/Sources/FigmaExport/Subcommands/ExportTypography.swift b/Sources/FigmaExport/Subcommands/ExportTypography.swift index 0f3c06ea..50f72f20 100644 --- a/Sources/FigmaExport/Subcommands/ExportTypography.swift +++ b/Sources/FigmaExport/Subcommands/ExportTypography.swift @@ -74,10 +74,17 @@ extension FigmaExportCommand { } try fileWritter.write(files: files) - files.forEach { - logger.notice("File \($0.destination.file) saved to directory \($0.destination.directory)") + do { + let xcodeProject = try XcodeProjectWritter(xcodeProjPath: iosParams.xcodeprojPath, target: iosParams.target) + try files.forEach { file in + if file.destination.file.pathExtension == "swift" { + try xcodeProject.addFileReferenceToXcodeProj(file.destination.url) + } + } + try xcodeProject.save() + } catch { + logger.error("Unable to add some file references to Xcode project") } - logger.notice("Add referenece to these files in your Xcode project manually using drag&drop.") } } }