Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by MCKapur on Wednesday May 06, 2020 @07:31PM
(#23097724)
i mean, they offer FB sign in in the app, so the FB SDK is bundled with the app binary. looks like the mere presence of the library is causing crashes. someone on a related GH thread noted they commented out the code invoking the FB SDK but the issue remained.
[ Parent
| on HN ]
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by surferbayarea on Wednesday May 06, 2020 @07:34PM
(#23097758)
Yeah these SDKs are siphoning off data without authorization like your location, songs you listen to and who knows what else (eg other processes or apps running on your phone). Eg the latest iOS exploit allows any app to get access to all SMS data.
Tech companies of today trample upon individual privacy openly. Amazing!
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by MCKapur on Wednesday May 06, 2020 @07:37PM
(#23097785)
i'm by a longshot no facebook fan but... are you sure the SDK can actually siphon out what songs you listen or your location from the app it's sandboxed in (which, BTW, is in its own sandbox from an iOS system POV, and also has its own set of permissions)?
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by lucasar on Wednesday May 06, 2020 @07:43PM
(#23097843)
I am an iOS developer and most likely the problem is related to configuration and basic analytics, not "siphoning" app data.
Offending code :
if (restrictiveParams[eventName][@"is_deprecated_event"]) {
[deprecatedEventSet addObject:eventName];
}So, the iOS library does not check for nil, and whatever the server is returning does not have the expected content. Lame.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by bryansum on Wednesday May 06, 2020 @09:36PM
(#23098684)
Looks like that would've probably been caught if it were written in Swift.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by K0nserv on Thursday May 07, 2020 @08:00AM
(#23102011)
if (restrictiveParams[eventName] as! [String: Any])["test"] != nil
In Swift, now hopefully you wouldn't write this code but it's not entirely unlikely too. In fact the above Objective-C snippet is one of the few cases where Objective-C's forgiving `nil` behaviour doesn't save you from a crash.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by surferbayarea on Wednesday May 06, 2020 @07:43PM
(#23097847)
Well the reason FB/Foursquare/Google etc add these to 3rd party apps is so they can get data. Example if you visit a website which has a Facebook like button, your browser fetches the js files/which maybe even makes an API call to let FB know your IP (and hence location). All this data is fed to the giant system that feeds you ads.
Adding their SDK to other apps/sites (even if there is no user facing need) is a common strategy used by most big companies to get data. In return the app that puts in the SDK gets $ from the company.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by traek on Thursday May 07, 2020 @01:24AM
(#23099987)
Of the companies you named, Foursquare's business model explicitly revolves around paying apps for user location data and selling it.
I doubt (and at least from my experience around SV, haven't seen) that FB/Google are paying apps to include their SDKs.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by lucasar on Wednesday May 06, 2020 @08:50PM
(#23098373)
You have no idea what you're talking about. Apps use the Facebook library because a good portion of end-users want to be able to login with a Facebook button --or Google, or whatever that doesn't require them to create a user/password account. It's just that simple.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by surferbayarea on Wednesday May 06, 2020 @09:07PM
(#23098505)
I have been witness to such business partnerships to embed SDKs to siphon telemetry/other data. The world is not as simple as you think...
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by MCKapur on Wednesday May 06, 2020 @09:10PM
(#23098515)
well, this would be extremely believable
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by ratww on Thursday May 07, 2020 @03:16AM
(#23100549)
If you only need login, then you can have the same functionality without the Facebook SDK or Google SDK by using OAuth.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by zlorch on Thursday May 07, 2020 @01:53AM
(#23100099)
I think he's talking in general. I worked at Spotify for a while and I can tell you the only reason they have the FB SDK bundled is to provide login.
They dont use FB for any tracking or attribution at all, for that they have other frameworks. They are aware of the FB SDK misbehaving in some cases and do take steps to prevent it.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by bvandewalle on Wednesday May 06, 2020 @07:44PM
(#23097863)
you are assuming that the Spotify app is not simply handing that data over.
I would not be surprised if there is a financial agreement in place.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by Lammy on Wednesday May 06, 2020 @08:04PM
(#23098020)
Yes, requiring the SDK to implement Facebook Login is the decision that's being criticized. Facebook encourages SDK usage obviously for the data collection it enables, but even they provide an OAuth-only login flow that doesn't require the SDK at all: https://developers.facebook.com/docs/facebook-login/manually...
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by aconley314 on Wednesday May 06, 2020 @07:40PM
(#23097808)
Then if this can be fixed by a server side change as suggested below, that's worrisome, since it suggests it is communicating with FB even if you don't invoke it.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by MCKapur on Wednesday May 06, 2020 @07:41PM
(#23097820)
the real question though is if the library is not even imported into the main app and just left hanging around, linked, would it still crash? i'd be curious to know
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by nicoburns on Wednesday May 06, 2020 @08:14PM
(#23098100)
Apparently yes: https://news.ycombinator.com/item?id=23097887