-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHICloudManager.h
36 lines (28 loc) · 972 Bytes
/
HICloudManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// HICloudManager.h
// Hab It!
//
// Created by orkenstein on 10.03.14.
// Copyright (c) 2014 savefon.mobi. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MagicalRecord.h>
#define __cloud [HICloudManager sharedInstance]
extern NSString *const HIICloudDataImportedNotification;
extern NSString *const HICoreDataStackInitNotification;
typedef NS_ENUM(NSInteger, HIICloudSetting) {
HIICloudSettingUnknown = 0,
HIICloudSettingDisabled,
HIICloudSettingEnabled
};
@interface HICloudManager : NSObject
@property(nonatomic, assign, readonly) BOOL coreDataInitialised;
@property(nonatomic, copy, readonly) NSData *currentICloudToken;
+ (instancetype)sharedInstance;
// iCloud
- (BOOL)iCloudAvailable;
- (void)setupCoreDataICloudEnable:(BOOL)iCloudEnabled
withCompletion:(void (^)(void))completion;
- (void)grantICloudAccess:(BOOL)dialogOnlyIfNeeded
withCompletion:(void(^)(BOOL accesGranted))completion;
@end