{"id":40012,"date":"2023-07-10T15:12:10","date_gmt":"2023-07-10T19:12:10","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=40012"},"modified":"2023-07-14T10:01:35","modified_gmt":"2023-07-14T14:01:35","slug":"how-the-threads-app-was-built","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/07\/10\/how-the-threads-app-was-built\/","title":{"rendered":"How the Threads App Was Built"},"content":{"rendered":"<p><a href=\"https:\/\/www.emergetools.com\/deep-dives\/threads\">Emerge Tools<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=36637295\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/www.emergetools.com\/deep-dives\/threads\"><p>Two things stand out for Threads on iOS:<\/p><ol><li>Threads has 0 dynamic libraries, whereas the <a href=\"https:\/\/www.emergetools.com\/app\/example\/ios\/com.facebook.Facebook\">Facebook app<\/a> which <a href=\"https:\/\/engineering.fb.com\/2023\/02\/06\/ios\/facebook-ios-app-architecture\/\">heavily utilizes<\/a> dynamic frameworks.<\/li><li>Threads has one of the largest plugins we&rsquo;ve ever seen. <code>BarcelonaShareExtension<\/code> is 81 MB.<\/li><\/ol><p>[&#8230;]<\/p><p>As with the Android app, it looks like they were able to share significant amounts of code between Threads &amp; Instagram to help speed up development. Threads team wanted to move fast and took whatever code it could from Instagram and shoved it where it needed to go.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/twitter.com\/preshonyee\/status\/1677733458079109122\">Cam Roth<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/preshonyee\/status\/1677733458079109122\"><p>99% native, with a home grown cross-platform solution for a few lightweight flows (think tables or reporting)<\/p><p>We utilized a bunch of existing obj-c\/obj-c++ things\nwithin IG, but 95% of the new code we wrote was\nSwift.<\/p><p>We&rsquo;ll have an eng blog post coming eventually.\nMostly Swift, almost all UIKit, a dash of SwiftUl.<\/p><\/blockquote>\n\n<p>Previously:<\/p>\n<ul>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/07\/04\/instagram-threads\/\">Instagram Threads<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2023\/02\/08\/the-evolution-of-facebooks-ios-app-architecture\/\">The Evolution of Facebook&rsquo;s iOS App Architecture<\/a><\/li>\n<li><a href=\"https:\/\/mjtsai.com\/blog\/2020\/03\/05\/rewriting-facebook-messenger\/\">Rewriting Facebook Messenger<\/a><\/li>\n<\/ul>\n\n<p id=\"how-the-threads-app-was-built-update-2023-07-14\">Update (2023-07-14): <a href=\"https:\/\/ishadeed.com\/article\/threads-app-css\/\">Ahmad Shadeed<\/a>:<\/p>\n<blockquote cite=\"https:\/\/ishadeed.com\/article\/threads-app-css\/\">\n<p>One of the most noteworthy use cases of CSS Grid in a production app is found in Threads. CSS Grid is used to build the post layout.<\/p>\n<p>[&#8230;]<\/p>\n<p>That line connecting my avatar to Mark&rsquo;s one is an SVG path.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Emerge Tools (Hacker News): Two things stand out for Threads on iOS:Threads has 0 dynamic libraries, whereas the Facebook app which heavily utilizes dynamic frameworks.Threads has one of the largest plugins we&rsquo;ve ever seen. BarcelonaShareExtension is 81 MB.[&#8230;]As with the Android app, it looks like they were able to share significant amounts of code between [&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":"2023-07-10T19:12:14Z","apple_news_api_id":"45efd9ae-4a43-41f7-af54-ff385cd1988c","apple_news_api_modified_at":"2023-07-14T14:01:37Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/ARe_ZrkpDQfevVP84XNGYjA","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":[69,338,1286,31,2185,26,71,1812,2422],"class_list":["post-40012","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-css","tag-instagram","tag-ios","tag-ios-16","tag-iosapp","tag-programming","tag-swiftui","tag-threads"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40012","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=40012"}],"version-history":[{"count":2,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40012\/revisions"}],"predecessor-version":[{"id":40066,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/40012\/revisions\/40066"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=40012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=40012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=40012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}