1111
1212#import " BFTask+Private.h"
1313#import " PFAsyncTaskQueue.h"
14- #import " PFFileManager.h"
1514#import " PFInstallationIdentifierStore.h"
1615#import " PFInstallationPrivate.h"
1716#import " PFMacros.h"
@@ -48,7 +47,7 @@ @implementation PFCurrentInstallationController
4847// /--------------------------------------
4948
5049- (instancetype )initWithStorageType : (PFCurrentObjectStorageType)storageType
51- commonDataSource : (id <PFFileManagerProvider, PFInstallationIdentifierStoreProvider>)commonDataSource
50+ commonDataSource : (id <PFInstallationIdentifierStoreProvider>)commonDataSource
5251 coreDataSource : (id <PFObjectFilePersistenceControllerProvider>)coreDataSource {
5352 self = [super init ];
5453 if (!self) return nil ;
@@ -64,7 +63,7 @@ - (instancetype)initWithStorageType:(PFCurrentObjectStorageType)storageType
6463}
6564
6665+ (instancetype )controllerWithStorageType : (PFCurrentObjectStorageType)storageType
67- commonDataSource : (id <PFFileManagerProvider, PFInstallationIdentifierStoreProvider>)commonDataSource
66+ commonDataSource : (id <PFInstallationIdentifierStoreProvider>)commonDataSource
6867 coreDataSource : (id <PFObjectFilePersistenceControllerProvider>)coreDataSource {
6968 return [[self alloc ] initWithStorageType: storageType
7069 commonDataSource: commonDataSource
@@ -183,8 +182,7 @@ - (BFTask *)clearCurrentInstallationAsync {
183182 [tasks addObject: unpinTask];
184183 }
185184
186- NSString *path = [self .fileManager parseDataItemPathForPathComponent: PFCurrentInstallationFileName];
187- BFTask *fileTask = [PFFileManager removeItemAtPathAsync: path];
185+ BFTask *fileTask = [self .coreDataSource.objectFilePersistenceController removePersistentObjectAsyncForKey: PFCurrentInstallationFileName];
188186 [tasks addObject: fileTask];
189187
190188 return [BFTask taskForCompletionOfAllTasks: tasks];
@@ -247,10 +245,6 @@ - (BFTask *)_saveCurrentInstallationToDiskAsync:(PFInstallation *)installation {
247245#pragma mark - Accessors
248246// /--------------------------------------
249247
250- - (PFFileManager *)fileManager {
251- return self.commonDataSource .fileManager ;
252- }
253-
254248- (PFObjectFilePersistenceController *)objectFilePersistenceController {
255249 return self.coreDataSource .objectFilePersistenceController ;
256250}
0 commit comments