{"id":3816,"date":"2021-06-11T07:18:57","date_gmt":"2021-06-10T22:18:57","guid":{"rendered":"https:\/\/ecpplus.net\/weblog\/?p=3816"},"modified":"2021-06-11T10:55:31","modified_gmt":"2021-06-11T01:55:31","slug":"xcrun-simctl","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/xcrun-simctl\/","title":{"rendered":"iOS Simulators \u3092 CLI \u3067\u64cd\u4f5c\u3059\u308b"},"content":{"rendered":"<h2>xcrun simctl<\/h2>\n<p>\u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067 <code>xcrun simctl<\/code> \u3092\u4f7f\u3063\u3066\u3001Simulator \u306e\u4f5c\u6210\u3001\u8d77\u52d5\u3001\u505c\u6b62\u3001\u524a\u9664\u7b49\u304c\u884c\u3048\u308b\u3002<\/p>\n<h3>list<\/h3>\n<p>\u30de\u30b7\u30f3\u4e0a\u306b\u3042\u308b\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u306e\u30c7\u30d0\u30a4\u30b9\u60c5\u5831\u3092\u4e00\u89a7\u3059\u308b\u3002<\/p>\n<pre><code>xcrun simctl list<\/code><\/pre>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<pre><code>== Device Types ==\n...\niPhone Xs (com.apple.CoreSimulator.SimDeviceType.iPhone-XS)\niPhone Xs Max (com.apple.CoreSimulator.SimDeviceType.iPhone-XS-Max)\niPhone X\u0280 (com.apple.CoreSimulator.SimDeviceType.iPhone-XR)\niPhone 11 (com.apple.CoreSimulator.SimDeviceType.iPhone-11)\niPhone 11 Pro (com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro)\niPhone 11 Pro Max (com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro-Max)\n\n== Runtimes ==\niOS 13.3 (13.3 - 17C45) - com.apple.CoreSimulator.SimRuntime.iOS-13-3\ntvOS 13.3 (13.3 - 17K446) - com.apple.CoreSimulator.SimRuntime.tvOS-13-3\n\n== Devices ==\n-- iOS 13.3 --\n    iPhone 8 (720065F5-64E0-4A4D-8C03-5F63C6B4DCD5) (Shutdown)\n    iPhone 8 Plus (9B24700B-74B9-40CF-B3B1-7860DDA0D150) (Shutdown)\n    iPhone 11 (F8D133DB-F5C1-49B7-895F-530293A86EC3) (Shutdown)\n    iPhone 11 Pro (505672AC-62B4-4B7B-BEFE-38EB984966FD) (Shutdown)\n    iPhone 11 Pro Max (3EC97701-9372-4667-B5E3-D24BB2C57393) (Booted)\n    iPad Pro (11-inch) (D4DCE5AF-8F36-485D-93F2-4D2CA9ADD29A) (Shutdown)\n    iPad Pro (12.9-inch) (3rd generation) (18B1984A-F910-4BFC-98B0-0661C9C2B120) (Shutdown)\n    iPad Air (3rd generation) (6C9D75DC-9A1D-4ADA-80C8-B8D3BDC08E1E) (Shutdown)<\/code><\/pre>\n<p>\u3053\u306e\u4e2d\u3067\u3001<code>Devices<\/code> \u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b UUID \u3092\u3001\u5f8c\u306e\u30b3\u30de\u30f3\u30c9\u3067\u4f7f\u7528\u3059\u308b\u306e\u3067\u30e1\u30e2\u3057\u3066\u304a\u304f\u3002<\/p>\n<h3>boot<\/h3>\n<pre><code>xcrun simctl boot 3EC97701-9372-4667-B5E3-D24BB2C57393<\/code><\/pre>\n<h3>shutdown<\/h3>\n<pre><code>xcrun simctl shutdown 3EC97701-9372-4667-B5E3-D24BB2C57393<\/code><\/pre>\n<p>or<\/p>\n<pre><code>xcrun simctl shutdown booted<\/code><\/pre>\n<h3>screencast<\/h3>\n<pre><code>xcrun simctl io booted recordVideo .\/screen_cast.mp4<\/code><\/pre>\n<h3>screenshot<\/h3>\n<pre><code>xcrun simctl io booted screenshot .\/screenshot.png<\/code><\/pre>\n<p>or<\/p>\n<pre><code>xcrun simctl io booted screenshot .\/screenshot.jpg<\/code><\/pre>\n<h3>listapps<\/h3>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u30a2\u30d7\u30ea\u4e00\u89a7\u3092\u53d6\u5f97\u3067\u304d\u308b\u3002<\/p>\n<pre><code>xcrun simctl listapps booted<\/code><\/pre>\n<h3>path of app<\/h3>\n<p>listapps \u3057\u305f\u5f8c\u3001\u30d1\u30b9\u304c\u5206\u304b\u308b\u306e\u3067\u4e2d\u8eab\u3092\u898b\u3089\u308c\u308b\u3002<br \/>\n\u4e2d\u3067 SQLite \u3092\u4f7f\u3063\u3066\u3044\u308b\u5834\u5408\u306a\u3069\u306f\u76f4\u63a5\u78ba\u8a8d\u3057\u305f\u308a\u3067\u304d\u308b\u3002<\/p>\n<pre><code>xcrun simctl get_app_container booted &lt;bundle identifier&gt; data<\/code><\/pre>\n<h3>other subcommands<\/h3>\n<p>\u305d\u306e\u4ed6\u306e\u30b3\u30de\u30f3\u30c9\u4e00\u89a7\u3002<\/p>\n<pre><code>Subcommands:\n        create              Create a new device.\n        clone               Clone an existing device.\n        upgrade             Upgrade a device to a newer runtime.\n        delete              Delete spcified devices, unavailable devices, or all devices.\n        pair                Create a new watch and phone pair.\n        unpair              Unpair a watch and phone pair.\n        pair_activate       Set a given pair as active.\n        erase               Erase a device&#039;s contents and settings.\n        boot                Boot a device.\n        shutdown            Shutdown a device.\n        rename              Rename a device.\n        getenv              Print an environment variable from a running device.\n        openurl             Open a URL in a device.\n        addmedia            Add photos, live photos, videos, or contacts to the library of a device.\n        install             Install an app on a device.\n        uninstall           Uninstall an app from a device.\n        get_app_container   Print the path of the installed app&#039;s container\n        launch              Launch an application by identifier on a device.\n        terminate           Terminate an application by identifier on a device.\n        spawn               Spawn a process by executing a given executable on a device.\n        list                List available devices, device types, runtimes, or device pairs.\n        icloud_sync         Trigger iCloud sync on a device.\n        pbsync              Sync the pasteboard content from one pasteboard to another.\n        pbcopy              Copy standard input onto the device pasteboard.\n        pbpaste             Print the contents of the device&#039;s pasteboard to standard output.\n        help                Prints the usage for a given subcommand.\n        io                  Set up a device IO operation.\n        diagnose            Collect diagnostic information and logs.\n        logverbose          enable or disable verbose logging for a device\n        status_bar          Set or clear status bar overrides<\/code><\/pre>\n<hr \/>\n<p>Flutter \u3067\u958b\u767a\u3057\u3066\u3044\u308b\u3068 XCode \u7acb\u3061\u4e0a\u3052\u305f\u304f\u306f\u306a\u3044\u3057\u3001 cli \u3067\u64cd\u4f5c\u3067\u304d\u308b\u306e\u306f\u8272\u3005\u4fbf\u5229\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>xcrun simctl \u30bf\u30fc\u30df\u30ca\u30eb\u4e0a\u3067 xcrun simctl \u3092\u4f7f\u3063\u3066\u3001Simulator \u306e\u4f5c\u6210\u3001\u8d77\u52d5\u3001\u505c\u6b62\u3001\u524a\u9664\u7b49\u304c\u884c\u3048\u308b\u3002 list \u30de\u30b7\u30f3\u4e0a\u306b\u3042\u308b\u30b7\u30df\u30e5\u30ec\u30fc\u30bf\u306e\u30c7\u30d0\u30a4\u30b9\u60c5\u5831\u3092\u4e00\u89a7\u3059\u308b\u3002 xcrun simc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3988,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[35,12],"class_list":["post-3816","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-ios","tag-mac"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/3816","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=3816"}],"version-history":[{"count":3,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/3816\/revisions"}],"predecessor-version":[{"id":4069,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/3816\/revisions\/4069"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media\/3988"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=3816"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=3816"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=3816"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}