./CocoaLoco generate ~/Resources/LocalizableStrings.json ~/Resources/Output --objc --public --prefix "Base" --bundleName "hudlCapture"
inputURL
of the json file to process.outputURL
, a directory where the output files should go.--objc
is optional, and will generate Objective-C compatibility--public
is optional, and will make the code public
.--prefix <prefix>
will prefix all the files, as well as the files struct / enum names with the provided prefix.--bundleName <name>
, if you have a static extension on Bundle
that provides a bundle, use it's name here. Providing hudlCapture
will result in the code Bundle.hudlCapture
as the internal bundle for loading the strings.To generate the xcodeproj file, use
swift package generate-xcodeproj
Then you can open CocoaLoco.xcodeproj
. Tests won't be passing yet though, because SPM doesn't support resources. You will need to follow the below steps to get your resources added. It doesn't take long.
Tests should be passing now!
swift build -c release -Xswiftc "-target" -Xswiftc "x86_64-apple-macosx10.14"
It will build to .build/x86_64-apple-macosx/release/CocoaLoco
. That's your binary!
Eventually this should be distributed through SPM or CocoaPods, but for now we're just floating binaries.
link |
Stars: 0 |
Last commit: 1 year ago |
If you have a \n
in your string, it'll actually work now.
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics