1

We all love the Facebook SDK for iOS, if you go here to download it,

https://developers.facebook.com/docs/ios/getting-started

for some reason you get this sort of insane .pkg file,

enter image description here

which APPEARS TO ONLY create the "FacebookSDK" folder in your "Documents" folder.

enter image description here

Then you just move it where you want, wondering "Why the hell do they do that?"

Does anyone know

  1. Is there on Facebook.com an official link somewhere to simply a zip of the library?
  2. Is there a reason they use the package system? (Does it -- check on versions, or something - does it check you have needed stuff on your Mac maybe?)
  3. Does it drop any crap anywhere that one has to clean up? Is it mildly malicious at all?
C. K. Young
  • 219,335
  • 46
  • 382
  • 435
Fattie
  • 27,874
  • 70
  • 431
  • 719
  • This question appears to be off-topic because it is about Facebook's iOS SDK distribution method and not a programming question for use of that SDK – Igy Jul 09 '14 at 17:11
  • Have you had a look at using Cocoapods? I use it whenever I can to manage framework dependencies. Anyway, the Facebook SDK is available in Cocoapod form too. It will download the framework and install it into your project for you. – Fogmeister Jul 09 '14 at 17:12

1 Answers1

2

The installer also installs the docset.

You can check in Terminal to see what's going on:

First, expand the installer from inside your Downloads directory:

$ mkdir facebook_sdk
$ cd facebook_sdk
$ xar -xf ../facebook-ios-sdk-3.15.1.pkg

This will create a new pkg file which is just a directory. cd into that and unzip the Payload:

$ cd FacebookSDK.pkg
$ cat Payload | gunzip -dc |cpio -i

Then open the directory in Finder to browse the contents:

$ open -a finder .

You'll be able to see what gets copied where, and you can just pull out whatever you want:

Guts of Facebook SDK

To answer your questions more specifically:

Is there on Facebook.com an official link somewhere to simply a zip of the library?

To my knowledge, no, but you can use CocoaPods to get it.

Is there a reason they use the package system? (Does it -- check on versions, or something - does it check you have needed stuff on your Mac maybe?)

It might remove old deprecated files when installing new versions, and it makes it easier to install the docs.

Does it drop any crap anywhere that one has to clean up? Is it mildly malicious at all?

It's not malicious. You might not want the docs if you're tight on space.

Aaron Brager
  • 65,323
  • 19
  • 161
  • 287