diff --git a/.github/actions/collect-test-diagnostics/action.yml b/.github/actions/collect-test-diagnostics/action.yml index 49603765c..f9569678e 100644 --- a/.github/actions/collect-test-diagnostics/action.yml +++ b/.github/actions/collect-test-diagnostics/action.yml @@ -14,6 +14,11 @@ inputs: Name of the uploaded artifact. Artifact names are unique per workflow run, so jobs that can both fail in one run need distinct names. default: test-diagnostics + host-process-log: + description: > + "true" when the app ran on the host (Mac Catalyst): also save the host's + unified log for TestRunner processes. + default: "false" runs: using: composite steps: @@ -45,6 +50,17 @@ runs: else echo "No booted simulator; relying on the xcresult's captured app output." fi + if [ "${{ inputs.host-process-log }}" = "true" ]; then + echo "Collecting host unified log slice" + log show --style compact --last 45m \ + --predicate 'process CONTAINS "TestRunner"' \ + > "$DIAG/host-unified.log" 2>/dev/null & + LOG_PID=$! + ( sleep 120 && kill -9 "$LOG_PID" ) 2>/dev/null & + KILLER_PID=$! + wait "$LOG_PID" || echo "log show failed or was killed after 120s" + kill "$KILLER_PID" 2>/dev/null || true + fi echo "Collected diagnostics:" du -sh "$DIAG"/* 2>/dev/null || true - name: Upload test diagnostics diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 857c93fd1..4e35c5254 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -145,3 +145,60 @@ jobs: path: | ${{env.TEST_FOLDER}}/test_results.xcresult ${{env.TEST_FOLDER}}/test_results_attempt1.xcresult + test-catalyst: + name: Test (Mac Catalyst) + runs-on: macos-15 + needs: build + steps: + - uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0 + with: + xcode-version: ${{env.XCODE_VERSION}} + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + submodules: true + persist-credentials: false # disable to prevent leaking credentials to build scripts + - name: LLVM cache + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + with: + path: ./llvm + key: ${{ hashFiles('download_llvm.sh') }} + - uses: ./.github/actions/setup-build-env + with: + install-test-tools: "true" + - name: Prepare test folder + run: echo TEST_FOLDER=$(pwd)/build/tests/catalyst >> $GITHUB_ENV + - name: Xcode Tests + uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 + with: + timeout_minutes: 40 + max_attempts: 2 + command: ./run_tests.sh --catalyst + # run_tests.sh empties its results folder, so move the failed + # attempt's bundle out of it first. + on_retry_command: rm -rf $TEST_FOLDER-attempt1; mv $TEST_FOLDER $TEST_FOLDER-attempt1 2>/dev/null || true + - name: Test report summary + if: ${{ !cancelled() }} + uses: mikepenz/action-junit-report@a9170d5795813c01ab4901ffb045b52bab4ab09d # v6.5.0 + with: + report_paths: build/tests/catalyst/test-out/*junit*.xml + annotate_only: true + detailed_summary: true + - name: Validate Test Results + run: | + find $TEST_FOLDER/test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx junit-cli-report-viewer + find $TEST_FOLDER/test-out -name "*junit*.xml" -maxdepth 1 -print0 | xargs -n 1 -0 npx verify-junit-xml + - name: Collect test diagnostics + if: failure() + uses: ./.github/actions/collect-test-diagnostics + with: + test-folder: ${{env.TEST_FOLDER}} + artifact-name: test-diagnostics-catalyst + host-process-log: "true" + - name: Archive Test Result Data + if: always() + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 + with: + name: test-results-catalyst + path: | + ${{env.TEST_FOLDER}}/test_results.xcresult + ${{env.TEST_FOLDER}}-attempt1/test_results.xcresult diff --git a/NativeScript/lib/arm64-maccatalyst/libffi.a b/NativeScript/lib/arm64-maccatalyst/libffi.a new file mode 100644 index 000000000..ab876e2f8 Binary files /dev/null and b/NativeScript/lib/arm64-maccatalyst/libffi.a differ diff --git a/NativeScript/runtime/Runtime.mm b/NativeScript/runtime/Runtime.mm index 3e15883fa..e65af254a 100644 --- a/NativeScript/runtime/Runtime.mm +++ b/NativeScript/runtime/Runtime.mm @@ -30,9 +30,14 @@ #include "IsolateWrapper.h" +#include #include #include #include +#if TARGET_OS_MACCATALYST +#include +#include +#endif #include "HttpLoader.h" #include "ModuleBinding.hpp" #include "ModuleInternalCallbacks.h" @@ -328,6 +333,42 @@ void DisposeIsolateWhenPossible(Isolate* isolate, int gateId) { return static_cast(isolate->GetData(Constants::RUNTIME_SLOT)); } +#if TARGET_OS_MACCATALYST +// Mac Catalyst ships V8 with its JIT tiers, but a hardened-runtime process may +// only map JIT memory with com.apple.security.cs.allow-jit (or +// allow-unsigned-executable-memory). V8 does not fall back on its own: without +// --jitless it dies at its first code-space allocation, so ask the kernel the +// same question V8 will. +static bool CanMapJitMemory() { + const size_t size = static_cast(getpagesize()); + void* memory = mmap(nullptr, size, PROT_READ | PROT_WRITE | PROT_EXEC, + MAP_PRIVATE | MAP_ANON | MAP_JIT, -1, 0); + if (memory == MAP_FAILED) { + return false; + } + munmap(memory, size); + return true; +} + +// `"ios": { "jit": false }` in the app's package.json forces the interpreter; +// otherwise the JIT runs whenever the process may map JIT memory. +static bool ShouldEnableJit() { + id iosConfig = Runtime::GetAppConfigValue("ios"); + id jitValue = [iosConfig isKindOfClass:[NSDictionary class]] ? iosConfig[@"jit"] : nil; + if ([jitValue isKindOfClass:[NSNumber class]] && ![jitValue boolValue]) { + return false; + } + if (CanMapJitMemory()) { + return true; + } + if (jitValue != nil) { + Log(@"NativeScript: \"ios.jit\" is set, but this process may not map JIT memory (missing " + @"the com.apple.security.cs.allow-jit entitlement?). Running without the JIT."); + } + return false; +} +#endif + Isolate* Runtime::CreateIsolate(const IsolateLimits& limits) { if (!v8Initialized_) { // Runtime::platform_ = RuntimeConfig.IsDebug @@ -335,10 +376,14 @@ void DisposeIsolateWhenPossible(Isolate* isolate, int gateId) { // : platform::NewDefaultPlatform(); // Flags must be set before V8::Initialize(), which freezes them; changing a - // flag afterwards aborts the process. Don't pass --jitless either: - // v8_enable_lite_mode already implies it and makes the flag read-only, - // which is likewise fatal to set. + // flag afterwards aborts the process. iOS V8 is built in lite mode, which + // already implies --jitless; only Mac Catalyst decides at launch. std::string flags = RuntimeConfig.IsDebug ? "--expose_gc" : "--expose_gc --no-lazy"; +#if TARGET_OS_MACCATALYST + if (!ShouldEnableJit()) { + flags += " --jitless"; + } +#endif V8::SetFlagsFromString(flags.c_str(), flags.size()); // wrap the default platform so foreground tasks ride each runtime diff --git a/TestFixtures/Functions/TNSFunctions.h b/TestFixtures/Functions/TNSFunctions.h index dba6339d8..1282453c3 100644 --- a/TestFixtures/Functions/TNSFunctions.h +++ b/TestFixtures/Functions/TNSFunctions.h @@ -3,3 +3,7 @@ CFArrayRef CFArrayCreateWithString(CFStringRef string); // Declared for the metadata generator but intentionally left undefined, so the // symbol is listed in metadata yet absent at runtime. void TNSFunctionMissingAtRuntime(void); + +// Whether the process holds executable memory carrying V8's VM tag (255). +// V8 maps executable memory only when its JIT is on. +bool TNSHasExecutableV8Memory(void); diff --git a/TestFixtures/Functions/TNSFunctions.m b/TestFixtures/Functions/TNSFunctions.m index 0977578ab..c2a639a3d 100644 --- a/TestFixtures/Functions/TNSFunctions.m +++ b/TestFixtures/Functions/TNSFunctions.m @@ -1,4 +1,23 @@ #import "TNSFunctions.h" +#include + +bool TNSHasExecutableV8Memory(void) { + vm_address_t address = 0; + for (;;) { + vm_size_t size = 0; + natural_t depth = 0; + struct vm_region_submap_info_64 info; + mach_msg_type_number_t count = VM_REGION_SUBMAP_INFO_COUNT_64; + if (vm_region_recurse_64(mach_task_self(), &address, &size, &depth, + (vm_region_recurse_info_t)&info, &count) != KERN_SUCCESS) { + return false; + } + if (info.user_tag == 255 && (info.protection & VM_PROT_EXECUTE)) { + return true; + } + address += size; + } +} CFArrayRef CFArrayCreateWithString(CFStringRef string) { const void* values[] = { string }; diff --git a/TestFixtures/NapiCoverageModule.mm b/TestFixtures/NapiCoverageModule.mm index 45fd11eaf..a5d5832b5 100644 --- a/TestFixtures/NapiCoverageModule.mm +++ b/TestFixtures/NapiCoverageModule.mm @@ -157,7 +157,7 @@ static napi_value StringStatus(napi_env env, napi_callback_info info) { //=== Numbers ============================================================== -static napi_value NumberParts(napi_env env, napi_callback_info info) { +static napi_value NumberPartsMethod(napi_env env, napi_callback_info info) { size_t argc = 1; napi_value args[1]; NAPI_CALL(env, napi_get_cb_info(env, info, &argc, args, NULL, NULL)); @@ -1345,7 +1345,7 @@ static napi_value InitNapiCoverageModule(napi_env env, napi_value exports) { NAPI_METHOD("copyString", CopyString), NAPI_METHOD("createStrings", CreateStrings), NAPI_METHOD("stringStatus", StringStatus), - NAPI_METHOD("numberParts", NumberParts), + NAPI_METHOD("numberParts", NumberPartsMethod), NAPI_METHOD("createNumbers", CreateNumbers), NAPI_METHOD("numberStatus", NumberStatus), NAPI_METHOD("createSymbol", CreateSymbol), diff --git a/TestFixtures/exported-symbols.txt b/TestFixtures/exported-symbols.txt index 9a915ec8e..a7060ed5c 100644 --- a/TestFixtures/exported-symbols.txt +++ b/TestFixtures/exported-symbols.txt @@ -1,4 +1,5 @@ _CFArrayCreateWithString +_TNSHasExecutableV8Memory _functionExplicitCreateNSObject _functionImplicitCreate _functionReturningFunctionPtrAsVoidPtr diff --git a/TestRunner/TestRunner-Catalyst.entitlements b/TestRunner/TestRunner-Catalyst.entitlements new file mode 100644 index 000000000..005a379fb --- /dev/null +++ b/TestRunner/TestRunner-Catalyst.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.cs.allow-jit + + + com.apple.security.cs.disable-library-validation + + + diff --git a/TestRunner/app/tests/CatalystJitTests.js b/TestRunner/app/tests/CatalystJitTests.js new file mode 100644 index 000000000..aa4caaf1d --- /dev/null +++ b/TestRunner/app/tests/CatalystJitTests.js @@ -0,0 +1,9 @@ +// TestRunner's Catalyst build is signed with com.apple.security.cs.allow-jit, +// so the runtime must leave V8's JIT on there. +if (NSProcessInfo.processInfo.macCatalystApp) { + describe("Mac Catalyst JIT", function () { + it("runs V8 with its JIT when the process may map JIT memory", function () { + expect(TNSHasExecutableV8Memory()).toBe(true); + }); + }); +} diff --git a/TestRunner/app/tests/index.js b/TestRunner/app/tests/index.js index c8d657702..e535e5a29 100644 --- a/TestRunner/app/tests/index.js +++ b/TestRunner/app/tests/index.js @@ -209,6 +209,9 @@ require("./WorkerTerminateTests"); // interop.setExternalSize and the runtime's own external memory charges require("./ExternalMemoryTests"); +// The runtime's launch-time JIT decision on Mac Catalyst +require("./CatalystJitTests"); + // Tests common for all runtimes (git submodule of NativeScript/common-runtime-tests-app). require("../shared/index").runAllTests(); diff --git a/build_libffi.sh b/build_libffi.sh index 45545ece0..f25cd0419 100755 --- a/build_libffi.sh +++ b/build_libffi.sh @@ -26,12 +26,15 @@ ALL_SLICES=( arm64-xros arm64-xrsimulator x86_64-iphonesimulator + arm64-maccatalyst x86_64-maccatalyst ) IOS_MIN=13.0 XROS_MIN=2.0 CATALYST_MIN=13.3 +# The arm64 macabi triple has no deployment targets below 14.0. +CATALYST_ARM64_MIN=14.0 usage() { cat < Existing simulator by name (e.g. 'iPhone 16 Pro') -u, --udid Existing simulator by UDID --temp-sim Create a throwaway ${SIM_PREFIX}* simulator for this run and delete it afterwards --keep-sim Run on ${SIM_PREFIX}, creating and booting it if needed, and leave it booted for later runs + --catalyst Build TestRunner for Mac Catalyst and run the suite on this + Mac (hardened runtime, ad-hoc signed, allow-jit entitlement). + Cannot be combined with any simulator option. Only one + Catalyst run per Mac at a time: later ones wait for it. Simulator management (no tests run): --create-sim Create and boot ${SIM_PREFIX}, print its UDID, exit @@ -294,7 +298,8 @@ Run options: -t, --temp-folder Write results to a random temp folder instead of build/tests/ -h, --help Show this help -Results go to build/tests/ (one simulator can only run one suite at a time). +Results go to build/tests/ (one simulator can only run one suite at a time), +or build/tests/catalyst with --catalyst. EOF } @@ -314,6 +319,7 @@ SIM_DEVICE_TYPE="" SIM_RUNTIME="" DELETE_TARGET="" TEST_FOLDER="" +CATALYST=0 set_sim_mode() { if [ -n "$SIM_MODE" ] && [ "$SIM_MODE" != "$1" ]; then @@ -360,6 +366,7 @@ while [ $# -gt 0 ]; do set_sim_mode "delete-sim"; shift "$OPT_SHIFT" ;; --list-sims) set_sim_mode "list-sims"; shift ;; --delete-sims) set_sim_mode "delete-sims"; shift ;; + --catalyst) CATALYST=1; shift ;; -a|--asan) ASAN=1; shift ;; -t|--temp-folder) TEMP_FOLDER=1; shift ;; -h|--help) usage; exit 0 ;; @@ -367,6 +374,25 @@ while [ $# -gt 0 ]; do esac done +if [ "$CATALYST" -eq 1 ]; then + if [ -n "$SIM_MODE" ] || [ -n "$DEVICE_NAME" ] || [ -n "$DEVICE_UDID" ] || [ -n "$SIM_NAME" ] \ + || [ -n "$SIM_DEVICE_TYPE" ] || [ -n "$SIM_RUNTIME" ]; then + die_usage "--catalyst runs on this Mac and cannot be combined with simulator options." + fi + # TestRunner's Catalyst build is arm64-only (EXCLUDED_ARCHS[sdk=macosx*]). + if [ "$(uname -m)" != "arm64" ]; then + echo "--catalyst needs an Apple Silicon Mac." >&2 + exit 1 + fi + # TestRunnerTests is a UI-testing bundle; on macOS its runner must switch the + # session into Automation Mode, which otherwise asks for an admin password and + # times out unattended. GitHub's macOS runner images come preconfigured. + if ! automationmodetool 2>/dev/null | grep -q "DOES NOT REQUIRE"; then + echo "--catalyst needs Automation Mode without authentication. Enable it once with:" >&2 + echo " sudo automationmodetool enable-automationmode-without-authentication" >&2 + exit 1 + fi +fi if [ -n "$SIM_MODE" ] && { [ -n "$DEVICE_NAME" ] || [ -n "$DEVICE_UDID" ]; }; then die_usage "--$SIM_MODE cannot be combined with --device or --udid." fi @@ -402,6 +428,12 @@ for devices in json.load(sys.stdin)['devices'].values(): # always say which simulator was used and whether it still exists. finish_run() { local status=$? + if [ "$CATALYST" -eq 1 ]; then + release_catalyst_lock + [ -n "$TEST_FOLDER" ] && echo "Test folder: $TEST_FOLDER" + echo "Simulator: none (--catalyst ran on this Mac)" + exit "$status" + fi [ -n "$DEVICE_UDID" ] || exit "$status" local label disposition label=$(sim_label "$DEVICE_UDID") @@ -425,7 +457,48 @@ finish_run() { exit "$status" } +# XCUIApplication.launch() terminates any running app with the same bundle +# identifier, so concurrent Catalyst runs from different checkouts would kill +# each other's TestRunner. Serialize them per user with a mkdir lock. +CATALYST_LOCK="${TMPDIR:-/tmp}/ns-test-catalyst.lock" +CATALYST_LOCK_HELD=0 + +acquire_catalyst_lock() { + local waited=0 holder + until mkdir "$CATALYST_LOCK" 2>/dev/null; do + holder=$(cat "$CATALYST_LOCK/pid" 2>/dev/null) + if [ -n "$holder" ] && ! kill -0 "$holder" 2>/dev/null; then + echo "Removing stale Catalyst run lock (pid $holder is gone)." >&2 + rm -rf "$CATALYST_LOCK" + continue + fi + if [ "$waited" -eq 0 ]; then + echo "Another --catalyst run (pid ${holder:-unknown}) is in progress; waiting for it to finish..." >&2 + waited=1 + fi + sleep 10 + done + echo $$ > "$CATALYST_LOCK/pid" + CATALYST_LOCK_HELD=1 +} + +release_catalyst_lock() { + if [ "$CATALYST_LOCK_HELD" -eq 1 ]; then + rm -rf "$CATALYST_LOCK" + CATALYST_LOCK_HELD=0 + fi +} + +if [ "$CATALYST" -eq 1 ]; then + SIM_MODE="catalyst" +fi + case "$SIM_MODE" in + catalyst) + trap finish_run EXIT + trap 'exit 130' INT TERM + acquire_catalyst_lock + ;; list-sims) print_temp_sims exit $? @@ -466,13 +539,19 @@ esac trap finish_run EXIT trap 'exit 130' INT TERM -DESTINATION="platform=iOS Simulator,id=$DEVICE_UDID" +if [ "$CATALYST" -eq 1 ]; then + DESTINATION="platform=macOS,variant=Mac Catalyst,arch=arm64" + RESULTS_NAME="catalyst" +else + DESTINATION="platform=iOS Simulator,id=$DEVICE_UDID" + RESULTS_NAME="$DEVICE_UDID" +fi mkdir -p "$TESTS_ROOT" if [ "$TEMP_FOLDER" -eq 1 ]; then TEST_FOLDER=$(mktemp -d "$TESTS_ROOT/tmp.XXXXXXXX") else - TEST_FOLDER="$TESTS_ROOT/$DEVICE_UDID" + TEST_FOLDER="$TESTS_ROOT/$RESULTS_NAME" rm -rf "$TEST_FOLDER" mkdir -p "$TEST_FOLDER" fi diff --git a/v8ios.xcodeproj/project.pbxproj b/v8ios.xcodeproj/project.pbxproj index 40102693c..f6f7d968f 100644 --- a/v8ios.xcodeproj/project.pbxproj +++ b/v8ios.xcodeproj/project.pbxproj @@ -78,8 +78,8 @@ C22536B6241A318900192740 /* ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = C22536B1241A318900192740 /* ffi.h */; }; C22536B7241A318900192740 /* ffitarget.h in Headers */ = {isa = PBXBuildFile; fileRef = C22536B3241A318900192740 /* ffitarget.h */; }; C22536B8241A318900192740 /* ffi.h in Headers */ = {isa = PBXBuildFile; fileRef = C22536B4241A318900192740 /* ffi.h */; }; - C2253789241A41C500192740 /* TKLiveSync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2253782241A41C500192740 /* TKLiveSync.framework */; platformFilters = (ios, xros, ); }; - C225378A241A41C500192740 /* TKLiveSync.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C2253782241A41C500192740 /* TKLiveSync.framework */; platformFilters = (ios, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C2253789241A41C500192740 /* TKLiveSync.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2253782241A41C500192740 /* TKLiveSync.framework */; platformFilters = (ios, maccatalyst, xros, ); }; + C225378A241A41C500192740 /* TKLiveSync.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C2253782241A41C500192740 /* TKLiveSync.framework */; platformFilters = (ios, maccatalyst, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; C2253790241A421E00192740 /* zip_fopen_index_encrypted.c in Sources */ = {isa = PBXBuildFile; fileRef = C2A5E05A2328CA6F00A91A76 /* zip_fopen_index_encrypted.c */; }; C2253791241A422400192740 /* zip_get_num_entries.c in Sources */ = {isa = PBXBuildFile; fileRef = C2A5E0422328CA6F00A91A76 /* zip_get_num_entries.c */; }; C2253805241A5C3200192740 /* zip_get_encryption_implementation.c in Sources */ = {isa = PBXBuildFile; fileRef = C2A5E0302328CA6F00A91A76 /* zip_get_encryption_implementation.c */; }; @@ -254,8 +254,8 @@ C2A6EF3123745A0B00E8FBE7 /* MetadataInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = C2A6EF3023745A0B00E8FBE7 /* MetadataInlines.h */; }; C2C8EE7222CE323C001F8CEC /* ConcurrentMap.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8EE7022CE323C001F8CEC /* ConcurrentMap.h */; }; C2C8EE7422CE3266001F8CEC /* ConcurrentQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2C8EE7322CE3266001F8CEC /* ConcurrentQueue.cpp */; }; - C2C8EE7522CE54EE001F8CEC /* NativeScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2DDEB32229EAB3B00345BFE /* NativeScript.framework */; platformFilters = (ios, xros, ); }; - C2C8EE7622CE54EE001F8CEC /* NativeScript.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C2DDEB32229EAB3B00345BFE /* NativeScript.framework */; platformFilters = (ios, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + C2C8EE7522CE54EE001F8CEC /* NativeScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2DDEB32229EAB3B00345BFE /* NativeScript.framework */; platformFilters = (ios, maccatalyst, xros, ); }; + C2C8EE7622CE54EE001F8CEC /* NativeScript.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C2DDEB32229EAB3B00345BFE /* NativeScript.framework */; platformFilters = (ios, maccatalyst, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; C2C8EE7A22CF64E4001F8CEC /* SimpleAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2C8EE7822CF64E4001F8CEC /* SimpleAllocator.cpp */; }; C2C8EE7B22CF64E4001F8CEC /* SimpleAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8EE7922CF64E4001F8CEC /* SimpleAllocator.h */; }; C2CC8EEA22BBA01E00B78928 /* FastEnumerationAdapter.mm in Sources */ = {isa = PBXBuildFile; fileRef = C2CC8EE822BBA01E00B78928 /* FastEnumerationAdapter.mm */; }; @@ -2122,7 +2122,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "cd ${PROJECT_DIR}/metadata-generator/build/bin\ncp ../../build-step-metadata-generator.py .\n./build-step-metadata-generator.py\n\n# create temporary empty metadata files for XCode LD/LDPLUSPLUS flag analysis\nfor arch in $VALID_ARCHS\ndo :\n echo \"creating empty $CONFIGURATION_BUILD_DIR/metadata-$arch.bin\"\n touch \"$CONFIGURATION_BUILD_DIR/metadata-$arch.bin\"\ndone\n"; + shellScript = "set -e\ncd ${PROJECT_DIR}/metadata-generator/build/bin\ncp ../../build-step-metadata-generator.py .\n./build-step-metadata-generator.py\n\n# create temporary empty metadata files for XCode LD/LDPLUSPLUS flag analysis\nfor arch in $VALID_ARCHS\ndo :\n echo \"creating empty $CONFIGURATION_BUILD_DIR/metadata-$arch.bin\"\n touch \"$CONFIGURATION_BUILD_DIR/metadata-$arch.bin\"\ndone\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -2413,6 +2413,7 @@ isa = PBXTargetDependency; platformFilters = ( ios, + maccatalyst, xros, ); target = C2253781241A41C500192740 /* TKLiveSync */; @@ -2422,6 +2423,7 @@ isa = PBXTargetDependency; platformFilters = ( ios, + maccatalyst, xros, ); target = C2DDEB31229EAB3B00345BFE /* NativeScript */; @@ -2447,6 +2449,7 @@ isa = PBXTargetDependency; platformFilters = ( ios, + maccatalyst, xros, ); target = C29374E1229FC0F60075CB16 /* TestFixtures */; @@ -2545,7 +2548,9 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_MODULES = NO; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; + "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -2556,12 +2561,15 @@ "$(inherited)", "@executable_path/Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = org.nativescript.TestRunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; + "TARGETED_DEVICE_FAMILY[sdk=macosx*]" = 2; TEST_TARGET_NAME = TestRunner; }; name = Debug; @@ -2572,7 +2580,9 @@ SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_MODULES = NO; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; + "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = NO; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", @@ -2583,12 +2593,15 @@ "$(inherited)", "@executable_path/Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 10.15; PRODUCT_BUNDLE_IDENTIFIER = org.nativescript.TestRunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTS_MACCATALYST = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = 1; + "TARGETED_DEVICE_FAMILY[sdk=macosx*]" = 2; TEST_TARGET_NAME = TestRunner; }; name = Release; @@ -2807,6 +2820,7 @@ OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; SYMROOT = build; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -2830,6 +2844,7 @@ OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = YES; SYMROOT = build; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -2841,10 +2856,15 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "compiler-default"; CLANG_ENABLE_MODULES = NO; + "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "TestRunner/TestRunner-Catalyst.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = CS838V553Y; + "DEVELOPMENT_TEAM[sdk=macosx*]" = ""; + "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES; EXCLUDED_ARCHS = ""; + "EXCLUDED_ARCHS[sdk=macosx*]" = x86_64; EXPORTED_SYMBOLS_FILE = "$(PROJECT_DIR)/TestFixtures/exported-symbols.txt"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -2883,10 +2903,11 @@ SDKROOT = iphoneos; STRIPFLAGS = "-s $(PROJECT_DIR)/TestFixtures/exported-symbols.txt"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; - SUPPORTS_MACCATALYST = NO; + SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; TARGETED_DEVICE_FAMILY = "1,7"; + "TARGETED_DEVICE_FAMILY[sdk=macosx*]" = 2; USER_HEADER_SEARCH_PATHS = ""; }; name = Debug; @@ -2897,10 +2918,15 @@ CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "compiler-default"; CLANG_ENABLE_MODULES = NO; + "CODE_SIGN_ENTITLEMENTS[sdk=macosx*]" = "TestRunner/TestRunner-Catalyst.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; CODE_SIGN_STYLE = Automatic; DEVELOPMENT_TEAM = 8V7T28DG39; + "DEVELOPMENT_TEAM[sdk=macosx*]" = ""; + "ENABLE_HARDENED_RUNTIME[sdk=macosx*]" = YES; EXCLUDED_ARCHS = ""; + "EXCLUDED_ARCHS[sdk=macosx*]" = x86_64; EXPORTED_SYMBOLS_FILE = "$(PROJECT_DIR)/TestFixtures/exported-symbols.txt"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu99; @@ -2939,10 +2965,11 @@ SDKROOT = iphoneos; STRIPFLAGS = "-s $(PROJECT_DIR)/TestFixtures/exported-symbols.txt"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator"; - SUPPORTS_MACCATALYST = NO; + SUPPORTS_MACCATALYST = YES; SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; TARGETED_DEVICE_FAMILY = "1,7"; + "TARGETED_DEVICE_FAMILY[sdk=macosx*]" = 2; USER_HEADER_SEARCH_PATHS = ""; }; name = Release;