You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm setting up a project where there is a set of project configurations that create different product flavors. In my case, depending on the target API. The structure is that Project defines configurations that define base settings for each product flavor. These should contain different BundleIDs to make them distinguishable on install.
However, Target object's bundleID parameter is mandatory and upon tuist generate, the mandatory (single) bundleID supersets the desired flavors bundleIDs.
To resolve this situation and define multiple bundleIDs in a single target (one per config) you have to duplicate code and create some confussion pasing a bundleID to the Target although it'll never be used, because you'll have to write something like:
note that settings have to be passed twice (one at Project and other at Target levels, making the target passed bundleId irrelevant, as it'll be superseded by the settings ones.
Potential solution
I found 2 possible approaches that could be taken here
Make bundleID an optional parameter at target level
This would mean that we don't require setting BundleID at target level, but I am not sure of the implications at project generation level, in the case of caching and setting the project I assume there may be some nasty consequences.
Type BundleID parameter and give a static .notDefined
This would mean that bundleID would be a typed citizen of tuist so that you can interop with String literals, but also provide background value to the type like parallel UID for the project that we may need for other generation/caching needs.
I fond the first option to be the best one as it is the one the provides the best flexibility and provides the most transparent platform experience as you'll operate it as you do with your project info plist files.
macOS version
13.4
Tuist version
3.20.0
Xcode version
14.3
The text was updated successfully, but these errors were encountered:
What problem or need do you have?
Current Situation
I'm setting up a project where there is a set of project configurations that create different product flavors. In my case, depending on the target API. The structure is that Project defines configurations that define base settings for each product flavor. These should contain different BundleIDs to make them distinguishable on install.
However,
Target
object's bundleID parameter is mandatory and upontuist generate
, the mandatory (single) bundleID supersets the desired flavors bundleIDs.To resolve this situation and define multiple bundleIDs in a single target (one per config) you have to duplicate code and create some confussion pasing a bundleID to the Target although it'll never be used, because you'll have to write something like:
note that settings have to be passed twice (one at
Project
and other atTarget
levels, making the target passed bundleId irrelevant, as it'll be superseded by the settings ones.Potential solution
I found 2 possible approaches that could be taken here
Make bundleID an optional parameter at target level
This would mean that we don't require setting BundleID at target level, but I am not sure of the implications at project generation level, in the case of caching and setting the project I assume there may be some nasty consequences.
Type BundleID parameter and give a static .notDefined
This would mean that bundleID would be a typed citizen of tuist so that you can interop with String literals, but also provide background value to the type like parallel UID for the project that we may need for other generation/caching needs.
I fond the first option to be the best one as it is the one the provides the best flexibility and provides the most transparent platform experience as you'll operate it as you do with your project info plist files.
macOS version
13.4
Tuist version
3.20.0
Xcode version
14.3
The text was updated successfully, but these errors were encountered: