class DJIUserAccountManager
@interface DJIUserAccountManager : NSObject
Header: DJIUserAccountManager.h Inherits From: NSObject
Description:
Class used to manage the DJI account.
Class Members:
property userAccountState
@property (nonatomic , readonly ) DJIUserAccountState userAccountState
Header: DJIUserAccountManager.h
Description:
Current state of DJI user account.
See Also:
DJIUserAccountState
method logIntoDJIUserAccountWithAuthorizationRequired:withCompletion
-(void )logIntoDJIUserAccountWithAuthorizationRequired:(BOOL )authorizationRequired withCompletion:(DJIAccountStateCompletionBlock)completion
Header: DJIUserAccountManager.h
Description:
After invoking this method, a dialog redirecting users to log into their DJI account will be shown. For users outside of China, authorization is required to unlock authorization zones. After the login process, if authorizationRequired
is YES
, and the user is currently out of China and the account has not been authorized to unlock authorization zones, the dialog will then redirect users to authorize their account.
BOOL authorizationRequired YES
if authorization is required.DJIAccountStateCompletionBlock completion The execution block with the returned execution result.
method logOutOfDJIUserAccountWithCompletion
-(void )logOutOfDJIUserAccountWithCompletion:(DJICompletionBlock)completion
Header: DJIUserAccountManager.h
Description:
Logs out the DJI user that is logged in.
typedef block DJIAccountStateCompletionBlock
typedef void (^_Nullable DJIAccountStateCompletionBlock)(DJIUserAccountState state, NSError *_Nullable error)
Header: DJIUserAccountManager.h
Description:
DJI Account State Completion Block.
enum DJIUserAccountState
typedef NS_ENUM (uint8_t, DJIUserAccountState)
Header: DJIUserAccountManager.h
Description:
User account status. Users need to be logged in.
Enum Members:
DJIUserAccountStateNotLoggedInUser is not logged in. User needs to be logged in to retrieve currently unlocked, and unlock authorization zones. DJIUserAccountStateNotAuthorizedUser is logged in but has not been authorized to unlock authorization zones. DJIUserAccountStateAuthorizedUser is logged in and has been authorized to unlock authorization zones. DJIUserAccountStateTokenOutOfDateThe token of the user account is out of date. DJIUserAccountStateUnknownUnknown.