Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jul 11, 2012
  1. @clang13

    [ios-sdk] Fix bug in paging loader that led to multiple activity indi…

    clang13 authored
    …cators in friend picker.
    
    Summary:
    FBGraphObjectPagingLoader was setting a dataNeededDelegate on its data source even if it was not in the
    AsNeeded paging mode. This was fooling the data source into thinking it should display a spinner in the
    bottom-most table cell to indicate data was being fetched. Controls that aren't in AsNeeded mode may have
    other UI to indicate when they load data (as friend picker does), so this spinner was redundant.
    
    Fixed FBGraphObjectPagingLoader to only set a dataNeededDelegate if it actually should; in turn, this pointed
    out that pagingMode should not be a writable property on the object, as there is little hope of things working
    correctly if the pagingMode is changed during the lifetime of an object. Changed it into a readonly property
    set at init-time.
    
    Test Plan:
    - Ran FriendPickerSample
    - Ran PlacesPickerSample
    - Ran Scrumptious
    - Ran HelloFacebook
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: jacl
    
    CC: msdkexp@, platform-diffs@lists
    
    Differential Revision: https://phabricator.fb.com/D516326
  2. @onebit

    Significant readme improvements

    onebit authored
    Summary:
    1) removes period
    2) adds 's'
    
    Test Plan: Sat back, reflected for a moment on why details like these bug me.
    
    Reviewers: clang, mmarucheck, gregschechte
    
    Reviewed By: clang
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D515714
    
    Task ID: 1011836
Commits on Jul 10, 2012
  1. @onebit

    Update to the root readme, couple string literal changes

    onebit authored
    Summary:
    1) simplifies the readme, and points users to Hello Facebook
    2) Uses "Log In" and "Log Out" in FBLoginView
    
    Test Plan: Built & ran
    
    Reviewers: clang, gregschechte
    
    Reviewed By: clang
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D515487
    
    Task ID: 1011836
  2. @clang13

    [ios-sdk] Readme files for BooleanOG and HelloFacebook samples

    clang13 authored
    Summary: We were lacking readme files for these two samples.
    
    Test Plan:
    - Read them
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, ayden, gregschechte
    
    Reviewed By: jacl
    
    Differential Revision: https://phabricator.fb.com/D514598
  3. @onebit

    Minor cleanup to account for some quirks in the iOS6 preview support

    onebit authored
    Summary:
    1) comments-out a couple of lines of valid code in the samples in order to
    avoid exercising a bug in the iOS preview support -- well address before production
    2) introduces a protocol that we use to handle warnings in late-bound calls
    
    Test Plan: compiled and ran samples
    
    Reviewers: clang, gregschechte
    
    Reviewed By: clang
    
    CC: ekoneil, msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D515035
    
    Task ID: 1011836
Commits on Jul 9, 2012
  1. @onebit

    Small doc change and turn on iOS 6 build support with 5.0 compiler

    onebit authored
    Summary: Per title
    
    Test Plan: Confirmed build
    
    Reviewers: gregschechte, clang
    
    Reviewed By: clang
    
    CC: ekoneil, msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D514185
    
    Task ID: 1011836
  2. @clang13

    [ios-sdk] More Scrumptious cleanup.

    clang13 authored
    Summary:
    In working through the tutorial and recent FBSession changes, I found a few more places where
    Scrumptious could be cleaned up. Also fixed a unit test that wasn't ever actually asserting
    anything succeeded.
    
    Test Plan:
    - Ran Scrumptious
    - Ran unit tests
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D513407
Commits on Jul 8, 2012
  1. @gregschechter

    Add initWithPermissions: method for FBLoginView

    gregschechter authored
    Summary:
    Need a way to pass permissions into FBLoginView.  The MyProfile sample is broken without it.  This adds a new init method to do that.
    
    Not adding a property since the perms can be accessed off of FBSession.activeSession.permission.  Similarly, re-authorization with new permission set can be done off of that as well.  So this is really just about the initial construction.
    
    Modified MyProfile to use.
    
    Test Plan: Ran MyProfile sample after deleting from my simulator and from my FB app list on the web.  Re-auth'd and succeeded in updating my status from the app.  That's what wasn't working before.
    
    Reviewers: jacl, clang
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D513943
    
    Blame Revision: D509506
  2. @onebit

    Rename MyProflie to HelloFacebook

    onebit authored
    Summary: Title pretty much sums it up
    
    Test Plan: Ran app, git grepped sources for MyProfile references, etc.
    
    Reviewers: gregschechte, clang
    
    Reviewed By: gregschechte
    
    CC: ekoneil, msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D513950
    
    Task ID: 1011836
Commits on Jul 7, 2012
  1. @onebit

    Embraces Facebook Login terminology

    onebit authored
    Summary:
    Title pretty much says it all, a few enum changes, variable name changes and
    comment changes to embrace the new terms for things.
    
    Test Plan: Build and run a sample or two; particularly switch user
    
    Reviewers: clang, gregschechte, ayden, mmarucheck
    
    Reviewed By: gregschechte
    
    CC: ekoneil, msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D513837
    
    Task ID: 1170930, 1011836
Commits on Jul 6, 2012
  1. @gregschechter

    Update FBLoginView to include a button with Login/Logout

    gregschechter authored
    Summary:
    Add a simple button with the Login/Logout text to the FBLoginView.  This lets us remove text in samples that use this.
    
    Note that this presentation of the FBLoginView will change post-beta to be much more FB-branded, and this is just intended to tide us over.
    
    Test Plan: MyProfile sample on iPhone/iPad simulators
    
    Reviewers: jacl, clang
    
    Reviewed By: clang
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D513372
  2. @onebit

    Adds preview support for iOS 6 integrated auth to FBSession

    onebit authored
    Summary:
    This diff does the following things -
      1. Introduces a define that will compile-in preview support for iOS 6 integration
      2. Updates the samples to include the Accounts package
      3. Minor tweaks to two of the samples
    
    Some notes -
      * The stability of the iOS 6 integration is not 100%, so the code includes some
        odd defensive measures, including adding a permission when the list is nil, etc.
      * The integration of iOS 6 is still provisional and there are known changes, such
        as support for integrated caching, which are not present here
    
    Test Plan: Ran each sample with integrated and non integrated auth, significant whitebox testing as well, ran a subset of the samples using 4.3 simulator to confirm fallback behavior
    
    Reviewers: clang, mmarucheck, gregschechte
    
    Reviewed By: clang
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D513350
    
    Task ID: 1142879
Commits on Jul 5, 2012
  1. @gregschechter

    Simplify "me" retrieval in MyProfile sample

    gregschechter authored
    Summary:
    Simplifying MyProfile sample to:
    
    - remove the storage of a FBRequestConnection since we never use it.
    - use the [FBRequest startWithSession:graphPath] rather than a two-step deal.
    
    With that simplified, what I still find the most confusing about this sample is why the "cached token" case needs to be dealt with explicitly and why we need to re-issue the session opening in that case.  Why isn't it done implicitly and this state FBSessionStateCreatedTokenLoaded hidden from the developer?  This next bit of code seems very unintuitive:
    
            // because we use this method to bootstrap button setup, we may find that we also need
            // to open a session that is ready and waiting with a cached token
            if (FBSession.activeSession.state == FBSessionStateCreatedTokenLoaded) {
                [FBSession.activeSession openWithCompletionHandler:^(FBSession *session,
                                                                     FBSessionState status,
                                                                     NSError *error) {
                    [self updateForSessionChange];
                }];
            }
    
    Test Plan: My machine.
    
    Reviewers: jacl, clang, ekoneil
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D508085
Commits on Jul 4, 2012
  1. @clang13

    [ios-sdk] Sample cleanup

    clang13 authored
    Summary:
    Cleaned up some samples to reflect our property naming conventions, etc. Also cleaned up some code that
    was unnecessarily complicating the point being demonstrated.
    
    Updated Scrumptious to use new activeSession API, added Scrumptious ReadMe.txt.
    
    Test Plan:
    - Ran samples
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: gregschechte
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D511401
Commits on Jul 3, 2012
  1. @awzy

    Add friendly wrapping and default session behavior to FBRequest

    awzy authored
    Summary:
    Change the default session behavior of FBRequest to use the activeSession, if it is open;
    removes session as an argument from the public functions of FBRequest.
    Fixed the samples and tests to use the new public functions.
    
    Test Plan: Ran each of the sample apps
    
    Reviewers: clang, jacl, gregschechte, mmarucheck
    
    Reviewed By: clang
    
    CC: platform-diffs@lists, bhiller
    
    Differential Revision: https://phabricator.fb.com/D510519
    
    Task ID: 1145396
  2. @onebit

    Adds FBLoginView

    onebit authored
    Summary:
    This diff -
    1) adds the FBLoginView
    2) updates My Profile sample to use it
    3) refines activeSession logic
    
    Test Plan: updated My Profile to use the login view, and manual tested
    
    Reviewers: gregschechte, clang, mmarucheck, ayden
    
    Reviewed By: gregschechte
    
    CC: ekoneil, yariv
    
    Differential Revision: https://phabricator.fb.com/D509506
    
    Task ID: 1097711
  3. @clang13

    [ios-sdk] Some miscellaneous cleanup.

    clang13 authored
    Summary:
    Fixed a couple places where we were defining outdated parameters that were once used but
    now always have the same value (or where we are now ignoring the value). Couple other
    trivial fixes.
    
    Test Plan:
    - Ran unit tests
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: gregschechte
    
    CC: msdkexp@, platform-diffs@lists
    
    Differential Revision: https://phabricator.fb.com/D510261
  4. @clang13

    [ios-sdk] Changes to README, install package

    clang13 authored
    Summary:
    Added a README file, identical to the README.mdown, but less scary to people who don't know what an .mdown file is.
    Added basic Getting Started steps to the README, and redirecting to the web Getting Started for richer docs.
    Displaying the README on the final page of the Installer as well as the first one, to give developers another
    change to read it before dismissing the installer.
    
    Test Plan:
    - Ran the installer
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, ayden, gregschechte
    
    Reviewed By: gregschechte
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D510247
  5. @clang13

    [ios-sdk] Clean up samples to use new FBSession.activeSession functio…

    clang13 authored
    …nality.
    
    Summary:
    Cleaned up samples that are not specifically about session management to use the static
    FBSession.activeSession functionality to manage session state.
    
    Also made some minor fixes:
    - Renamed classes/files in PlacePickerSample and ProfilePictureSample to reflect
    iOS conventions.
    - Fixed BooleanOGSample to display friend activity in the case where they have
    no "OR" actions.
    
    Scrumptious is not included in this commit, as it depends on an FBSession change that
    is still in review.
    
    Test Plan:
    - Ran each sample
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, ayden, gregschechte
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D510167
Commits on Jun 29, 2012
  1. @awzy

    Add full photo view and use/cancel interface to Scrumptious

    awzy authored
    Summary:
    When choosing a photo in Scrumptious, adds a full photo view with a use/cancel
    interface after the image picker. Also fixes the orientation of uploaded photos.
    
    Test Plan: Ran Scrumptious on both simulator and device
    
    Reviewers: clang, mmarucheck, jacl, gregschechte
    
    Reviewed By: clang
    
    CC: msdkexp@, bhiller
    
    Differential Revision: https://phabricator.fb.com/D503350
    
    Task ID: 1118335
  2. @gregschechter

    Significantly broaden MyProfile iOS SDK sample

    gregschechter authored
    Summary:
    Based on Doug's recent feedback, we decided to broaden the MyProfile SDK sample to be more of a Hello World type sample.
    
    The changes introduced are intended to have minimal UI componentry, so as to focus on the Facebook-ness of them.
    
    Meaningful changes:
    - Have 3 buttons in the UI for posting a status update, posting a photo, and invoking the friend picker.
    - The status update just creates a new status with the logged in user's name and the time.  (And we need to ask for "update_status" permission in the session creation in order to support this.)
    - The photo upload just uploads the app icon that we already have in the application.
    - The friend picker inclusion also warranted turning the app into UINavigationController based one.
    
    The results of all of these are just displayed in modal UIAlertViews.
    
    iPhone and iPad nibs have been updated.  The code is pretty well commented.
    
    I also modified the FB app on the server to have default privacy of "Only Me", which is definitely appropriate for this sample.
    
    Note that I haven't actually renamed this HelloFacebook because a) it's a pain to do; and b) I didn't want these changes to get lost in a larger change.  I can do it as a follow on, but I don't think it's bad if we just keep it named MyProfile, and elevate it in the docs, etc., as a more comprehensive example.
    
    Test Plan: My machine, lots of install/uninstall cycles, iPhone and iPad.
    
    Reviewers: clang, jacl, ekoneil
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D508038
Commits on Jun 27, 2012
  1. @gregschechter

    Change FriendPickerSample to be based on a UINavigationController.

    gregschechter authored
    Summary:
    Update FriendPickerSample as discussed to:
    
    - No longer derive a new view controller for friend picker
    - Build the sample as a UINavigationController-based sample
    - Support the Cancel/Done UI that fbiphone/wilde use Test Plan:
    
    IMO this is both more straightforward and more akin to expected usage.  However, it's definitely
    still a bit tricky primarily due to the setup of the UINavigationController.  I think that's
    expected, though, since it's not the job of our sample to make the UI navigation paradigms in
    iOS easier to program generally.
    
    I didn't pursue the "modeless" example like what Eddie showed in email.  While the content
    control can certainly be put to that use, I really think we need to have these samples be single
    purpose/single-use and relatively simple.
    
    Key code to review is the mods in FPAppDelegate.m and FPViewController.m.
    
    It is admittedly a bit odd that the Done/Cancel UI, applied to the friend picker controller, are inserted in the sample app because the sample is the one creating the nav controller.  I think it's correct, though, from what I read on all of this.
    
    Note that I haven't yet made a pass to update to new session convenience methods.  Will do that after an initial review here.
    
    Test Plan: Ran both iPhone and iPad on my box.  Lots of Cancel, Done, friend choosing, etc.
    
    Reviewers: jacl, clang, ekoneil
    
    Reviewed By: clang
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D505528
    
    Task ID: 1141720
  2. @gregschechter

    w

    gregschechter authored
  3. @onebit

    Adds activeSession support to pickers

    onebit authored
    Summary:
    At the time of call to loadData on the pickers, if a
    the session property is nil, and there is an open active
    session, it will be used automatically
    
    Test Plan: Built the SDK
    
    Reviewers: gregschechte, clang, ayden
    
    Reviewed By: gregschechte
    
    CC: ekoneil
    
    Differential Revision: https://phabricator.fb.com/D505587
    
    Task ID: 1097711
Commits on Jun 26, 2012
  1. @onebit

    Adds active session to FBSession

    onebit authored
    Summary:
    This checkin adds the notion of an active session, the rules are --
      * If you ask for one, you will find one there, unopened
      * If you open one statically, it will be there waiting for you when you ask for it
      * To close the session either set nil, or close it by calling close
      * If you instantiate a session directly, it is your job to assign it to active
    
    Test Plan: Manually tested permutations using My Profile sample
    
    Reviewers: clang, gregschechte, ayden
    
    Reviewed By: clang
    
    CC: ekoneil
    
    Differential Revision: https://phabricator.fb.com/D504819
    
    Task ID: 1097711
  2. @clang13

    [ios-sdk] Remove use of selectors that trigger Apple App Store warnings.

    clang13 authored
    Summary:
    Several of our FBGraphObject selectors trigger a warning from Apple's App Store validation
    tool because they have the same signature as reserved APIs. We don't want our developers to
    deal with this pain. Working around this by changing from .property notation to use objectForKey:
    and setObject:forKey: instead; a longer-term solution to keep developers from triggering this
    warning in their own apps is desirable, however.
    
    Test Plan:
    - Ran unit tests
    - Ran Scrumptious
    - Used the following command (from The Internet!) to print out all Obj-C selectors in Scrumptious,
    verified that the offending selectors were not present after these changes:
    otool -s __TEXT __objc_methname "$1" |expand -8 | cut -c17- | sed -n '3,$p' | perl -n -e 'print join("\n",split(/\x00/,scalar\
    reverse (reverse unpack("(a4)*",pack("(H8)*",split(/\s/,$_))))))'
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D504025
    
    Task ID: 1143317
  3. @clang13

    [ios-sdk] Make consistent use of YES/NO when dealing with type BOOL

    clang13 authored
    Summary:
    We were inconsistent in our use of YES/NO rather than true/false when using type BOOL
    rather than bool. This didn't pose a real problem, but we should be consistent in using the
    correct constants for the particular datatype in question, and, more importantly, it is not
    idiomatic in Objective-C to use true/false for BOOL types.
    
    Test Plan:
    - Inspection
    - Ran unit tests
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: gregschechte
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D504060
Commits on Jun 25, 2012
  1. @clang13

    [ios-sdk] Clean up Scrumptious sample. Fix selection behavior in FBPl…

    clang13 authored
    …acePickerViewController.
    
    Summary:
    FBPlacePickerViewController was not settings its data source to disallow multi-select. There was a further
    bug in FBGraphObjectTableSelection where, if the previously-selected item had scrolled far out of view, it would
    not be properly de-selected in the single-selection case. Fixed by explicitly de-selecting all selected items
    before selecting a new one in single-selection.
    
    Added activity spinner and disabled user interaction while uploading OG Action in Scrumptious.
    
    Got rid of gray border around table view on iPad in Scrumptious.
    
    Limiting Scrumptious place search to just "restaurants".
    
    Yanking user_generated=true from Scrumptious OG Actions pending resolution of issue where this causes two
    photos to be populated in user's photo album.
    
    Test Plan:
    - Ran Scrumptious
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: jacl
    
    CC: msdkexp@, platform-diffs@lists
    
    Differential Revision: https://phabricator.fb.com/D503502
    
    Task ID: 1043675, 1135115
  2. fix license header in JustLoginSample

    John Ketchpaw authored
    Summary: we had the default one generated by xcode.
    
    Test Plan: Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D503539
Commits on Jun 22, 2012
  1. @clang13

    [ios-sdk] Fix attachment naming in batch requests

    clang13 authored
    Summary:
    We were naming attachments 'file0', 'file1', etc., but this was only unique within a batch sub-request, not across
    all requests in a batch. This resulted in attachments getting clobbered, with predictably bad results (usually an "Unknown
    error" from the Graph API).
    
    Test Plan:
    - Added a new unit test to detect this
    - Verified it failed
    - Fixed the code
    - Verified the test ran
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: jacl
    
    CC: msdkexp@
    
    Differential Revision: https://phabricator.fb.com/D502389
    
    Task ID: 1139333
Commits on Jun 19, 2012
  1. @clang13

    [ios-sdk] Clean up extraneous files.

    clang13 authored
    Summary: These files should not be in the repo.
    
    Test Plan: Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: mmarucheck
    
    CC: yariv
    
    Differential Revision: https://phabricator.fb.com/D498045
  2. @clang13

    [ios-sdk] Fix docs/distribution scripts

    clang13 authored
    Summary:
    Appledoc docset name was referenced twice, and differently. Fixed to use the variable set by common.sh, and fixed
    common.sh to set the right name.
    
    Test Plan: Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    Differential Revision: https://phabricator.fb.com/D497697
Commits on Jun 18, 2012
  1. @clang13

    [ios-sdk] Fix label script

    clang13 authored
    Summary: Need to pass -a to git tag because repo requires annotated tags.
    
    Test Plan: Revert Plan:
    
    Reviewers: jacl
    
    Reviewed By: jacl
    
    Differential Revision: https://phabricator.fb.com/D497679
  2. @clang13

    [ios-sdk] Fix two leaks

    clang13 authored
    Summary: Found two leaks running under Instruments. Fixed them.
    
    Test Plan:
    - Ran SwitchUserSample and Scrumptious, did not see these leaks
    
    Revert Plan:
    
    Reviewers: jacl, mmarucheck, gregschechte, ayden
    
    Reviewed By: jacl
    
    CC: platform-diffs@lists
    
    Differential Revision: https://phabricator.fb.com/D497631
  3. @onebit

    Makes object lifetime handling more crisp in JustRequest

    onebit authored
    Summary:
    This fix is not strictly addressing a leak, but it does release memory more
    aggressively which makes it easier to tack memory use in general
    
    Test Plan: Ran sample
    
    Reviewers: clang, mmarucheck, caabernathy
    
    Reviewed By: clang
    
    CC: gregschechte, ekoneil
    
    Differential Revision: https://phabricator.fb.com/D497632
    
    Task ID: 1011836
Something went wrong with that request. Please try again.