Skip to content

0.11.0

Choose a tag to compare

@mozharovsky mozharovsky released this 12 Jul 00:00
· 23 commits to main since this release
d2affb1

Added

  • expandBuildSettingReferences(value, lookup) — evaluates Xcode's $(NAME) and ${NAME} build-setting reference syntax in a value through a caller-supplied lookup. Substituted text expands recursively, reference names may themselves contain references ($(SETTING_$(VARIANT)), resolved innermost first), and cycles stay finite. A lookup answer of undefined leaves the reference verbatim, so partial resolution loses no information, while an empty string expands to nothing the way Xcode treats empty settings. The : operators are honored for lower, upper, rfc1034identifier, c99extidentifier, and default=, and a reference carrying any other operator stays verbatim rather than expanding to a wrongly transformed value. The supported operator names ship as the BuildSettingOperator union.
  • Target.resolveBuildSetting(key, options?) — reads a setting through the same layers as getBuildSetting (target settings, target xcconfig, project settings, project xcconfig) and expands the references in it. Referenced settings resolve through the full chain, $(inherited) and a setting referencing itself continue from the next layer down the way Xcode composes values, and $(TARGET_NAME) falls back to the target's name, so the template's PRODUCT_NAME = "$(TARGET_NAME)" and imported projects' com.example.$(PRODUCT_NAME:rfc1034identifier) bundle identifiers resolve with zero setup. An optional lookup answers references the document cannot, such as $(BUILT_PRODUCTS_DIR).

Full Changelog: 0.10.0...0.11.0