{"id":37461,"date":"2022-10-27T15:39:53","date_gmt":"2022-10-27T19:39:53","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=37461"},"modified":"2022-10-28T18:25:29","modified_gmt":"2022-10-28T22:25:29","slug":"venturas-open-at-login-vs-allow-in-the-background","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2022\/10\/27\/venturas-open-at-login-vs-allow-in-the-background\/","title":{"rendered":"Ventura&rsquo;s &ldquo;Open at Login&rdquo; vs. &ldquo;Allow in the Background&rdquo;"},"content":{"rendered":"<p><a href=\"https:\/\/developer.apple.com\/forums\/thread\/713830?answerId=726511022#726511022\">Quinn<\/a>:<\/p>\n<blockquote cite=\"https:\/\/developer.apple.com\/forums\/thread\/713830?answerId=726511022#726511022\"><ul><li><p>Open at Login shows a list of login items, per the legacy <code>kLSSharedFileListSessionLoginItems<\/code> API.  These items are always launched at login, and are intended to be under the control of the user.<\/p><\/li><li><p>Allow in the Background has different semantics.  This is an allowlist.  It doesn&rsquo;t show what programs <em>will<\/em> be launched at login, it shows what programs are <em>allowed<\/em> to be launched at login.<\/p><\/li><\/ul><p>You can see this with the <code>SMLoginItemSetEnabled<\/code> API:<\/p><ol><li><p>Enable your Service Management login item by calling <code>SMLoginItemSetEnabled<\/code> with <code>true<\/code>.<\/p><\/li><li><p>The item shows up in the Settings list.<\/p><\/li><li><p>Back in your app, disable your login item by calling <code>SMLoginItemSetEnabled<\/code> with <code>false<\/code>.<\/p><\/li><li><p>The item <em>still<\/em> shows up in the list.<\/p><\/li><\/ol><\/blockquote>\n\n<p>Via <a href=\"https:\/\/twitter.com\/siracusa\/status\/1583914093437935616\">John Siracusa<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/siracusa\/status\/1583914093437935616\"><p>Can this really be true? If an app ever wants to be <em>able<\/em> to launch on login in Ventura, it must forever appear in the &ldquo;Allow in the Background&rdquo; section of the Login Items screen in System Settings?<\/p><p>The new <code>SMAppService.mainApp.register()<\/code> and <code>unregister()<\/code> calls will add and remove an app from the &ldquo;Open at Login&rdquo; section, but nothing seems to remove an app from the &ldquo;Allow in the Background&rdquo; section.<\/p>\n<p>[&#8230;]<\/p>\n<p>To be clear, the problem with Ventura listing apps set to launch on login under the &ldquo;Allow in Background&rdquo; section is that it implies they can &ldquo;perform tasks when the app is not running,&rdquo; as the text says. But launch on login is not that!<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/siracusa\/status\/1584194011908087809\">John Siracusa<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/siracusa\/status\/1584194011908087809\">\n<p>Ventura&rsquo;s handling of &ldquo;launch on login&rdquo; will make users suspicious of apps that the OS says can do stuff when they&rsquo;re not running, even if that isn&rsquo;t true. And when a developer explains, the user won&rsquo;t believe the truth because the OS says otherwise. It sows distrust and worry.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/_inside\/status\/1584200107854962688\">Guilherme Rambo<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/_inside\/status\/1584200107854962688\">\n<p>There should definitely be a distinction between simple login items and launch agents \/ daemons, which are the things that do in fact allow an app to do stuff when it&rsquo;s not running.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/siracusa\/status\/1584201091998044162\">John Siracusa<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/siracusa\/status\/1584201091998044162\">\n<p>Also, this is only a problem for apps that want to work on pre-Ventura versions of macOS. If your app requires Ventura, you can use <em>only<\/em> the new Ventura-specific API to launch on login and keep your app out of the &ldquo;runs in background&rdquo; list.<\/p>\n<\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/ismh\/status\/1584984585037058048\">Stephen Hackett<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/ismh\/status\/1584984585037058048\"><p>I&rsquo;m not sure this new notification in macOS Ventura could be less helpful if it tried. What items? What is &ldquo;System Events.app&rdquo; and why is it in quotes?<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/superezfe\/status\/1584991122451206146\">Ezekiel Elin<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/superezfe\/status\/1584991122451206146\">\n<p>I've filed a few FBs about this system over the summer, most notably that it tends to just dump a whole bunch of alerts on the user at once<\/p>\n<p>Like, jeesh<\/p>\n<\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/10\/25\/macos-13-0-ventura\/\">macOS 13.0 Ventura<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/07\/28\/ventura-notifies-user-of-new-login-items\/\">Ventura Notifies User of New Login Items<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Quinn: Open at Login shows a list of login items, per the legacy kLSSharedFileListSessionLoginItems API. These items are always launched at login, and are intended to be under the control of the user.Allow in the Background has different semantics. This is an allowlist. It doesn&rsquo;t show what programs will be launched at login, it shows [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2022-10-27T19:39:55Z","apple_news_api_id":"4c6f27ba-3acb-4892-997c-a4e2e0ec2980","apple_news_api_modified_at":"2022-10-28T22:25:32Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAg==","apple_news_api_share_url":"https:\/\/apple.news\/ATG8nujrLSJKZfKTi4OwpgA","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":[2],"tags":[77,2296,30,2223,111,1181],"class_list":["post-37461","post","type-post","status-publish","format-standard","hentry","category-technology","tag-design","tag-login-items","tag-mac","tag-macos-13-ventura","tag-notificationcenter","tag-system-preferences"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37461","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=37461"}],"version-history":[{"count":3,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37461\/revisions"}],"predecessor-version":[{"id":37500,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/37461\/revisions\/37500"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=37461"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=37461"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=37461"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}