Timac

blog.timac.org · Personal blog · on HN since 2008

Timac, an iOS and macOS developer, reverse engineers apps and analyzes how Apple and Facebook use Swift and other frameworks.

What HN saysHN commenters cite his analysis of the Facebook iOS app to explain why app sizes grow, noting most of it is code.
45HN people shared it
30linked it in comments
43stories submitted
1.6Kstory points
5 months agolast shared
2008people per year2026

Most-shared posts

  1. 1
    Analysis of the Facebook app for iOS
    9 people · 152 points · first shared 2017 · 53 comments on HN
  2. 2
    0410 analysis of the facebook app for ios v 87 0
    6 people · first shared 2018
  3. 3
    Apple’s use of Swift and SwiftUI in iOS 16
    5 people · 62 points · first shared 2022 · 12 comments on HN
  4. 4
    Apple’s use of Swift in iOS 12
    4 people · 188 points · first shared 2018 · 139 comments on HN
  5. 5
  6. 6
    Apple’s use of Swift and SwiftUI in iOS 15
    3 people · 248 points · first shared 2021 · 163 comments on HN
  7. 7
    Comparing iPhone OS 1.0 with iOS 14 using tree maps
    3 people · 209 points · first shared 2020 · 77 comments on HN
  8. 8
    Apple's use of Swift and SwiftUI in iOS 18
    3 people · 22 points · first shared 2024 · 3 comments on HN
  9. 9
    Apple’s use of Swift in iOS 11.1 and macOS 10.13.1
    3 people · 5 points · first shared 2017 · discussion on HN
  10. 10
  11. 11
  12. 12
    Apple's use of Swift and SwiftUI in iOS 17
    3 people · 3 points · first shared 2023 · discussion on HN
  13. 13
    Apple’s Use of Swift in iOS 13
    2 people · 174 points · first shared 2019 · 154 comments on HN
  14. 14
  15. 15
    Deobfuscated libMobileGestalt keys (iOS 12)
    2 people · 4 points · first shared 2018 · discussion on HN

What HN people wrote when they linked it

segphault · 2017-04-22
Facebook is the world's largest PHP shop. Does that mean that everyone should use PHP? As it turns out, moving fast and breaking things isn't all that conducive to quality engineering[1][2]. Facebook has a massive legacy code base maintained by an enormous team that is under pressure to iterate quickly while supporting what is arguably the world's largest user base. They are dealing with extremely specialized constraints that most of us will never encounter. Many of the trade-offs they consider acceptable aren't trade-offs that make sense elsewhere. And that's exactly what the blog post is getting at. A lot of these emerging technologies are situationally useful in a particular set of scenarios and environments, but developers with cargo cult mentality convince themselves that these things will solve all of their problems if they use them everywhere. When the disappointment sets in and they figure out that isn't the case, yesterday's darling stack becomes the subject of today's "considered harmful" essays and everybody moves on to the next shiny thing. The point here is that maybe you should make a sober assessment of new technologies and objectively evaluate whether they are actually practical for your usage scenario rather than just blindly jumping on the bandwagon and using something. The examples from the blog post are totally on point. I previously worked at a company that built a NoSQL database and I have great affinity for the technology, but there's no question…
codesternews · 2018-09-19
The below links provide great analysis of facebook app. They have ridiculous long class and method names. I have seen many classes which are too long. Most of the app space took by these strings and third party libraries etc. Some thing like this can be seen in whole code base: `NTNativeTemplateHackyWorkaroundBecauseNSMapTableIsBuggyContainer` https://blog.timac.org/2016/1018-analysis-of-the-facebook-app-for-ios/ https://blog.timac.org/2017/0410-analysis-of-the-facebook-app-for-ios-…
saagarjha · 2018-03-31
> Reversing the Unprotect Algorithm Protected binaries have everything after the first three pages encrypted with 512-bit Blowfish. The key is the “Don’t steal Mac OS X” poem (I believe with spaces removed): Your karma check for today: There once was was a user that whined his existing OS was so blind, he'd do better to pirate an OS that ran great but found his hardware declined. Please don't steal Mac OS! Really, that's way uncool. (C) Apple Computer, Inc. Fun fact: CommonCrypto doesn’t do Blowfish with a key size this large anymore due to CVE-2016-1802: https://blog.timac.org/2016/0710-blowfish-operations-with-key-size-lon…
ghostly_s · 2017-08-01
There were a few articles with actual content on this topic covered on Daring Fireball in recent months. Not sure what this blog blurb is adding to the conversation. 1. https://sensortower.com/blog/ios-app-size-growth 2. http://blog.timac.org/?p=1707 3. https://blog.halide.cam/one-weird-trick-to-lose-size-c0a4013de331
potatolicious · 2017-08-01
I think this is likely the biggest culprit. Another user pointed out an analysis of the Facebook app: http://blog.timac.org/?p=1707 Most of it is actual code - not assets. For some types of apps (see: games) assets do take up a significant portion of total size, but for most everyday apps bloat by code over-inclusion is likely a bigger problem than asset-bloat. I wonder if it's possible to get major open-source libs to move towards more fine-grained build targets and internal dependency management, so that devs don't pull in a gigantic binary when they're only using a small slice of the functionality.
0x0 · 2017-06-24
Somebody posted a breakdown of Facebook.app earlier this year. Looks like a lot of duplicated assets in there (too many developers / teams working on different parts of the app?) http://blog.timac.org/?p=1707 HN discussion: https://news.ycombinator.com/item?id=14082491
CalChris · 2017-04-13
My Facebook iPhone app weighs in at 241 MB. It has massive redundancy and you can say that again. http://blog.timac.org/?p=1707 Still, I have to say that there is indeed an opportunity for a few low level people there.
throw5938 · 2017-04-11
Seems like Apple needs to disincentivize the use of Electron and other user hostile technologies somehow before anything will change. They also need to crackdown on the Facebook app. http://blog.timac.org/?p=1707
JimDabell · 2026-06-13
Alexandre Colucci has published a series of articles analysing the use of Swift in iOS and macOS by Apple here: https://blog.timac.org/categories/reverse-engineering/ And frequently discussed on Hacker News: https://hn.algolia.com/?dateRange=all&page=0&prefix=false&…
Terretta · 2024-11-09
“Apple's privacy is just marketing smoke and mirrors” — an HN commenter, probably For every privacy feature Apple advertise to consumers about, there are ten they didn't, that still very much raise the bar. The quiet improvements are so under-marketed that even technically savvy users aren't aware of most of them. There was a period before MDM matured that certain three letter U.S. Gov agencies forbade iPhones. Not because they were insecure, but because the agency's infosec team couldn't surveil the devices or break in to do a data dump if the employee was under investigation. Certainly, they still have zero days, and vulns dating back longer than anyone would like. So it's interesting what's happening to iOS use of C: https://blog.timac.org/2023/1019-state-of-swift-and-swiftui-ios17/
akyuu · 2024-09-25
Apple is still adding large amounts of new Objective-C code in each new macOS version [0]. I haven't found any language usage numbers for recent versions of Windows, but Microsoft is using Rust for both new development and rewriting old features [1] [2]. [0] Refer to section "Evolution of the programming languages" https://blog.timac.org/2023/1128-state-of-appkit-catalyst-swift-swiftu… [1] https://www.theregister.com/2023/04/27/microsoft_windows_rust/ [2] https://www.theregister.com/2024/01/31/microsoft_seeks_rust_developers…
Eric_WVGG · 2024-01-05
This is turning into a silly argument… but anyway there's a blogger who has been tracking the number of binaries written in the various languages (and appkit vs catalyst vs swiftui etc.) for years. Sonoma is 13% Swift (up from 11% in Ventura), 53% Obj-C (down from 55% in Ventura). The priority actually appears to be eating away from the C/C++ parts of the codebase (currently 33%, down from 42% just two releases ago). https://blog.timac.org/2023/1128-state-of-appkit-catalyst-swift-swiftu…
HALtheWise · 2023-11-02
The entirety of iPhone OS 1.0 fits in the same storage requirements as the built-in wallpapers of the latest releases, so presumably about that much space? Presumably it could be downloaded when you actually have an app that needs it. https://blog.timac.org/2020/1122-comparing-iphone-os-with-ios-14-using…
Timac · 2023-10-20
See the previous blog post on creating Charts in Markdown using Apache ECharts: https://blog.timac.org/2023/0627-charts-in-markdown-using-apache-echar…
lapcat · 2023-08-12
> Are people still using it today? Yes, I am. Apple is too: https://blog.timac.org/2022/1005-state-of-swift-and-swiftui-ios16/
pjmlp · 2022-10-14
Rust isn't the only game in town moving into safer lands. > Swift adoption continues its exponential climb and surpassed C++ this year. From https://blog.timac.org/2022/1005-state-of-swift-and-swiftui-ios16/ > I propose that we start requiring an existing Swift compiler to build the Swift compiler. This opens the door to non-optional (mandatory) parts of the compiler to be implemented in Swift. From https://forums.swift.org/t/implementing-parts-of-the-swift-compiler-in…
dangus · 2022-01-27
Apple is already writing more of the OS in Swift: https://blog.timac.org/2021/1219-state-of-swift-and-swiftui-ios15/
seanalltogether · 2021-12-20
Whats really surprising is if you look at the results, the only pure swift binary (that isn't under libswift*) is a protocol buffers library, rather then adapting the existing c++ one maintained by google. /System/Library/PrivateFrameworks/CloudKitCodeProtobuf.framework/CloudKitCodeProtobuf |Swift https://blog.timac.org/2021/1219-state-of-swift-and-swiftui-ios15/iOS1…
_qulr · 2021-02-12
> there's every indication that all new Apple frameworks are being written in Swift There's no such indication. "The number of binaries using Objective-C is still growing with each iOS release." https://blog.timac.org/2020/1019-evolution-of-the-programming-language…
Apocryphon · 2020-05-07
This isn't exactly the first time Facebook has been called out for poor engineering practices: https://www.darkcoding.net/software/facebooks-code-quality-problem/ https://blog.timac.org/2017/0410-analysis-of-the-facebook-app-for-ios-…
chubs · 2019-10-23
Really? I read otherwise: https://blog.timac.org/2019/0926-state-of-swift-ios13/ It'd be hard to know unless you worked there. It's just a wild theory, I might be wrong :)
steveklabnik · 2019-09-26
Yep, same page. Chrome 76.0.3809.132 (Official Build) (64-bit) (cohort: Stable), Windows 10. That said, I guess I needed to update Chrome, so I just did to 77.0.3865.90 (Official Build) (64-bit) (cohort: Stable) , and same error. Here's a "copy as cURL" for the request, maybe that can help? curl 'https://blog.timac.org/2019/0926-state-of-swift-ios13/' -H 'authority: blog.timac.org' -H 'cache-control: max-age=0' -H 'upgrade-insecure-requests: 1' -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36' -H 'sec-fetch-mode: navigate' -H 'sec-fetch-user: ?1' -H 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3' -H 'sec-fetch-site: cross-site' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9' --compressed
mitchty · 2019-05-03
Its not like facebook applications haven't had insane amounts of duplicated resources and crazy amounts of gigantic libraries/frameworks: https://blog.timac.org/2017/0410-analysis-of-the-facebook-app-for-ios-… Not sure if its relevant for messenger or not, but I wouldn't be surprised if messenger was overly huge for the task its performing.
mnem · 2018-12-27
Timac analysed several MacOS and iOS versions for swift usage, and its growing through the system surprisingly rapidly for a language awaiting a stable ABI. Here’s the most recent analysis, which also links to others: https://blog.timac.org/2018/0924-state-of-swift-ios12/
yathern · 2018-06-28
> But when you keep pushing JavaScript technology into stuff... you end up with multiple almost 300 MB apps to share some images and text I would be hesitant to solely Javascript for the bloat of Instagram, and related apps. On phones, typically the WebView is used - not like using Electron where chromium + v8 is packaged with each application. A Cordova application can easily be in the single-digit MB range. Facebook is a native app - and is 300MB+ in size. A breakdown is available here: https://blog.timac.org/2017/0410-analysis-of-the-facebook-app-for-ios-… Mostly it comes down to the fact that app size is not a prioritization.
GeekyBear · 2024-09-27
Given that the person who created LLVM also created Swift, the ability to be used as a systems programming language was always there. Chris Lattner, the creator of both LLVM and Swift, has referred to Swift as “syntactic sugar for LLVM.” They are deeply tied together. The amount of Swift code in Apple's operating systems has increased every year. https://blog.timac.org/2023/1019-state-of-swift-and-swiftui-ios17/ Lattner gave an interview looking at the advantages of reference counting over the sort of garbage collection used in languages like Java, C#, and Go while still avoiding error-prone manual memory management. > ARC has clear advantages in terms of allowing Swift to scale down to systems that can’t tolerate having a garbage collector, for example, if you want to write firmware in Swift. I think that it does provide a better programming model where programmers think just a little bit about memory. https://atp.fm/205-chris-lattner-interview-transcript#gc
dwaite · 2022-12-28
> Does SwiftUI really count as native on the Mac? My experience is that Apple has not invested enough for that to be true https://blog.timac.org/2022/1005-state-of-swift-and-swiftui-ios16/ iOS 16.0 included 226 SwiftUI apps. Several highly promoted features (such as complications on the Lock Screen and widgets) are now only possible using SwiftUI. Some new SwiftUI only frameworks (like Swift Charts) developed directly from internal Apple teams creating new SwiftUI apps, and factoring out useful components. > Regardless, inconsistencies between AppKit on Mac and SwiftUI on Mac are enough to make it not native, IMO. SwiftUI is not a wrapper around AppKit controls, although that is/was how some SwiftUI views are authored. Likewise, some recently added AppKit controls are actually wrapped SwiftUI views. There is an ongoing effort to unify macOS and iPadOS which became much more noticeable at the UX level in macOS 11. It is unfortunately difficult to determine which inconsistencies are deficiencies in SwiftUI and which are the "legacy" behavior of AppKit. Since SwiftUI is a system framework, we only see its evolution in spurts on an annual schedule.
TheTon · 2022-09-18
There is a lot of C++ at Apple. It's of course possible to work there and never touch it, but it's also possible to work there and do almost all your work in C++. Many significant parts of iOS and macOS are written in C++, for example WebKit, the implementations of ObjC and Swift, clang/llvm, dyld, CoreAudio, CoreAnimation, WindowServer, Dock, Finder, etc. I enjoy this[1] annual series of blog posts on Apple's usage of Swift in iOS. I just did a quick and dirty, but similar analysis of Apple's usage of C++ of the macOS 12.5.1 install on my computer. I extracted my dyld_shared_cache, and then used find and nm to count up binaries containing unstripped C++ symbols. This undercounts the usage of C++, since sometimes it's used only internally in stripped binaries, and I also think the number of binaries metric probably undercounts the importance of C++ because the ones that do use C++ tend to be more significant binaries, but even still it gives some idea of the scope of C++'s use at Apple. About 25% (559 / 2292) of the libraries in the dyld_shared_cache contain unstripped C++ symbols. About 15% (22 / 154) of executables in /System/Applications (so 1st party apps / helpers that ship with the system) do. That said, I think you're probably right that things are changing. Probably there are lots of people at Apple thinking of how they can replace C++ with Swift in their code. But on the other hand, I would not be surprised if we can still find significant uses of C++ in…

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close