TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | May 2016 |
Maintained by Microsoft Graph, Microsoft Graph SDK Team.
This client library is a release candidate and is still in preview status - please continue to provide feedback as we iterate towards a production supported library.
Register your application by following these steps.
To make requests, a MSAuthenticationProvider must be provided which is capable of authenticating HTTPS requests with an appropriate OAuth 2.0 bearer token.
This can be set by calling the class method [MSGraphClient setAuthenticationProvider:myAuthProvider];
See msgraph-sdk-ios-nxoauth2-adapter for a sample implementation of MSAuthenticationProvider that can be used to jump-start your project.
self.client = [MSGraphClient client];
Once you have an MSGraphClient that is authenticated you can begin to make calls against the service. The requests against the service look like our REST API.
For example, to retrieve a user's OneDrive:
[[[[graphClient me] drive] request] getWithCompletion:^(MSGraphDrive *drive, NSError *error){
//Returns an MSGraphDrive object or an error if there was one
}];
To get a user's root folder of their drive:
[[[[[graphClient me] drive] items:@"root"] request] getWithCompletion:^(MSGraphDriveItem *item, NSError *error){
//Returns an MSGraphDriveItem object or an error if there was one
}];
For a more detailed documentation see:
For known issues, see issues.