2250 Commits

Author SHA1 Message Date
Yonas Kolb 3e6e5e3878 Fix makePathRelative using wrong base path when projectDirectory differs (#1608)
* Fix makePathRelative using wrong base path when projectDirectory differs (#1606)

`makePathRelative` used `project.basePath` to compute parent paths, while
`resolveGroupPath` used `projectDirectory ?? project.basePath`. When these
differ (e.g. via --project flag), intermediate group paths become inconsistent,
causing Xcode to resolve files to the wrong location.

Regression from #1596 which added the `makePathRelative` call in the
`createIntermediateGroups` code path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Extract basePath computed property in SourceGenerator

Consolidates `projectDirectory ?? project.basePath` into a single
`basePath` property to prevent future mismatches between path resolution
call sites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:06:43 +11:00
Yonas Kolb 90dfa9da31 Update to 2.45.3 2.45.3 2026-03-11 00:47:41 +11:00
Yonas Kolb 8cfdf30a9f Fix folder source PBXFileReference path regression with createIntermediateGroups (#1605)
Skip makePathRelative for folder-type sources since they use sourceTree
.sourceRoot and need the full project-relative path preserved. The call
was inadvertently added for all source types in #1596 but only synced
folders (.syncedFolder) need it.

Fixes #1603
2026-03-11 00:44:51 +11:00
Bruno Coelho acd366f089 Fix issue 1602 - Synced folders: includes silently ignored + no deduplication across targets (#1604)
* Fix issue 1602 - Synced folders: includes silently ignored + no deduplication across targets

* Add more tests
2026-03-10 10:25:07 +11:00
Yonas Kolb 311483139c Update to 2.45.2 2.45.2 2026-03-05 22:13:01 +11:00
Hg Q. 6d74ca6920 chore(docs): add external link to SwiftUI Multi-platform example (#1588) 2026-03-05 22:12:34 +11:00
Yonas Kolb 25841ee60d Validate empty source paths to prevent project root inclusion (#1601)
* Add .context to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Validate empty source paths to prevent project root inclusion (#1595)

Empty/null source entries (e.g. bare `-` in YAML) resolve to the project
root, causing extreme memory usage. Add validation to reject them with a
clear error message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 17:07:57 +11:00
Ruslan Silimir 50eb268b7d Fix missing productRefGroup in generated projects (#1591)
* Fix missing productRefGroup in generated projects

* Update CHANGELOG

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2026-03-05 17:00:21 +11:00
Yonas Kolb 52f91e9489 update release.md 2026-03-05 16:49:02 +11:00
Yonas Kolb ebdfff90d3 Update to 2.45.1 2.45.1 2026-03-05 16:46:35 +11:00
Yonas Kolb 3baf4337c1 Add .icon folder support for IconComposer (#1600) 2026-03-05 16:44:04 +11:00
Yonas Kolb 8045fc5d0b Update to 2.45.0 2.45.0 2026-03-05 13:55:35 +11:00
Vasily Anisimov decc743795 Added ProjectFormat enum with specific for each version fields (#1566)
* Added ProjectFormat enum with specific for each version fields

* Added ability to specify project format version via `projectFormat` option

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2026-03-05 13:46:56 +11:00
Max Seelemann 167d11998a Various synced folder enhancements (#1596)
* Add explicitFolders support to syncedFolder

Adds an `explicitFolders` property to `TargetSource` that is expanded from Glob patterns and passed through to `PBXFileSystemSynchronizedRootGroup`.

* Fix syncedFolder sources ignoring createIntermediateGroups

When createIntermediateGroups was enabled and a syncedFolder source had a
multi-component path (e.g. SyncedParent/SyncedChild), two things went wrong:

1. The synced folder was unconditionally added to rootGroups, causing it
   to appear both at the project root and inside the correct intermediate
   parent group.

2. The synced folder kept its full project-relative path instead of being
   made relative to its parent group, so Xcode concatenated them into a
   wrong path (e.g. SyncedParent/SyncedParent/SyncedChild).

* Enhance PBXFileElement to recognize synced folders as groups that can be sorted

* Fix membership exceptions for nested synced folder with intermediate groups

* Update Changelog
2026-03-05 13:22:29 +11:00
Max Seelemann 4c3d55813b Fix supportedDestinations presets being injected when settingPresets is none (#1599)
Gate the supportedDestinations YAML preset block inside the applyTarget check so that settingPresets: none (and project) suppresses Catalyst-related settings (SUPPORTS_MACCATALYST, SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD, SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD) that were previously always injected.

Fixes #1598
2026-03-05 12:22:29 +11:00
mirkokg a0afcefaed Handle membership exceptions for synchronized root groups (#1587)
* Handle membership exceptions for synchronized root groups

Adds logic to detect and register membership exceptions for PBXFileSystemSynchronizedRootGroup objects, specifically excluding Info.plist files from group membership when necessary. Also ensures resources build phase is added if synchronized root groups are present.

* Refactor synced folder membership exceptions with glob support

Extract configureMembershipExceptions into its own method, use Set for
dedup, resolve excludes via glob expansion, and add a no-op test case.
Incorporates glob support and tests from macguru@baf1108.

* Update UUID

* Comment out excludes in project.yml

Comment out excludes for ExcludedFile.swift due to CI issue.

* Clean up project.pbxproj by removing exception set

Removed PBXFileSystemSynchronizedBuildFileExceptionSet section and its references.

* Remove comment

* Update SourceGeneratorTests.swift

* Update project.pbxproj

* Retrigger CI

* Add info.plist exclusion
2026-03-04 08:22:27 +11:00
Yonas Kolb a904543801 update to xcodeproj 9.10.1 (#1597) 2026-03-03 22:43:05 +11:00
Yonas Kolb 140cd5ee65 Fix CI: add explicit xcodebuild destinations and update Xcode matrix (#1594)
- Add explicit -destination flags to build.sh — newer Xcode versions no
  longer auto-select a build destination, causing "Found no destinations
  for the scheme" errors
- Update CI matrix to Xcode 16.4 and 26.2 — Xcode 16.0-16.3 simulator
  runtimes are no longer installed on the macos-15 runner image
- Add PRODUCT_BUNDLE_IDENTIFIER to ExternalTarget fixture — Xcode 26.x
  requires a bundle identifier for embedded frameworks

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:57:14 +11:00
George Navarro d35562f4ab Update ArtifactBundleGen to 0.0.8 (#1570) 2025-07-25 13:27:54 +10:00
Yonas Kolb 21ac9944b0 Update to 2.44.1 2.44.1 2025-07-22 19:29:49 +10:00
Roman Podymov 8b3a68319b Handle major.minor for SPM (#1546)
* Custom error handler

* Check for error reason and expected type

* Improvements

* Update CHANGELOG.md

* Update master (#1)

* Update CI equipments and drop Xcode 15 support (#1548)

* Add validation to ensure that settings.configs values are dictionaries, in order to prevent misuse (#1547)

* Add validation to ensure settings.configs values are dictionaries to prevent misuse

* Add tests for invalid settings.configs value formats

* Replaced with filter and split into a function

* Rename invalidConfigsFormat to invalidConfigsMappingFormat

* Add comments to explain invalid  fixture

* Rename test fixture

* Update CHANGELOG.md

* Correct grammer

* Use KeyPath instead of closure

* Rename validateMappingStyleInConfig to extractValidConfigs

* Add a document comment for extractValidConfigs(from:)

* Use old testing api and remove EquatableErrorBox

* Rename test case to use "mapping" instead of "dictionary"

* Add ValidSettingsExtractor to encapsulate the logic for converting a dictionary to Settings

* Add settings validation for both Target and AggregateTarget

* Add tests for invalid settings.configs in Target and AggregateTarget

* Add document comments for ValidSettingsExtractor

* Rename ValidSettingsExtractor to BuildSettingsExtractor

* Add settings validation for settingGroups

* Add tests for settingGroups

* Rename extract to parse

* Refactor

* Update Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Synced folders (#1541)

* update xcodeproj to 8.27.7

* add syncedFolder source type

* drop xcode 15 support

* Rely on fileReference instead of adding new synchronizedRootGroup (#1557)

* fix: don't include untracked children in cache

---------

Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>

* Use USER env var instead of LOGNAME (#1559)

During user switch with su/sudo in system LOGNAME may not be initialised, but USER env var is always exist.

* Address Sanitizer options in run/test schemes (#1550)

* Expose address sanitizer flags in run and test BuildActions in Schemes

* Update testJSONEncodable to test the new fields

* Also test the asan setting values for run scheme

* Update changelog

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>

* Update to 2.44.0

# Conflicts:
#	CHANGELOG.md

---------

Co-authored-by: Kohki Miki <giginet.net@gmail.com>
Co-authored-by: Ryu <87907656+Ryu0118@users.noreply.github.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
Co-authored-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
Co-authored-by: Himanshu Kumar <7786778+hi-kumar@users.noreply.github.com>

* Revert

* Refactoring started

* func json(atKeyPath keyPath: String) -> String?

* All cases

---------

Co-authored-by: Kohki Miki <giginet.net@gmail.com>
Co-authored-by: Ryu <87907656+Ryu0118@users.noreply.github.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
Co-authored-by: Kanstantsin Shautsou <kanstantsin.sha@gmail.com>
Co-authored-by: Himanshu Kumar <7786778+hi-kumar@users.noreply.github.com>
2025-07-22 19:21:49 +10:00
George Navarro 3251691527 Feature: Custom Working Directory (#1543)
* Added `customWorkingDirectory` and `useCustomWorkingDirectory` properties to `Scheme.Run`

* Use new `customWorkingDirectory` and `useCustomWorkingDirectory` when generating `XCScheme.LaunchAction`

* Updated ProjectSpec.md to document new `customWorkingDirectory` and `useCustomWorkingDirectory` properties

* Fix for not setting customWorkingDirectory in the toJSONValue function

* Added test to make sure usCustomWorkingDirectory value is true when the customWorkingDirectory is set to non nil

* Change to infer the value of SchemaGenerator.LaunchAction.useCustomWorkingDirectory based on the value of Schema.Run.customWorkingDirectory

* Removed useCustomWorkingDirectory from the project spec now that it is no longer user defined.
2025-07-22 19:16:05 +10:00
jakobfelsatdm a1c7544271 set correct version for xcode 16 (#1563)
* set correct version for xcode 16

see: https://github.com/CocoaPods/Xcodeproj/blob/master/lib/xcodeproj/constants.rb#L134

* update test fixtures

---------

Co-authored-by: Fels, Jakob <fels.jakob@gmail.com>
2025-07-22 19:14:34 +10:00
Craig Siemens fa7358b6fc Map parallelizable true to parallelization all to match the behaviour from Xcodeproj 8.24.3 (#1565) 2025-07-22 13:47:04 +10:00
Yonas Kolb a19bbe4791 Update to 2.44.0
# Conflicts:
#	CHANGELOG.md
2.44.0
2025-07-17 15:48:46 +10:00
Himanshu Kumar ae42dd5b19 Address Sanitizer options in run/test schemes (#1550)
* Expose address sanitizer flags in run and test BuildActions in Schemes

* Update testJSONEncodable to test the new fields

* Also test the asan setting values for run scheme

* Update changelog

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2025-07-17 15:48:00 +10:00
Kanstantsin Shautsou 38d76e7fa1 Use USER env var instead of LOGNAME (#1559)
During user switch with su/sudo in system LOGNAME may not be initialised, but USER env var is always exist.
2025-07-17 15:30:32 +10:00
Yonas Kolb c32aa4cc94 Synced folders (#1541)
* update xcodeproj to 8.27.7

* add syncedFolder source type

* drop xcode 15 support

* Rely on fileReference instead of adding new synchronizedRootGroup (#1557)

* fix: don't include untracked children in cache

---------

Co-authored-by: Kirill Yakimovich <kirill.yakimovich@gmail.com>
2025-07-17 15:15:43 +10:00
Ryu 53cb43cb66 Add validation to ensure that settings.configs values are dictionaries, in order to prevent misuse (#1547)
* Add validation to ensure settings.configs values are dictionaries to prevent misuse

* Add tests for invalid settings.configs value formats

* Replaced with filter and split into a function

* Rename invalidConfigsFormat to invalidConfigsMappingFormat

* Add comments to explain invalid  fixture

* Rename test fixture

* Update CHANGELOG.md

* Correct grammer

* Use KeyPath instead of closure

* Rename validateMappingStyleInConfig to extractValidConfigs

* Add a document comment for extractValidConfigs(from:)

* Use old testing api and remove EquatableErrorBox

* Rename test case to use "mapping" instead of "dictionary"

* Add ValidSettingsExtractor to encapsulate the logic for converting a dictionary to Settings

* Add settings validation for both Target and AggregateTarget

* Add tests for invalid settings.configs in Target and AggregateTarget

* Add document comments for ValidSettingsExtractor

* Rename ValidSettingsExtractor to BuildSettingsExtractor

* Add settings validation for settingGroups

* Add tests for settingGroups

* Rename extract to parse

* Refactor

* Update Tests/ProjectSpecTests/InvalidConfigsFormatTests.swift

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2025-06-07 00:23:21 +10:00
Kohki Miki 2b933a94ec Update CI equipments and drop Xcode 15 support (#1548) 2025-05-20 11:12:25 +09:00
Yonas Kolb 7193eb447a Update to 2.43.0 2.43.0 2025-04-15 22:49:48 +10:00
Yonas Kolb 490ee83b59 update changelog 2025-04-06 19:53:42 +10:00
Marcos Griselli 172a494704 Update Xcodeproj to 8.24.3 (#1515)
* Update Xcodeproj to 8.24.3

* Bump macOS version

* maintain support for removed gpuValidationMode enum

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2025-04-06 19:50:09 +10:00
Shaun Harrison 26de8f1c9b Support relative paths for fileGroups in includes (#1534) 2025-04-05 16:10:18 +11:00
Yonas Kolb 9e8343b1a6 fix ci (#1537)
* remove carthage from building test project

* get test fixture compiling
2025-04-05 14:46:41 +11:00
Kohki Miki 6c94e2975f Support Xcode 15.4 and Xcode 16.0 Beta on GitHub Action (#1493)
* Support Xcode 16 on GitHub Action

* Fix Xcode version

* provide GITHUB_ACCESS_TOKEN for carthage

---------

Co-authored-by: Kohki Miki <kohki.miki@linecorp.com>
Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2025-02-17 22:40:58 +11:00
Yonas Kolb 9acab4a54e fix test failure when run from through Xcode 2025-02-17 22:03:51 +11:00
Vakhid Betrakhmadov 68b0d1206f Support preferred screen capture format in scheme test action (#1450)
* Support preferred screen capture format in scheme test action (resolves #1443)

* preferredScreenCaptureFormat decoding test

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2025-02-17 17:07:29 +11:00
Alexandr Goncharov d1d04e8e63 Update package version (#1489)
* Require swift tools version 5.9

* Update changelog

* Use github workflow

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2025-02-17 16:29:25 +11:00
Yonas Kolb 05c36c39fe fix package init 2025-02-17 16:18:41 +11:00
Maxim Krouk 434dfeca2e Add excludeFromProject option for local packages (#1512) 2025-02-17 16:08:54 +11:00
Steven Sheldon b1e03f0f46 Fix checking optional group existence relative to the working dir (#1529) 2025-02-17 16:01:59 +11:00
Ilja Iwas 2f1fbf2a91 add rule to copy app extensions ('.appex') to product's Plugins directory (#1531) 2025-02-17 15:52:50 +11:00
Juri Pakaste 5644662e5b Respect relativePaths in local package paths (#1498)
* Respect relativePaths in local package paths

Before this a local package defined in an included file would not
respect relativePaths: true.

This fixes #1497.

* Test local package with relative path

* add relative paths support to localPackages syntax

---------

Co-authored-by: Yonas Kolb <yonaskolb@users.noreply.github.com>
2024-12-30 00:41:41 +11:00
Marcos Griselli 1aa7e281b7 Fix Swift 6 warnings (#1513) 2024-12-29 15:57:28 +11:00
Zewu Chen 681e320867 Add improvement of performance in SpecValidation on validateSettings (#1522) 2024-12-29 15:19:06 +11:00
Dale 126339f1c8 Run preGenCommand before checking the cache (#1519)
The preGenCommand may generate files, change paths, etc. If we run this after checking the cache, it never gets the chance to run if the cache hasn't changed. Running it before checking the cache lets us make these changes and _then_ we can check the cache to see if we need to regenerate or not.

Co-authored-by: Dale Myers <dalemyers@microsoft.com>
2024-12-03 08:44:05 +11:00
Marcos Griselli a51a548a83 Skip failing test on Linux until upstream fix (#1517)
* Skip failing test on Linux

* Skip more tests

* Skip more tests

* One more skip
2024-10-27 20:34:50 +11:00
Simon B. Støvring 2cf88e8088 Runs pre-gen command before validating project (#1500) 2024-09-12 11:33:30 +10:00
Gio Lodi d5656b6e40 Fix typo "suger" -> "sugar" (#1499)
Love the tool. Noticed a little typo in the docs. Thanks!
2024-08-29 20:54:35 +10:00