…or version downloaded from App Store
Summary: Previously xcodebuild could be found under the /Developer directory but it has since moved for Xcode downloaded from the App Store. If the developer has migrated from one version to another, then calling "which xcodebuild" will not work, unless they have run a script called "xcode-select switch". So for now we first check the older location, then look in the newer App Store location.
Test Plan: I tried running the build script in my folder after a recent upgrade from 4.2 to 4.3.1. Without the build script change I got an error. With the build script change, the library was generated.
Reviewers: mmarucheck, bruce, jacl
Reviewed By: jacl
CC: selekman, vijaye, jacl, gregschechte
Differential Revision: https://phabricator.fb.com/D440943
Revert Plan: OK
Task ID: 998703

Summary:
1) img was alloc'ed and never released while uploading a photo
2) alertview was alloc'ed and never released
3) friendswithapp was alloc'ed twice and never released, updated the logic to use obj c syntax
4) UIGraphicsGetImageFromCurrentImageContext() returns an autoreleased imageView - retaining it is the incorrect solution. See http://stackoverflow.com/questions/1529667/memory-allocation-and-release-for-uiimage-in-iphone
Test Plan:
Run Hackbook in the profiler and verify no memory leaks when loading userpic from the graph api
Upload a photo, verify no longer leaks
View friends with app, verify no longer leaks
Pop the alertview and verify no longer leaks
Reviewers: jacl, caabernathy, mattwkelly, selekman
Reviewed By: jacl
Differential Revision: https://phabricator.fb.com/D430905
Task ID: 980129

…ponse instead of a string when the response does not represent a valid JSON object.
Summary:
If the response is not a JSON object, convert the actual response to a string instead of using the NSData object.
This will break clients that depend on the current behavior. If you need access to the raw response, use request: diReceiveResponse: instead.
Test Plan: Test with stream.publish requests
Reviewers: jacl, dgibson, yariv, caabernathy
Reviewed By: jacl
CC: leon
Differential Revision: https://phabricator.fb.com/D427844
Task ID: 842334

…:] to access objects in dictionaries
Summary: valueForKey also works in this case since none of our keys are strings staring with "@". However, objectForKey: is the correct selector to use for the desired behavior.
Test Plan: Verify behavior with HackBook app
Reviewers: jacl, dgibson
Reviewed By: jacl
Differential Revision: https://phabricator.fb.com/D427850
Task ID: 854847

Summary:
Set the UIActivityIndicator color to gray to stop it from blending into the background.
On iOS5 we do this by setting the color to gray. On older iOS versions which don't support this
property, this is done by setting the style to UIActivityIndicatorViewStyleGray instead of
UIActivityIndicatorViewStyleWhiteLarge which results in a slightly smaller indicator.
Test Plan: Testing using Hackbook.
Reviewers: jacl, dgibson
Reviewed By: jacl
Differential Revision: https://phabricator.fb.com/D426894
Task ID: 908016

Summary:
Introduced a bug in URL parsing with the frictionless fix, which
failed to recognize urls that begin the parameter section with #
Test Plan:
Whitebox test using hackbook to force the in-app auth flow, and
confirm that the new line enables parsing of the returned URL
Reviewers: yariv, caabernathy, mmarucheck, vijaye
Reviewed By: mmarucheck
Differential Revision: https://phabricator.fb.com/D425267

…n of the
iOS SDK
Summary:
For developers who are building apps with Automatic Reference Counting
enabled using our current iOS SDK will produce errors. One solution is to
provide a static library version of our SDK that they can include in their
project. We could provide detailed documentation to do this but it is easier to
provide a script that they can run. This diff introduces this script. We
considered actually packaging the desired library with the SDK but that would
involve a process change on our end because the current SDK development flow
does not include building a library. So for now we will push this on the
developer and perhaps in the future look at a more streamlined way to provide
this library to the developer.
Additionally, needed to make sure deployment target was set to iOS 3 for the
project.
Test Plan:
In terms of testing the script just run it a few times from various initial
locations, e.g.
% sh
/Users/caabernathy/Facebook/Code/iOS/StaticScriptTest/facebook-ios-sdk/scripts/build_facebook_ios_sdk_static_lib.sh
Also run it twice to see the output library properly overwritten
Once the library was produced, tested it worked well by doing the following
Scenario 1: Use the library with an app that does not have ARC enabled
1/ Built a simple app with Facebook SSO and a news feed dialog
2/ Tested SSO works and that the dialog UI has all the relevant resources and
works
Scenario 2: Use the library with an app with ARC enabled
1/ Built a simple app with Facebook SSO and a news feed dialog. (When creating
this app, made sure ARC was turned on)
2/ Tested SSO works and that the dialog UI has all the relevant resources and
works
Scenario 3: Switch out the Facebook SDK in the Hackbook sample app with this
library
1/ Removed the FBConnect folder from the Hackbook sample app
2/ Dragged in the new library, chose to copy the contents over
3/ Ran the app and went through all the flows. Note: Found some cases that do
not work that also appear to be broken in the current app, namely video upload,
and recent check-ins listing. These can be addressed separately.
Reviewers: yariv, jacl
Reviewed By: jacl
CC: mmarucheck, vijaye, selekman, brent
Differential Revision: https://phabricator.fb.com/D415047
Revert Plan: OK

Summary:
The problem is that e79d072 fixes odd behavior in Hackbook,
which had support in the SDK code’s logout function. Prior to e79d072
Hackbook was more convoluted, and the logout behavior broke
encapsulation. The solution is to put back a deprecated logout method that
matches the original signature, and keeps most of the original behavior
(though it does not break encapsulation, which was badness.)
Test Plan:
Manually modify Hackbook, and whitebox test each of the following
permutations:
* login with no delegate (call the cached delegate)
* login with a delegate matching the cached delegate (call the cached delegate)
* login with a delegate different from the cached delegate (call both)
Reviewers: yariv, caabernathy, mmarucheck, vijaye
Reviewed By: yariv
Differential Revision: https://phabricator.fb.com/D405235
Task ID: 905137