{"id":47377,"date":"2025-04-10T15:47:41","date_gmt":"2025-04-10T19:47:41","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=47377"},"modified":"2025-04-10T15:49:46","modified_gmt":"2025-04-10T19:49:46","slug":"awaiting-apis","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2025\/04\/10\/awaiting-apis\/","title":{"rendered":"Awaiting APIs"},"content":{"rendered":"<p><a href=\"https:\/\/x.com\/tomaskafka\/status\/1907003833546657803\">Tom&aacute;&#x161; Kafka<\/a>:<\/p>\n<blockquote cite=\"https:\/\/x.com\/tomaskafka\/status\/1907003833546657803\"><p>So, this is the first time I am filling a bug report against a whole WWDC talk asking for its retraction for misleading info and describing unimplemented features.\nIt&rsquo;s the &ldquo;Efficiency awaits: Background tasks in SwiftUI&rdquo;.<\/p><\/blockquote>\n<p>Well, they did say that it &ldquo;awaits.&rdquo;<\/p>\n<blockquote cite=\"https:\/\/x.com\/tomaskafka\/status\/1907003833546657803\">\n<p>The talk describes <code>.backgroundTask(.urlSession(\"...\")) {}<\/code> modifier, and leaves its body empty - because there is no valid code that could work there. This part seems to be entirely unimplemented, probably planned to be finished for WWDC 22, but never completed even 3 years later.<\/p>\n<p>If you google the code, you will find many developers having spent hours and days trying to implement the solution from this talk, only to end up in dead end.<\/p>\n<\/blockquote>\n\n<p>More details are in this <a href=\"https:\/\/developer.apple.com\/forums\/thread\/726443?answerId=823711022&amp;page=1#832295022\">forum post<\/a>.<\/p>\n\n<p>I recently wasted time on a similar issue, trying to get Core Data&rsquo;s <code>indexed:by:<\/code> function to work. It&rsquo;s supposed to be the equivalent of <a href=\"https:\/\/www.sqlite.org\/lang_indexedby.html\">this<\/a>. I wasn&rsquo;t able to find the function in the <a href=\"https:\/\/developer.apple.com\/documentation\/foundation\/nsexpression\">documentation<\/a>, but I had notes on it from WWDC 2017 Session 210, where it was displayed on a slide and also live-demoed. This wouldn&rsquo;t be the first time the documentation was missing. But in this case it looks like the implementation is also missing, i.e. that the function was pulled after the demo. I don&rsquo;t know why&mdash;it seems like a straightforward feature that they already had working. (Perhaps a hint that it was in flux is that the order of the function&rsquo;s arguments are backwards in the slide vs. in the demo code.)<\/p>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2025\/04\/09\/soured\/#comment-4247732\">Soured<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2022\/06\/17\/swiftui-changes-at-wwdc-2022\/\">SwiftUI Changes at WWDC 2022<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Tom&aacute;&#x161; Kafka: So, this is the first time I am filling a bug report against a whole WWDC talk asking for its retraction for misleading info and describing unimplemented features. It&rsquo;s the &ldquo;Efficiency awaits: Background tasks in SwiftUI&rdquo;. Well, they did say that it &ldquo;awaits.&rdquo; The talk describes .backgroundTask(.urlSession(\"...\")) {} modifier, and leaves its body [&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":"2025-04-10T19:47:43Z","apple_news_api_id":"8af28fce-a4e8-40b6-99a3-df0f9a875316","apple_news_api_modified_at":"2025-04-10T19:47:43Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AivKPzqToQLaZo98PmodTFg","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":[109,31,2586,30,2598,71,2200,1812,1221],"class_list":["post-47377","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-coredata","tag-ios","tag-ios-18","tag-mac","tag-macos-15-sequoia","tag-programming","tag-swift-concurrency","tag-swiftui","tag-wwdc"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/47377","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=47377"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/47377\/revisions"}],"predecessor-version":[{"id":47379,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/47377\/revisions\/47379"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=47377"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=47377"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=47377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}