Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by saagarjha on Wednesday May 06, 2020 @08:30PM
(#23098227)
Eh, I wouldn't go that far; they do have their uses. But for a SDK author, it pays to be excessively cautious when putting things on the application startup path. (Something which the Facebook is well aware of, as the dyld session is always full of their company's engineers, and the architecture of their app shows that put effort into meeting launch deadlines…)
[ Parent
| on HN ]
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by favorited on Thursday May 07, 2020 @03:28AM
(#23100610)
Every bad thing has its uses. If an SDK author wants to be a responsible participant in the app's startup path, it will defer its own setup to the app.
`__attribute__((constructor))` is most obviously a hack – like any great hack, it is useful enough to be implemented everywhere, but it will never be standardized because everyone acknowledges that it sucks. I used to use it! But it is extremely limited in its usefulness, and there are always better solutions to the problem.