Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8802039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:59:11+00:00 2026-06-14T00:59:11+00:00

I am implementing facebook’s SDK for iOS into my app. There are two functions

  • 0

I am implementing facebook’s SDK for iOS into my app. There are two functions however that are supposed to register and unregister for the notifications:

From Facebook’s login to facebook with ios:

in the viewDidLoad method, register for the session change notification you defined in the app delegate by adding this code to the end of the method:

[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(sessionStateChanged:)
name:FBSessionStateChangedNotification
object:nil];

and

Unregister for the notifications by adding the following code to the end of the didReceiveMemoryWarning the method:

[[NSNotificationCenter defaultCenter] removeObserver:self];

Since I have quite a few view controllers and all of them should be using facebook’s API, I thought I should implement the register/unregister methods in the applicationDidFinishLoadingWithOptions (for register for notifications)

but I am not sure if and how I should implement the unregister‘s removeObserver command, because applicationDidReceiveMemoryWarning is not available for the AppDelegate.

  • Is DidReceiveMemoryWarning visiting all the viewControllers of the App?
  • Would it be sufficient to unregister in just one of my viewControllers ?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T00:59:12+00:00Added an answer on June 14, 2026 at 12:59 am

    The application delegate does receive memory warnings:

    http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html

    If it didn’t, another option would be to use the notification center:

    NSNotificationCenter *center = [NSNotificationCenter defaultCenter];
    [center addObserver:self
               selector:@selector(whatever:)
                   name:UIApplicationDidReceiveMemoryWarningNotification
                 object:nil];
    

    That all said, it seems to me that removing the observer on a memory warning is inappropriate. At what point will your reinstate it? But hey, if that’s what Facebook recommends…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am implementing the Facebook iOS SDK into my app... and find no problems
I'm implementing Facebook SDK into my App. Following the facebook developers guide, except I
I am in the process of implementing Facebook SDK 3.0 in my iOS app.
I'm having trouble implementing the Facebook SDK in an iOS project and I suspect
I'm having trouble implementing the Facebook SDK in an iOS project. I am trying
I am new to iOS development and I have started implementing the Facebook SDK
I'm implementing the Facebook registration widget into our web app, and we've got a
Implementing a PhoneGap app for Android and iOS, the app is using Facebook Connect
Hello guys i am new about this implementing facebook into my app.I check developer's
We've been implementing the Facebook Android SDK in our android app which requires to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.