AliyunDraftManager
@interface AliyunDraftManager : NSObject
* The manager of local draft
-
* The id of manager
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *identifier;
-
* The list of draft
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSArray<AliyunDraft *> *draftList;
-
* The callback of manager’s event
Declaration
Objective-C
@property (nonatomic, weak) id<AliyunDraftManagerDelegate> delegate;
-
* The Init of draft manager
Declaration
Objective-C
- (instancetype)initWithId:(NSString *)identifier;
Parameters
identifier
-
* Add the draft
Declaration
Objective-C
- (void)addDraft:(AliyunDraft *)draft;
Parameters
draft
The draft need to be add
-
* delete the draft
Declaration
Objective-C
- (AliyunDraft *)deleteDraft:(AliyunDraft *)draft;
Parameters
draft
The draft will be delete from manager
-
* copy the draft
Declaration
Objective-C
- (AliyunDraft *)copyDraft:(AliyunDraft *)draft toPath:(NSString *)taskPath withTitle:(NSString *)title;
Parameters
draft
The draft will be copy
taskPath
The path of new draft
title
The title of new draft
-
* Download draft
Declaration
Objective-C
- (void)downloadDraftWithProjectFile:(NSString *)projectFilePath resourceDownloader:(DraftTaskLoader)downloader completion: (void (^)(AliyunDraft *, NSError *))completion;
Parameters
projectFilePath
The path of project description file
downloader
The loader for draft’s resources
completion
The callback of loader after resoruce download finish