Facebook ios SDK - Login button doesn't remember I'm logged after closing and reopening app

Hi,

I may have misunderstood the behavior but I expect to remained logged in if I close and reopen my app. However it doesn't seem so.
Am I missing something?
Tks.

François

Posts

  • jameszhoujameszhou CNMember ✭✭

    I got exactly same question. Anyone could give some insight?

  • FrancoisMFrancoisM FRUniversity ✭✭

    From support (and it's working):

    If you want to keep logged in your app, even after you kill your app, in the FinishedLaunching method in your AppDelegate file, you need to return:

    return ApplicationDelegate.SharedInstance.FinishedLaunching (app, options);

  • FrancoisMFrancoisM FRUniversity ✭✭

    Actually, this was working when my app was deriving from UIApplicationDelegate but now that I derive from FormsApplicationDelegate (to use Xamarin Forms 1.3 features) using that line of code ends up in a black screen after the splashscreen...

  • VaughanSandersVaughanSanders USMember

    Hello, Was there a solution to this? I am having the exact same issue using the Facebook iOS SDK in a Xamarin Forms shared project.

    If i have:
    return base.FinishedLaunching (app, options);
    The app displays correctly but the logged in Facebook User is not retained when the app relaunches

    If i have:
    return ApplicationDelegate.SharedInstance.FinishedLaunching (app, options);
    Then the app displays only a blank screen and my View is never created

  • VaughanSandersVaughanSanders USMember

    Works great. Thank you for your help.

  • rmenezesrmenezes BRMember ✭✭

    Any solution for the black screen when derived from FormsApplicationDelegate?

  • FrancoisMFrancoisM FRUniversity ✭✭

    @rmenezes To get ride of the black screen you have to call base.finishedlaunching.

  • I still get a black screen with my Forms app with
    ApplicationDelegate.SharedInstance.FinishedLaunching (app, options); return base.FinishedLaunching(app, options);

  • I fixed this by calling LoadApplication between these two calls
    ApplicationDelegate.SharedInstance.FinishedLaunching (app, options); LoadApplication(new App()); return base.FinishedLaunching(app, options);

  • MichaelMorrisonMichaelMorrison USMember
    edited November 2017

    Nevermind

Sign In or Register to comment.