I’m making a document-based Mac app. Each document type needs to be listed in the Info.plist. I changed the info.plist argument to Target to the extension specification, then dumped the dictionary right at the argument location. Since the input can be long, I originally had separate variables for each document type, but tuist generate gave compile-time errors.
Hey,
It would be helpful if you included code snippets of what you tried to do and what didn’t work.
These brief descriptions/questions make it difficult for us to provide suggestions, wasting both your and our time.
I had to put the extra Info.plist directly into the Project initializer:
let project = Project(
name: “SAMPLE”,
targets: [
.target(
name: “SAMPLE”,
destinations: .macOS,
product: .app,
bundleId: productId,
infoPlist: .extendingDefault(with: [
“UTImportedTypeDeclarations”: .array([
.dictionary([
“UTTypeDescription”: .string(“Internet Message”),
“UTTypeIdentifier”: .string(“public.email-message”),
“UTTypeConformsTo”: .array([
.string(“public.message”)
]),
I couldn’t spread the data through separate variables:
let imports: [String: Plist.Value] = [
“UTImportedTypeDeclarations”: .array([
.dictionary([
“UTTypeDescription”: .string(“Internet Message”),
//...
// Later use
let project = Project(
name: “SAMPLE”,
targets: [
.target(
name: “SAMPLE”,
destinations: .macOS,
product: .app,
bundleId: productId,
infoPlist: .extendingDefault(with: [imports])
//...