Killianoni
Killianoni

Reputation: 9

Generate objective-c string literal with Tuist

I'd like to use Tuist and SwiftGen to generate Localizable strings that are also available for Objective-C.

When I generate my TuistStrings+{name}.strings files they contain what is written in my strings stencil, so I think I did something wrong.

Here is my configuration in the Project.swift in Manifests

let project = Project(
    name: "{name}", 
    organizationName: "{name}", 
    settings: .settings(
        configurations: Configuration.{name}Configuration(basic: true)
    ), 
    targets: targets, 
    schemes: schemes, 
    resourceSynthesizers: [
        .strings(), 
        .assets()
    ]
)

I've tested to use this in my stencil

strings: inputs: path/to/Localizable.strings outputs: - templateName: objc-h output: Localizable.h - templateName: objc-m output: Localizable.m

My workspace

I've tried to rename my stencil to Assets.stencil and it does the same thing to my TuistAssets file.

Upvotes: 1

Views: 180

Answers (0)

Related Questions