Making a (Mac) document-based app requires listing the supported file types into the Info.plist. The first two attempts resulted in the data get obliterated by the next “tuist generate.” There is an option in the Target initializer to extend an Info.plist; it was tedious trying that even once because the values need to be wrapped in an enum. (Is there a result builder?) Any other ways?
Hi @CTMacUser
Note that Target.infoPlist can also point to the Info.plist in the file-system such that you can modify the values through Xcode’s UI:
let target = Target(name: "MyApp", infoPlist: .file(path: "Info.plist")
I’d suggest to try that.
Will this add to the default values, or completely replace the default values? And where do I store the file so it won’t get purged?
In your example above, what is the base directory, the one with Project.swift?
Once you point to a .plist file, you own it. Where to place those files is your decision, and your Tuist-defined project just has a reference to them. So from the perspective of what those files mean and how they are updated, nothing changes between using vanilla Xcode projects or Tuist-generated projects.
The path is relative to the directory containing the manifest Project.swift file.