Skip to content

Commit 84da630

Browse files
[XcodeBuild] document new method params (#4171)
* [XcodeBuild] document new method params * update docs * minor changes --------- Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
1 parent cca8285 commit 84da630

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

reference/tools/apple/xcodebuild.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@ Reference
3333

3434
.. automethod:: XcodeBuild.build
3535

36-
The ``Xcode.build()`` method internally implements a call to ``xcodebuild`` like:
36+
The ``XcodeBuild.build()`` method internally implements a call to ``xcodebuild`` like:
3737

3838
.. code:: bash
3939
40-
$ xcodebuild -project app.xcodeproj -configuration <configuration> -arch <architecture> <sdk> <verbosity> -target <target>/-alltargets *_DEPLOYMENT_TARGET=settings.os.version
40+
$ xcodebuild -project app.xcodeproj -configuration <configuration> -arch <architecture> <sdk> <verbosity> -target <target>/-alltargets *_DEPLOYMENT_TARGET=settings.os.version <cli_args>
4141
4242
Where:
4343

4444
- ``configuration`` is the configuration, typically *Release* or *Debug*, which will be obtained
45-
from ``settings.build_type``.
45+
from ``settings.build_type`` unless you pass it explicitly via the ``configuration`` parameter.
4646
- ``architecture`` is the build architecture, a mapping from the ``settings.arch`` to the
4747
common architectures defined by Apple 'i386', 'x86_64', 'armv7', 'arm64', etc.
4848
- ``sdk`` is set based on the values of the ``os.sdk`` and ``os.sdk_version`` defining the
@@ -54,10 +54,21 @@ Where:
5454
``os.sdk_version`` settings values.
5555
- ``verbosity`` is the verbosity level for the build and can take value 'verbose' or
5656
'quiet' if set by ``tools.build:verbosity`` in your **[conf]**
57-
58-
Additional parameters that are passed to ``xcodebuild``:
59-
60-
- deployment target setting according to the values of ``os`` and ``os.version`` from profile,
57+
- ``cli_args`` are the additional command line arguments passed via the
58+
``cli_args`` parameter. These can include custom build settings like
59+
``BUILD_LIBRARY_FOR_DISTRIBUTION=YES``. You can also redirect build artifacts
60+
to the Conan build folder by passing ``SYMROOT`` and ``OBJROOT`` settings:
61+
62+
.. code:: python
63+
64+
def build(self):
65+
xcodebuild = XcodeBuild(self)
66+
xcodebuild.build("app.xcodeproj", cli_args=[f"SYMROOT={self.build_folder}",
67+
f"OBJROOT={self.build_folder}"])
68+
69+
Additional parameters that are passed to ``xcodebuild`` (but before ``cli_args``):
70+
71+
- Deployment target setting according to the values of ``os`` and ``os.version`` from profile,
6172
e.g. ``MACOSX_DEPLOYMENT_TARGET=10.15`` or ``IPHONEOS_DEPLOYMENT_TARGET=15.0``
6273

6374
conf

0 commit comments

Comments
 (0)