You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support StoreKit Configuration setting in xcscheme Run action (#3245)
Fixes#3130.
Redoes #3182 (and potentially fixes unresolved comments on #3185).
The StoreKit Testing configuration file has a peculiar requirement that
has no precedent in the rules. The file's path in the scheme must be
relative to the `xcshareddata/xcschemes` directory the scheme is under,
not the scheme itself (so one level shallower than you'd expect). Making
the path relative to the project fails, and making it absolute crashes
Xcode.
A prior iteration of this PR attempted to relativize the path in
Starlark, but exposed some safety shortcomings. In knowing the absolute
path of both the scheme directory and the configuration file, doing this
work in the generator gives us slightly improved safety guarantees at
the cost of performance. To this author, there is too much ambiguity
between the paths of either location without this information, since the
files can potentially exist in independent file trees under a workspace.
---------
Signed-off-by: Aaron Sky <aaronsky@skyaaron.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ END_UNRELEASED_TEMPLATE
50
50
51
51
* Added `--@rules_xcodeproj//xcodeproj:separate_index_build_output_base` flag to configure the generator to use a separate output base for index builds: [#3243](https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/3243)
52
52
* Add support for viewing and edit xcmappingmodel files: [#3242](https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/3242)
53
+
* Added support for StoreKit configuration files to `xcschemes.run`, for use with [StoreKit Testing](https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode). [#3242](https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/3245)
| <a id="xcschemes.run-env"></a>env | Environment variables to use when running the launch target.<br><br>If set to `"inherit"`, then the environment variables will be supplied by the launch target (e.g. [`cc_binary.env`](https://bazel.build/reference/be/common-definitions#binary.env)). Otherwise, the `dict` of environment variables will be set as provided, and `None` or `{}` will result in no environment variables.<br><br>Each value of the `dict` can either be a string or a value returned by [`xcschemes.env_value`](#xcschemes.env_value). If a value is a string, it will be transformed into `xcschemes.env_value(value)`. For example, <pre><code>xcschemes.run( env = { "VAR1": "value 1", "VAR 2": xcschemes.env_value("value2", enabled = False), }, )</code></pre> will be transformed into: <pre><code>xcschemes.run( env = { "VAR1": xcschemes.env_value("value 1"), "VAR 2": xcschemes.env_value("value2", enabled = False), }, )</code></pre> | `"inherit"` |
481
481
| <aid="xcschemes.run-env_include_defaults"></a>env_include_defaults | Whether to include the rules_xcodeproj provided default Bazel environment variables (e.g. `BUILD_WORKING_DIRECTORY` and `BUILD_WORKSPACE_DIRECTORY`), in addition to any set by [`env`](#xcschemes.run-env). This does not apply to [`xcschemes.launch_path`](#xcschemes.launch_path)s. |`True`|
482
482
| <aid="xcschemes.run-launch_target"></a>launch_target | The target to launch when running.<br><br>Can be `None`, a label string, a value returned by [`xcschemes.launch_target`](#xcschemes.launch_target), or a value returned by [`xcschemes.launch_path`](#xcschemes.launch_path). If a label string, `xcschemes.launch_target(label_str)` will be used. If `None`, `xcschemes.launch_target()` will be used, which means no launch target will be set (i.e. the `Executable` dropdown will be set to `None`). |`None`|
483
+
| <aid="xcschemes.run-storekit_configuration"></a>storekit_configuration | A StoreKit configuration file for use with [StoreKit Testing](https://developer.apple.com/documentation/xcode/setting-up-storekit-testing-in-xcode).<br><br>Can be `None`, or a label string referring to a single configuration file. |`None`|
483
484
| <aid="xcschemes.run-xcode_configuration"></a>xcode_configuration | The name of the Xcode configuration to use to build the targets referenced in the Run action (i.e in the [`build_targets`](#xcschemes.run-build_targets) and [`launch_target`](#xcschemes.run-launch_target) attributes).<br><br>If not set, the value of [`xcodeproj.default_xcode_configuration`](#xcodeproj-default_xcode_configuration) is used. |`None`|
0 commit comments