René's URL Explorer Experiment


Title: feat(ios): run iOS apps on an Apple silicon Mac with `--device mac` by NathanWalker · Pull Request #6205 · NativeScript/nativescript-cli · GitHub

Open Graph Title: feat(ios): run iOS apps on an Apple silicon Mac with `--device mac` by NathanWalker · Pull Request #6205 · NativeScript/nativescript-cli

X Title: feat(ios): run iOS apps on an Apple silicon Mac with `--device mac` by NathanWalker · Pull Request #6205 · NativeScript/nativescript-cli

Description: Draft, for discussion. Building, installing, launching, logs and device listing work locally. Relaunching after a file sync is still blocked; see Known issue below. A few design questions are open too. PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. You have signed the CLA. All existing tests are passing. Tests for the changes are included. What is the current behavior? Since NativeScript/ios#551, an iOS app can run on an Apple silicon Mac as "Designed for iPad": it loads UIKit and the other iOS-only frameworks from /System/iOSSupport. The CLI has no way to target the Mac, so today you build with xcodebuild, build the wrapper bundle and launch it by hand. What is the new behavior? ns devices ios # lists "My Mac (Designed for iPad)" ns run ios --device mac # build, install, launch, sync, logs ns debug ios --device mac The Mac is an iOS device, not a new platform, so run, debug, deploy and devices work with no new commands. It is listed by ns devices, but ns run ios only uses it when --device is mac or the Mac's provisioning UDID. People with a phone plugged in won't get a Mac launch as well. This is a different product from #6125 (ns run catalyst). Catalyst rebuilds the app against the macOS SDK. This runs the unmodified iOS (iphoneos) build, the same binary that ships to devices. The two don't overlap and can land independently. How it works Discovery (IOSMacDeviceDiscovery): Only on a Darwin host that is arm64, checked with sysctl hw.optional.arm64 because Rosetta hides it from process.arch. Only for the iOS platform, and not with --emulator. The device identifier is the Mac's provisioning UDID, read from system_profiler SPHardwareDataType. Build: A signed iphoneos build with -destination 'platform=macOS,arch=arm64,variant=Designed for iPad,id=' and -allowProvisioningDeviceRegistration, so the profile includes this Mac. Output goes to platforms/ios/build/mac, so it doesn't replace device or simulator builds. New buildForMac flag on IBuildData / IBuildForDevice, set next to each buildForDevice. Install and launch (IOSMacApplicationManager): macOS only launches an iOS app from the layout it gives installed iPad apps: .app/Wrapper/.app plus a WrappedBundle symlink. Launches with open -n . Stops by finding the process with pgrep. macOS runs a copy of the wrapper from /private/var/folders, not from the install path. Sync: local file copies, like a simulator. IOSMacDevice.isEmulator is true so it uses those code paths. Logs: log stream --predicate 'process == "" AND '. Debugger: Post the attach request with notifyutil -p :NativeScript.Debug.AttachRequest. Read the port from the runtime's "inspector socket on port N" log line. Connect to 127.0.0.1. Runtime check: warns when @nativescript/ios predates NativeScript/ios#551: releases older than 9.1.1 next builds before 9.1.0-next.2026-11-11-43080423883 Older runtimes stop at launch on a Mac. Tested locally M3 Max, macOS 26.6.2, Xcode 27, with an Angular + Vite app on @nativescript/ios@next: ns devices ios lists the Mac ✅ --device mac selects it; plain ns run ios doesn't ✅ Build into build/mac, provisioning includes the Mac (about 20 s) ✅ Wrapper install + open -n launch ✅ JS console output via log stream ✅ New unit tests + devices-service + ios-project-service (160) ✅ Relaunch after syncing files ❌ see below Vite HMR, --no-hmr sync + restart, ns debug not yet verified Known issue: syncing breaks the code signature The CLI syncs app files (and .nsbuildinfo) into the signed bundle. That invalidates its seal: codesign --verify --strict reports "a sealed resource is missing or invalid". macOS then refuses to launch the app and shows the "damaged, move to Trash" dialog. Re-signing the inner bundle with the identity it was built with fixes it. It takes about 0.1 s and keeps the entitlements: codesign --force --sign \ --preserve-metadata=identifier,entitlements,flags,runtime Proposed fix: At install, record the identity from the untouched bundle. Before each open, run codesign --verify --strict, which takes about 0.04 s. If the verify fails, re-sign. Vite HMR modules come from the dev server and are never written into the bundle, so HMR edits shouldn't trigger this. Open questions How to expose the Mac: --device mac under ios, as here, or a --mac flag, or a separate platform? A device seemed the least new surface. isEmulator = true for a Mac: the simulator's local-file code paths are exactly right, but the name is misleading. Add an isLocal / runsOnHost capability instead? That means auditing every isEmulator check. Old runtime: warn, as here, or fail the build? Local file: runtimes can't be version-checked, so this warns. Intel Macs: they are skipped silently. Should --device mac on one give an explicit error?

Open Graph Description: Draft, for discussion. Building, installing, launching, logs and device listing work locally. Relaunching after a file sync is still blocked; see Known issue below. A few design questions are open ...

X Description: Draft, for discussion. Building, installing, launching, logs and device listing work locally. Relaunching after a file sync is still blocked; see Known issue below. A few design questions are open ...

Opengraph URL: https://github.com/NativeScript/nativescript-cli/pull/6205

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:83cbda8a-d006-7a27-bd8d-4edc36ecee14
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idECAE:1AE20C:16F533A:1D14669:6B01351E
html-safe-nonce340d03fe8cc8f59e432ef82c1d9462ff26f4a4e81523225d75f0e7a811d2b44b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0FFOjFBRTIwQzoxNkY1MzNBOjFEMTQ2Njk6NkIwMTM1MUUiLCJ2aXNpdG9yX2lkIjoiMjgwMDUzNTQ4NDQ0MTM3NjAzMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf311d22fe88d7c8e97b59d3bd58b6ffe5189471f20a5bc1ba3a2afa81375efcc
hovercard-subject-tagpull_request:5314132982
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/NativeScript/nativescript-cli/pull/6205/files
twitter:imagehttps://avatars.githubusercontent.com/u/457187?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/457187?s=400&v=4
og:image:altDraft, for discussion. Building, installing, launching, logs and device listing work locally. Relaunching after a file sync is still blocked; see Known issue below. A few design questions are open ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/NativeScript/nativescript-cli git https://github.com/NativeScript/nativescript-cli.git
octolytics-dimension-user_id7392261
octolytics-dimension-user_loginNativeScript
octolytics-dimension-repository_id21347346
octolytics-dimension-repository_nwoNativeScript/nativescript-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id21347346
octolytics-dimension-repository_network_root_nwoNativeScript/nativescript-cli
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/NativeScript/nativescript-cli/pull/6205/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fnativescript-cli%2Fpull%2F6205%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNativeScript%2Fnativescript-cli%2Fpull%2F6205%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=NativeScript%2Fnativescript-cli
Reloadhttps://github.com/NativeScript/nativescript-cli/pull/6205/files
Reloadhttps://github.com/NativeScript/nativescript-cli/pull/6205/files
Reloadhttps://github.com/NativeScript/nativescript-cli/pull/6205/files
NativeScripthttps://github.com/NativeScript
nativescript-clihttps://github.com/NativeScript/nativescript-cli
Codehttps://github.com/NativeScript/nativescript-cli
Issues357 (357)https://github.com/NativeScript/nativescript-cli/issues
Pull requests37 (37)https://github.com/NativeScript/nativescript-cli/pulls
Actionshttps://github.com/NativeScript/nativescript-cli/actions
Projectshttps://github.com/NativeScript/nativescript-cli/projects
Security and qualityhttps://github.com/NativeScript/nativescript-cli/security
Insightshttps://github.com/NativeScript/nativescript-cli/insights
Sign up for GitHub https://github.com/signup?return_to=%2FNativeScript%2Fnativescript-cli%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FNativeScript%2Fnativescript-cli%2Fissues%2Fnew%2Fchoose
NathanWalkerhttps://github.com/NathanWalker
mainhttps://github.com/NativeScript/nativescript-cli/tree/main
feat/ios-designed-for-ipadhttps://github.com/NativeScript/nativescript-cli/tree/feat/ios-designed-for-ipad
Conversation 1 https://github.com/NativeScript/nativescript-cli/pull/6205
Commits 1 https://github.com/NativeScript/nativescript-cli/pull/6205/commits
Checks 11 https://github.com/NativeScript/nativescript-cli/pull/6205/checks
Files changed https://github.com/NativeScript/nativescript-cli/pull/6205/files
Please reload this pagehttps://github.com/NativeScript/nativescript-cli/pull/6205/files
feat(ios): run iOS apps on an Apple silicon Mac with --device mac https://github.com/NativeScript/nativescript-cli/pull/6205/files#top
Show all changes 1 commit https://github.com/NativeScript/nativescript-cli/pull/6205/files
3a3d063 feat(ios): run iOS apps on an Apple silicon Mac with `--device mac` NathanWalker Nov 14, 2026 https://github.com/NativeScript/nativescript-cli/pull/6205/commits/3a3d0633c02aca391d36b01eb910062a483b2d13
Clear filters https://github.com/NativeScript/nativescript-cli/pull/6205/files
Please reload this pagehttps://github.com/NativeScript/nativescript-cli/pull/6205/files
Please reload this pagehttps://github.com/NativeScript/nativescript-cli/pull/6205/files
bootstrap.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-aadb3548876b46c75b5a7af592abd32d1082c8033b3c559405e3c2cbee742000
ios-mac-application-manager.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-85725b4508a4cbe59b1172b8e66fbf4c4a9b64a9c48b264c11912cf53c7b5f3b
ios-mac-constants.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-2754b7b63feadaca0469e31fd536976d021c975d72dc26bd836ec8925dfe1cd7
ios-mac-device.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-fc07bb3ed360951c867a064e21d75c95ab2c02d9f4eeeafc85581e8d29fa47ad
ios-mac-file-system.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-500991d637d352c9c5197ad3d1e3c054e2049425ad5e6785e9794f75b0524d4f
devices-service.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-914fd01b31520fa2b9dfa832fb437750ad53a3d1ca0b5e9ee920c8016a647d3e
ios-mac-device-discovery.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-b33e4af011219f6ceae605b9be30cdc8b23a00c8952e26af5ca87482a5ba3836
devices-service.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-45e6669aba0f57bc7f49e5c9e353e23afed1fb431b2c498dc570221763e015b0
ios-mac-device-discovery.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-c3dc7741c06f2b3439b15039ca88917ccfb50ea8464c70f93a04d36c8095bc5a
deploy-controller.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-1d280b29a5522031b994004b0fc6a3a83193c7fb088ce0ea47d720388e704507
run-controller.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-73b7dd9d5c397c4480431594f57db56cea38b1b826fde043238c66be19c12a6d
build-data.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-b82542140396ff5c6d831ed659f629289eb42b63510ef6941ab9669803185520
build.d.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-4d9a41790141e51c1081a95a46cfbcb4daccef6f16dcb32b4986667834ba77d1
ios.d.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-89a4d3284df35fba64730fae7d7f3257ba5ac8b78b69ef1aa702c36ae7af7e20
project.d.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-1a8d705894e0644814b9ccb9e2f271c53427dcad1d0036aeb470dd2bca9aeaf8
device-path-provider.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-cfd773ff1865766e0d6922b1f357a23adba78baef881db545e6670083622fbe1
deploy-command-helper.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-05d718e339e656958477b13680005716819a11b1dffbf14ba280c054ffce469e
livesync-command-helper.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-53028e772895710be4c0af32b9e94fe44b41963e4d13a87aeb7e89e6f34c9ea2
device-install-app-service.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-a90a940ae898ed4b1af1f6545918a2a42e4b08499592296f1e4765bedcf6f39e
ios-project-service.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-f7622a4b889e37ebc0eba2bf40ac06b97262f18f3e2bb9b71375a083af8a3259
xcodebuild-args-service.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-18f7dac3ce2d02fadb4991c4a5af3854fc3679e920186f62f7d4316c92766632
xcodebuild-service.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-05d4e1459fe0877155133ace07c9337f53f7845a28d9a6a7c808a6f227ab0433
ios-project-service.ts https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-a5edc6541d103b52c9672665221f3d6c5834b85f8da71456c709c79c2b0e47e1
lib/common/bootstrap.tshttps://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-aadb3548876b46c75b5a7af592abd32d1082c8033b3c559405e3c2cbee742000
View file https://github.com/NativeScript/nativescript-cli/blob/3a3d0633c02aca391d36b01eb910062a483b2d13/lib/common/bootstrap.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/nativescript-cli/pull/6205/{{ revealButtonHref }}
https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-aadb3548876b46c75b5a7af592abd32d1082c8033b3c559405e3c2cbee742000
https://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-aadb3548876b46c75b5a7af592abd32d1082c8033b3c559405e3c2cbee742000
lib/common/mobile/ios/mac/ios-mac-application-manager.tshttps://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-85725b4508a4cbe59b1172b8e66fbf4c4a9b64a9c48b264c11912cf53c7b5f3b
View file https://github.com/NativeScript/nativescript-cli/blob/3a3d0633c02aca391d36b01eb910062a483b2d13/lib/common/mobile/ios/mac/ios-mac-application-manager.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/nativescript-cli/pull/6205/{{ revealButtonHref }}
lib/common/mobile/ios/mac/ios-mac-constants.tshttps://github.com/NativeScript/nativescript-cli/pull/6205/files#diff-2754b7b63feadaca0469e31fd536976d021c975d72dc26bd836ec8925dfe1cd7
View file https://github.com/NativeScript/nativescript-cli/blob/3a3d0633c02aca391d36b01eb910062a483b2d13/lib/common/mobile/ios/mac/ios-mac-constants.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/NativeScript/nativescript-cli/pull/6205/{{ revealButtonHref }}
Please reload this pagehttps://github.com/NativeScript/nativescript-cli/pull/6205/files
Please reload this pagehttps://github.com/NativeScript/nativescript-cli/pull/6205/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.