How to enable capability with Tuist iOS

1.2k Views Asked by At

I use this tool "Tuist" (https://tuist.io) to generate Xcode project. With Tuist we can't edit any settings through Xcode directly. How to enable background mode/notification capability with Tuist

1

There are 1 best solutions below

0
On

Using tuist means getting rid of the need of maintaining .xcodeproj manually. All relevant settings are defined in the tuist configuration, and by running tuist generate, the related .xcodeproj will be generated.

To apply Info.plist changes (the capabilities are defined there), you have to set up a InfoPlist dictionary of [String : InfoPlist.Value], and herein, you define whatever you want. For background modes, this is - as an example - "UIBackgroundModes": ["fetch", "remote-notification", "remove-notification"]. Then, you take that InfoPlist definition and provide it to a Targetof a Project, that's it.

The tuist documentation shows the syntax of the available configuration options, as well as some examples. You may want to have a look on medium.com, there are some more articles about working with tuist in practice. (I've written one there about creating a workspace with a main app and various module frameworks.)