Skip to content

Instantly share code, notes, and snippets.

@alvarhansen
Created October 9, 2023 12:47
Show Gist options
  • Save alvarhansen/fb248ad825ce88358b3e9d2334be2794 to your computer and use it in GitHub Desktop.
Save alvarhansen/fb248ad825ce88358b3e9d2334be2794 to your computer and use it in GitHub Desktop.
OTHER_SWIFT_FLAGS_ENABLE_PREVIEWS_YES = "-DENABLE_PREVIEWS"
OTHER_SWIFT_FLAGS_ENABLE_PREVIEWS_NO = ""
OTHER_SWIFT_FLAGS_ENABLE_PREVIEWS = $(OTHER_SWIFT_FLAGS_ENABLE_PREVIEWS_$(ENABLE_PREVIEWS))

Cool. But not usable as Xcode editor does set ENABLE_PREVIEWS build flag, so all errors are missing in editor, which makes it hard to use.

In theory, could be useful when you want to exclude something during debug build that is not in active preview.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment