|
8 | 8 |
|
9 | 9 | #import <Foundation/Foundation.h>
|
10 | 10 |
|
11 |
| -@class FBSession; |
| 11 | +@class FBSession, GPPSignIn; |
12 | 12 |
|
13 | 13 | /**
|
14 | 14 | `CosmoseSDK` is a main entry class of Cosmose SDK library.
|
|
58 | 58 | Either way it is possible to provide `FBSession` instance by directly calling `[FBSession activeSession]` from the app's login flow.
|
59 | 59 |
|
60 | 60 | @param fbSession The instance of active and open Facebook session obtained via Facebook-iOS-SDK (see https://developers.facebook.com/docs/ios )
|
| 61 | + |
| 62 | + @see updateFbDataWithToken:userInfo: |
61 | 63 | */
|
62 | 64 | + (void)updateFbSession:(FBSession*)fbSession;
|
63 | 65 |
|
| 66 | +/** |
| 67 | + Alternative way to update facebook related user details. Use this method instead of `updateFbSession:`) when your app doesn't utilize Facebook SDK or when incompatible version of SDK is in use. |
| 68 | + `Nil` value can be provided for each of two parameters if not available at the moment of call and can be provided later. |
| 69 | + |
| 70 | + @param fbToken Facebook API token (if available) |
| 71 | + @param fbUserInfo Dictionary with user data including user fbid (if available) |
| 72 | + |
| 73 | + @see updateFbSession: |
| 74 | + */ |
| 75 | ++ (void)updateFbDataWithToken:(NSString*)fbToken userInfo:(NSDictionary*)fbUserInfo; |
| 76 | + |
| 77 | +/** |
| 78 | + Link user's google account to Cosmose SDK user database. |
| 79 | + If your app supports Google SignIn via Google Plus SDK use this method to provide basic user data to Cosmose SDK. |
| 80 | + This method should be called as soon as the sing in (or silent sign in) is completed. The best place to put call to this method is in `GPPSignInDelegate`'s method `finishedWithAuth:error:` when error is not `nil. |
| 81 | + To retrieve handle to active `GPPSignIn` instance you may call `[GPPSignIn sharedInstance]` |
| 82 | + |
| 83 | + @param googleSignIn The active instance of `GPPSignIn` interface |
| 84 | + |
| 85 | + @see updateGoogleSignInDataWithEmail:userID: |
| 86 | + */ |
| 87 | ++ (void)updateGoogleSignIn:(GPPSignIn*)googleSignIn; |
| 88 | + |
| 89 | +/** |
| 90 | + Alternative way to provide basic user data info in case when app supports Google Sign In. You should use this method instead of `updateGoogleSignIn:` when `GPPSignIn` inteface is not available in your app. |
| 91 | + |
| 92 | + @param googleUserEmail User's email address used for Google Sign In |
| 93 | + @param googleUserID User's google ID retireved after successfull sing in |
| 94 | + |
| 95 | + @see updateGoogleSignIn: |
| 96 | + */ |
| 97 | ++ (void)updateGoogleSignInDataWithEmail:(NSString*)googleUserEmail userID:(NSString*)googleUserID; |
| 98 | + |
| 99 | +/** |
| 100 | + If your app support user login via e-mail and no Facebook nor Google authentication is in use, you may call this method to link basic user's info with Cosmose SDK. |
| 101 | + |
| 102 | + @param userEmail User's email address used for app sign in or retireved from user at any point during the app usage |
| 103 | + |
| 104 | + @see updateGoogleSignIn: updateFbSession: |
| 105 | + */ |
| 106 | ++ (void)updateUserEmail:(NSString*)userEmail; |
| 107 | + |
64 | 108 | @end
|
0 commit comments