yonaskolb / yonaskolb/XcodeGen

TARGETED_DEVICE_FAMILY set to 1,2 when specified 1

Open
#1,304 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
8.8k
Forks
908
Avg merge
17d 14h
Merged PRs (30d)
2

Description

This doesn't work:

settings:
  base:
    CLIENT: XXX
    IPHONEOS_DEPLOYMENT_TARGET: '15,0'
    SWIFT_VERSION: '5.7'
    TARGETED_DEVICE_FAMILY: 1
  configs:
    Debug:
      GCC_C_LANGUAGE_STANDARD: gnu99
      SDKROOT: iphoneos
      SWIFT_ACTIVE_COMPILATION_CONDITIONS: DEBUG
      SERVER: DEV
    Fastlane:
      SDKROOT: iphoneos
      SERVER: PROD
    Release:
      SDKROOT: iphoneos
      SERVER: PROD
      
targets:
  ContentApp:
    templates:
      - Scripts
      - DefaulConfig
    dependencies:
      - sdk: Foundation.framework
    platform: iOS
    type: application
    settings:
      base:
        PRODUCT_NAME: XXX
        PRODUCT_BUNDLE_IDENTIFIER: com.xxx.$(CLIENT)

If I move the TARGETED_DEVICE_FAMILY into the Targets settings:base it works like expected..
my understanding is that the settings should be additive.. so if nothing is in the Target group it should take from the settings at top

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported YAML configuration and compare the generated Xcode project when TARGETED_DEVICE_FAMILY is under settings.base versus targets.ContentApp.settings.base. Trace how settings are inherited or merged, then verify that the target receives the top-level value when it does not define one itself.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift, yaml
Domain
build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.