Last active
September 23, 2016 13:32
-
-
Save matiasvillaverde/1b67e5821f511d495050d9c19ac881de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)getCacheOf:(NSString*) documentID withProyectName: (NSString *)proyect { | |
//Get the proyect also, because is using the default one... | |
MSIPreferencesStore * store = [MSIPreferencesStore preferencesStore]; | |
MSIDevicePreferences *devicePreferences = [store preferencesCopy]; | |
WebServerList *webServerList = [devicePreferences getWebServers]; | |
MSIProjectConfiguration *project = [webServerList getProjectConfigurationByProjectName:proyect]; | |
[[MSICacheManager manager] retrieveCacheForObjectId:documentID | |
withPriority:MSMCachePriorityHigh | |
withElementsPromptAnswers:nil | |
andValuePromptAnswers:nil | |
andProjectInfo:[project copyProjectInfo] | |
completionHandler:^(MSIDocumentCache *documentCache, NSError *error) { | |
if (!error) { | |
NSLog(@"Success"); | |
//The user has access. | |
} else { | |
//TODO handle error | |
NSLog(@"--------------Block callback hit!"); | |
NSLog(@"error: %@",error.debugDescription); | |
//The user can not see the document. | |
} | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment