Wyczyść cel IOS xcode w wierszu poleceń

Buduję / uruchamiam aplikację na IOS z linii poleceń z następującymi poleceniami:

xcodebuild  -sdk "${TARGET_SDK}" -xcconfig "${CONFIG_FILE_PATH}"  -configuration Release

/usr/bin/xcrun -sdk "${TARGET_SDK}" PackageApplication -v "${PROJECT_BUILD_DIR}/${APPLICATION_NAME}.app" -o "${OUTPUT_DIR}/${APPLICATION_NAME}.ipa"

Czy jest jakieś polecenie do czyszczenia celów? lub te polecenia dbają o samo czyszczenie.

Author: clint, 2013-09-30

2 answers

Ze strony podręcznika xcodebuild:

xcodebuild [-project projectname] [-target targetname ...] [-configuration configurationname] [-sdk [sdkfullpath | sdkname]] [buildaction ...] [setting=value ...] [-userdefault=value ...]

I akcja build może przyjmować następujące wartości (UPD 13.08.2018):

action ...
       Specify one or more actions to perform. Available actions are:

       build                  Build the target in the build root (SYMROOT).  This is the default action, and
                              is used if no action is given.

       build-for-testing      Build the target and associated tests in the build root (SYMROOT).  This will
                              also produce an xctestrun file in the build root. This requires specifying a
                              scheme.

       analyze                Build and analyze a target or scheme from the build root (SYMROOT).  This
                              requires specifying a scheme.

       archive                Archive a scheme from the build root (SYMROOT).  This requires specifying a
                              scheme.

       test                   Test a scheme from the build root (SYMROOT).  This requires specifying a
                              scheme and optionally a destination.

       test-without-building  Test compiled bundles. If a scheme is provided with -scheme then the command
                              finds bundles in the build root (SRCROOT).  If an xctestrun file is provided
                              with -xctestrun then the command finds bundles at paths specified in the
                              xctestrun file.

       install-src            Copy the source of the project to the source root (SRCROOT).

       install                Build the target and install it into the target's installation directory in
                              the distribution root (DSTROOT).

       clean                  Remove build products and intermediate files from the build root (SYMROOT).

W Twoim przypadku

xcodebuild  -sdk "${TARGET_SDK}" -xcconfig "${CONFIG_FILE_PATH}"  -configuration Release clean build

Istnieją dwie akcje build w tym wierszu poleceń: 'clean' I 'build'. Najpierw wykonywana jest akcja "clean", a następnie "build". Zgodnie z dokumentacją, możesz określić wiele akcji budowania w poleceniu, a wykonywanie tego polecenia zamiast używania oddzielnych poleceń zapewnia, że inne opcje są takie same dla całego procesu budowania działania.

 43
Author: Oleg Shulakov,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-03-19 11:57:24

Możesz po prostu usunąć folder budowania:

rm -rf ./build
 -1
Author: Makar,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2020-12-11 18:06:03