{"id":44671,"date":"2024-08-30T11:25:34","date_gmt":"2024-08-30T15:25:34","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=44671"},"modified":"2024-08-30T11:25:34","modified_gmt":"2024-08-30T15:25:34","slug":"swiftui-breaks-continuity-camera","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2024\/08\/30\/swiftui-breaks-continuity-camera\/","title":{"rendered":"SwiftUI Breaks Continuity Camera"},"content":{"rendered":"<p><a href=\"https:\/\/wadetregaskis.com\/import-from-iphone-or-ipad-doesnt-work-when-any-view-contains-a-swiftui-toggle\/\">Wade Tregaskis<\/a>:<\/p>\n<blockquote cite=\"https:\/\/wadetregaskis.com\/import-from-iphone-or-ipad-doesnt-work-when-any-view-contains-a-swiftui-toggle\/\"><p>If <em>any<\/em> view in the [active] window contains a <a href=\"https:\/\/developer.apple.com\/documentation\/swiftui\/toggle\"><code>Toggle<\/code><\/a> &#x2013; even one that&rsquo;s disabled or hidden &#x2013; then Continuity Camera (re. <code><a href=\"http:\/\/ImportFromDevicesCommands\">ImportFromDevicesCommands<\/a><\/code> and <code><a href=\"https:\/\/developer.apple.com\/documentation\/scenekit\/sceneview\/4049460-importablefromservices\">importableFromServices<\/a><\/code>) doesn&rsquo;t work; all the submenu items under &ldquo;Import from iPhone or iPad&rdquo; are disabled.<\/p>\n<p>I don&rsquo;t know if this is truly specific to <code>Toggle<\/code>, that&rsquo;s just the example case I happen to have isolated [first?].<\/p>\n<p>What&rsquo;s really weird is that once a <code>Toggle<\/code> has <em>ever<\/em> been displayed, even if you subsequently remove it from the view hierarchy entirely the &ldquo;Import from iPhone or iPad&rdquo; submenu items all remain disabled.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/07\/24\/swiftui-at-wwdc24\/\">SwiftUI at WWDC24<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2024\/01\/10\/fixing-continuity-camera\/\">Fixing Continuity Camera<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/09\/continuity-camera-at-wwdc-2022\/\">Continuity Camera at WWDC 2022<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/06\/macos-13-0-ventura-announced\/\">macOS 13.0 Ventura Announced<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Wade Tregaskis: If any view in the [active] window contains a Toggle &#x2013; even one that&rsquo;s disabled or hidden &#x2013; then Continuity Camera (re. ImportFromDevicesCommands and importableFromServices) doesn&rsquo;t work; all the submenu items under &ldquo;Import from iPhone or iPad&rdquo; are disabled. I don&rsquo;t know if this is truly specific to Toggle, that&rsquo;s just the example [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2024-08-30T15:25:36Z","apple_news_api_id":"a82b9824-902c-4f42-90f2-1e674c513f55","apple_news_api_modified_at":"2024-08-30T15:25:36Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AqCuYJJAsT0KQ8h5nTFE_VQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[131,1048,30,2385,71,1812],"class_list":["post-44671","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-bug","tag-continuity","tag-mac","tag-macos-14-sonoma","tag-programming","tag-swiftui"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/44671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=44671"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/44671\/revisions"}],"predecessor-version":[{"id":44672,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/44671\/revisions\/44672"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=44671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=44671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=44671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}