yonaskolb / yonaskolb/XcodeGen

file path issue when using infoplist file

Open
#1,584 0 comments 0 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

It is a little complicated. My project structure is shown as follow:

  • repo root dir
    • source files dir
      • code dir1
        • Info.plist
      • code dir2
      • ...
    • prjcect files dir
      • xxx.xcodeproj
      • xxx.xcworkspace
      • Podfile
      • Pods
    • project.yml

When i configurated in project.yml file as follow:

targets:
  Example:
    type: application
    sources:
        - path: source files dir/code dir1
          excludes: [Info.plist]
        - path: source files dir/code dir1/Info.plist
          buildPhase: none
    info:
      path: ${PROJECT_DIR}/../source files dir/code dir1/Info.plist  // s1
      path: ../source files dir/code dir1/Info.plist  // s2

Using s1, it creates a directory called ${PROJECT_DIR} in repo root dir. And ${PROJECT_DIR} is empty.
Using s2, it creates a directory in the parent directory of the repo root dir directory which contains the Info.plist file.

Both these 2 ways are weird and do not meets my expectations.

Is this intentional or a bug?

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 with the project.yml paths shown in the report and trace how XcodeGen resolves the info.path value relative to the repository and project directories. Reproduce both ${PROJECT_DIR}/... and ../... cases with the described layout, then verify that the generated project references the existing Info.plist without creating unexpected directories.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.