SwiftGen / SwiftGen

The Swift code generator for your assets, storyboards, Localizable.strings, … — Get rid of all String-based APIs!
MIT License
9.27k stars 737 forks source link

SwiftGen - "You need to choose EITHER a named template OR a template path. Found name 'swift4' and path '' #351

Closed sheinix closed 7 years ago

sheinix commented 7 years ago

I get the following error when running the SwiftGen build phase.

You need to choose EITHER a named template OR a template path. Found name 'swift4' and path ''

My build phase script:

`$PODS_ROOT/SwiftGen/bin/swiftgen xcassets -t swift4 "$PROJECT_DIR/MyProject/Assets.xcassets" --output "$PROJECT_DIR/MyProject/Images.swift"

$PODS_ROOT/SwiftGen/bin/swiftgen strings -t structured-swift4 "$PROJECT_DIR/MyProject/en.lproj/Localizable.strings" --output "$PROJECT_DIR/MyProject/Localized.swift"

$PODS_ROOT/SwiftGen/bin/swiftgen fonts -t swift4 "$PROJECT_DIR/MyProject/Fonts" --output "$PROJECT_DIR/MyProject/MAFonts.swift"`

It isn't working for any template.

AliSoftware commented 7 years ago

Thx for the bug report!

This has JUST been fixed today, and released 5.2.1 a few minutes ago (https://github.com/SwiftGen/SwiftGen/issues/346#issuecomment-338982640)

See duplicate issue #346 : CocoaPods & GitHub release are already available, Homebrew release is pending validation by someone from Homebrew

sheinix commented 7 years ago

Thanks!. I've just updated the pod in my case and worked again.

Solved.

AliSoftware commented 7 years ago

Cool, thanks for the feedback 👍