Fix image previews in Scrumptious (and other minor changes)

Summary:
Fixed image previews to scale with aspect ratio instead of stretching
Fixed orientation of uploaded photos
Set the announce button to disabled when uploading photo
Changed capitalization of "Select one" to be consistent

Test Plan: Ran Scrumptious; specifically tested uploading photos

Reviewers: jacl, clang

Reviewed By: jacl

CC: msdkexp@, bhiller

Differential Revision: https://phabricator.fb.com/D545658

Task ID: 1176760
Fix permissions in BooleanOG

Summary: The permission publish_action was removed in a previous change (D538468). This fix puts it back.

Test Plan:
Run Boolean OG
- Remove the permissions for BooleanOG on Facebook
- Re-authenticate when logging in
- Try to and/or truth values

Reviewers: jacl, clang

Reviewed By: clang

CC: msdkexp@, bhiller

Differential Revision: https://phabricator.fb.com/D545677

Task ID: 1350386
Adds IBOutlet to delegate properties

Summary: Makes delegates designable using interface builder.

Test Plan: Tried designing delegates using IB. Ran unit tests.

Reviewers: clang, ayden, mmarucheck

Reviewed By: mmarucheck

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D546635

Task ID: 1342888
[ios-sdk] Update NSDate serialization to support new "Events Timezone" platform migration.

Summary:
{VFU} The "Events Timezone" platform migration changes the date/time formats accepted and returned
by the Graph API. We can no longer serialize them as Unix timestamps, and must put them in ISO-8601
format instead. Older apps that are not in this migration can work around this change by explicitly
serializing dates as timestamps themselves, and sending them as strings.

Test Plan:
- Migrated unit test app into "Events Timezone" migration
- Ran unit tests

Revert Plan:

Reviewers: jacl, mmarucheck, gregschechte, ayden

Reviewed By: mmarucheck

CC: msdkexp@, platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D543336
Downgrades certain NSAssert uses to a conditional log

Summary:
We had a few buggy uses of NSAssert in the codebase, where what we really
wanted was a conditional log, in order to send the signal to a developer that
something may be amiss; but for which throwing an exception would be the
wrong remedy.

Test Plan: introduced unit test to test new logging macro, ran tests

Reviewers: clang, mmarucheck, gregschechte

Reviewed By: clang

CC: msdkexp@, platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D546960

Task ID: 1368595
Use localized collation in friend picker

Summary:
this diff changes FBGraphObjectTableDataSource to support collation, so that names are categorized and displayed
properly based on the locale of the app.
I've replicated functionality as is present in other FB apps, namely: display collation index on the right, don't show section headers
and collation index if there's too few rows, omit empty section headers, ensure correct lookup from right side (section index) to left side
(section titles). This is also consistent with the Contacts built-in app and the iOS HIG.

Test Plan:
Use Friend picker sample on various localizations (had to add supported locales to its info.plist), ensure collation is displayed correctly.
Ensure tapping on letters in the section index shows the correct section. Ensure selecting rows in the table and tapping "Done" returns correct results
to the caller.

Screenshots:
Before: http://www.facebook.com/pxlcld/8qWl
After:
English: http://www.facebook.com/pxlcld/8qWm
Russian: http://www.facebook.com/pxlcld/8qV6
Japanese: http://www.facebook.com/pxlcld/8qVd

Too few contacts:
Before: http://www.facebook.com/pxlcld/8qWf
After: http://www.facebook.com/pxlcld/8qWs

Reviewers: jacl, jketchpaw, vijaye, suhas

Reviewed By: jacl

CC: platform-diffs@lists, msdkexp@

Differential Revision: https://phabricator.fb.com/D547860

Task ID: 1354966
[ios-sdk] Added @synthesize for new collation property

Summary:
New property was added, but was not synthesized. It appears that this builds okay on Xcode 4.5, but not on earlier versions.
Added a @synthesize declaration for it.

Test Plan:
- Built in Xcode 4.3

Revert Plan:

Reviewers: karthiks, jacl, leon

Reviewed By: karthiks

CC: platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D550064
Create FBGraphUserLocation type

Summary: Created a type for FBGraphUser.location, since the data is different from FBGraphPlace.location.

Test Plan: Ran unit tests

Reviewers: jacl, clang

Reviewed By: jacl

CC: msdkexp@, platform-diffs@lists, bhiller

Differential Revision: https://phabricator.fb.com/D549686

Task ID: 1347757
[ios-sdk] Fix bug in place picker with october_2012 migration.

Summary:
The 'october_2012' migration introduced API changes that the friend picker was handling, but the place picker
needs the corresponding change.

Test Plan:
- Ran app in october_2012 migration
- Ran PlacePickerSample (not in migration)

Revert Plan:

Reviewers: jacl, mmarucheck, gregschechte, ayden

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D552014

Task ID: 1393457
Addresses a few issues for hotfix

Summary:
Issues addressed here are -
* Fix to FBGraphUser
* Removal of date handling on post, and relevant fix to unit tests
* Sample fix to use modern permission
* Nil of delegate in Facebook.m

Test Plan: Ran related unit tests and samples

Reviewers: clang, karthiks, ayden, gregschechte

Reviewed By: clang

CC: msdkexp@, platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D551794

Task ID: 1382325
Adds the version header to source and the project

Summary:
This change makes the code usable outside of the project
out of the box, and with proper reporting.

Test Plan: We have to ship once to test this (not really, but almost)

Reviewers: mmarucheck, clang

Reviewed By: mmarucheck

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D554325
Bump version, improve README

Summary: Title pretty much captures it

Test Plan: N/A

Reviewers: clang, mmarucheck, gregschechte

Reviewed By: gregschechte

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D554827
Merge commit 'sdk-version-3.0.8' into master

@merge-commit: jacl
Fixes property name in FBOpenGraphAction

Summary: The message property was misnamed, and this fixes it

Test Plan: build, unit tests

Reviewers: clang, gregschechte, mingfli, mmarucheck

Reviewed By: mmarucheck

CC: msdkexp@, platform-diffs@lists

Differential Revision: https://phabricator.fb.com/D555633

Task ID: 1400561
Clear cached requests and pictures when session is closeAndClear-ed

Summary:
When FBSession.closeAndClearTokenInformation() is called, we can go ahead and clear out some of the cached data.
Cached requests will have the session's accessToken in the url query params - which can be used as a filter
Stuff from akamai (images) does not have the same. So we just clear all to err on the side of safety w.r.t. privacy

Test Plan:
Manual testing of Scrumptious with lots of NSLogging.
Multiple login/logouts with different users.

Reviewers: jacl, clang

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D551216

Task ID: 1129032
Rename SBJSON to FBSBJSON in iOS SDK

Summary: Rename SBJSON to FBSBJSON in iOS SDK; also updated references in sample Hackbook project

Test Plan:
After refactoring, verified sdk build with the ./scripts/build_distribution.sh script (though I don't have appledocs installed). Then verified Hackbook project builds and runs in simulator.

Let me know if there are other tests for the sdk.

Reviewers: jacl

Reviewed By: jacl

CC: mmarucheck, security-diffs@lists

Differential Revision: https://phabricator.fb.com/D565036

Task ID: 1431284
[ios-sdk] Update samples with launch images that enable iPhone 5 display.

Summary:
iPhone 5 introduces a new display dimension, 640x1136. In order for apps to display
correctly, they need a new launch image named Default-568h@2x.png. Adding launch images
to those samples that do not have them, in all of the required iPhone dimensions.

Test Plan:
- Ran samples in iOS 6 simulator on regular, Retina, and Retina 4" resolutions

Revert Plan:

Reviewers: jacl

Reviewed By: jacl

CC: msdkexp@

Differential Revision: https://phabricator.fb.com/D574453

Task ID: 1734004
Adds global migration bundle support

Summary:
Adds support for global migration bundles, which means -
1) By default all requests pass a migration bundle
2) For internal requests (pickers, etc.) the migration bundle is not changeable
3) For app owned requests, the bundle can be removed, or changed from the default

Test Plan:
Manual testing debugging the server to confirm bundles trigger the right code on the
server in the following situations -
1) no bundle
2) an existing bundle
3) a non existing bundle
4) a bundle with all expired migrations
5) bundle parameter with empty value (e.g. migration_bundle=)

Reviewers: clang, mmarucheck

Reviewed By: mmarucheck

CC: gregschechte, ekoneil, msdkexp@

Differential Revision: https://phabricator.fb.com/D573365

Task ID: 1464508
iOS 6.0 login support w/samples

Summary:
Adds login support for iOS 6.0, including but not limited to --
 * renaming of permissions to denote read requirement where applicable
 * addition of arguments, overloads and enums to support audience selection
 * update of samples that post, to defer publish permissions until action is taken
 * core iOS 6.0 authorization support in FBSession

Test Plan:
Mainly manual testing of impacted samples, including full matrix of login and
permission upgrade, with and without iOS integrated auth, as well as adding
and removing iOS integrated auth part-way through the test process.

Reviewers: mmarucheck, clang, caabernathy

Reviewed By: mmarucheck

CC: msdkexp@, ekoneil, leil

Differential Revision: https://phabricator.fb.com/D577229
acquire the iOS6 advertisingIdentifier, if not opted out, and send it during publish.

Summary: Apple has added a new API in iOS6, and we should use it when available.

Test Plan:
run a publish in all 4 scenarios of iOS5/6 device X all sample applications.
Verify the the build never fails.
make sure to delete the apps on the phone before/after each test.
Only on ios6 should the advertiser_id value be set when publishing to facebook.

Reviewers: jacl, clang

Reviewed By: jacl

CC: vijaye, teck, calvin, msdkexp@, neko-dev@, suhas

Differential Revision: https://phabricator.fb.com/D574669

Conflicts:
	src/facebook-ios-sdk.xcodeproj/project.pbxproj