r/iOSProgramming • u/soulchild_ Objective-C / Swift • Jul 10 '20
Facebook SDK crashes again š”š
https://github.com/facebook/facebook-ios-sdk/issues/143096
24
u/unixboy Jul 10 '20
Donāt use Facebook in your apps guys. Get rid of this BS. I understand people like ālogin with FBā but now with āLogin with Appleā thereās no reason not to use this instead. And you instantly get rid of coding, privacy and security issues.
3
u/JimDabell Jul 11 '20
The main reason our customers want the Facebook SDK in their apps is not because of Facebook Login, but because they pay for ads on Facebook to promote their apps and the Facebook SDK is the only way they have to attribute new installs to the ads they are paying for. Removing the Facebook SDK means not knowing how effective their Facebook ad campaigns are.
3
u/thecodingart Jul 11 '20
I understand this, but itās a poor choice overall to rely on a black box that silos itself for data aggregation. FB is one of the only analytic platforms where you HAVE to use their SDK for write operations on their analytics platform and forces you to implement their SDK for it (with all of the risk and shadow stuff they do itās ludicrous). Normally , you could selectively send information to a platform via an integration, aggregate or web hook without invading the client (restricting exactly what data is sent). In no way can I say that customer Facebook marketing trumps the product quality sacrifice taken when implementing the SDK.
1
1
u/jamaicanjerkperson Jul 10 '20
Tracking reasons, especially if youāre being paid to track your users
12
u/wesdegroot objc_msgSend Jul 10 '20
The one and best solution, respect privacy, and delete the Facebook SDK. They even initialize always, without need, they only need to be for a moment active if the user logs in using Facebook...
10
10
u/dobybest Jul 10 '20 edited Jul 10 '20
The crash log :
Spotify -[NSNull count]: unrecognized selector sent to instance 0x1f638fae8
12
u/MattDamonInSpace Jul 10 '20
Obj-C strikes again
8
u/dobybest Jul 10 '20
Don't blame the game, blame the player ...
0
Jul 10 '20
[deleted]
3
u/etaionshrd Objective-C / Swift Jul 11 '20
Donāt shoot the messenger, just throw an exception when you donāt recognize the message
1
u/etaionshrd Objective-C / Swift Jul 11 '20
Nothing to do with Objective-C. Swift would likely crash just the same here.
1
u/MattDamonInSpace Jul 11 '20
Nah there wouldāve had to have been a casting to a given type. The issue here is that an unexpected type (NSNull) got a message it couldnāt handle
3
u/Aprox15 Jul 10 '20
I was thinking about including the SDK to make a test using Facebook Installs ads. Anyone knows if those are secure or also affected by the crashes?
9
u/miguelgazela Jul 10 '20
It doesnāt matter what youāre using inside the SDK, it would still crash. Even if you donāt call anything from the SDK it will still try to run some configurations and thatās what crashing.
3
u/Armond404 Jul 11 '20
I'm having the SDK removed from two apps I growth and advise.
no more data for Zuck.
2
u/20InMyHead Jul 10 '20
Since we only use the FBSDK to login, I spent the morning playing around to see if I could delay starting the FBSDK until a user specifically wanted to login with FB.... seems simple at first, but then was giving me all sorts of issues. Bastards donāt want you to do that apparently.
Will need to look into our own oAuth code or something because the FBSDK problems are just not worth the hassle, nor the risk of killing all our users just to support the small number that use FB.
2
3
21
Jul 10 '20
[removed] ā view removed comment
18
u/hawks008 Jul 10 '20
The SDK, even though you havenāt personally used it, will try and configure some parts of itself from the Facebook servers. There is an error in the response coming from Facebook that the sdk doesnāt know how to handle currently, hence the crash.
9
u/kechboy63 Jul 10 '20
Funny thing is that it happens even if you donāt ā@importā their SDK. Only it being present in the bundle is enough for it to crash so thereās some deep level stuff going on.
10
u/nkr3 Jul 10 '20
They're probably using +load from objective c... https://developer.apple.com/documentation/objectivec/nsobject/1418815-load?language=objc
2
u/ThePowerOfStories Jul 11 '20
And furthermore, their SDK has garbage code that hits fatal errors on what looks like decoding JSON that isnāt in the expected format, when it should be validating the data and failing gracefully without crashing the whole app. The fact that this is the second time this has started happening in a few months is an abject embarrassment of incompetence.
7
Jul 10 '20
Facebook SDK is used for Facebook Ad conversion tracking, analytics, and many other behind-the-scenes things. I buy ads for my apps on Facebook/Instagram, and I have the Pod installed only for the purpose of being able to track my install conversion rates from those ads.
I donāt use Facebook anywhere visibly within the app otherwise.
1
59
u/StunningBank Jul 10 '20
Now I want to remove Facebook SDK from my app since itās the second time and it looks like Facebook does not take it seriously.
The only question: how can I migrate users authenticated through Facebook already? Maybe it is possible to make authentication without their sdk? What would you suggest?