Note that there are some explanatory texts on larger screens.

plurals
  1. POIssues encapsulating FacebookSDK AppDelegate calls into an static library
    primarykey
    data
    text
    <p>I am developing a library for different purposes and I am having an issue with the FacebookSDK that I am not able to understand. I have encapsulated all the Facebook SSO Login process within my library and it works perfectly integrated in the apps I am working on, less one little detail related with threads.As shown in the iOS SDK Tutorials in Facebook Developer's page, I have to call the "handleDidBecomeActive" method in the appDidBecomeActive method in my app's AppDelegate, but checking some things about the opened session in Facebook in order to redirect(or not) to the Facebook Native iOS app, Safari or whatever:</p> <pre><code>- (void)applicationDidBecomeActive:(UIApplication *)application { if(//Notice that I can reveal code here, but checks if the session in Facebook is opened){ [FBSession.activeSession handleDidBecomeActive]; } } </code></pre> <p>Thinking in my goal with this library, and having the rest of the login process encapsulated in my library, I have encapsulated those lines by a call to my encapsulated method:</p> <pre><code>- (void)applicationDidBecomeActive:(UIApplication *)application { [[MyLibrarySingleton sharedInstance] handleDidBecomeActive]; } </code></pre> <p>Obviously, this method does the same Facebook session check and Facebook session handleDidBecomeActive call than the shown in the first code block. Unexpectedly, the first method works perfectly with the rest of my library and integrated in the apps. But the second way(encapsulated in my library) makes FacebookSDK crash in the method that internally checks that you only access to the FBSession objects from one thread(it means, seems like encapsulated method throws a different thread that the current thread, that is the same that has created the FBSession object and does it works). I am not throwing any new thread during the flow, just changing the code in the first code block inserting it in the method shown in the second code block. Any ideas?? </p> <p>Thanks! </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload