OfficeDev / Office-365-SDK-for-iOS

Microsoft Services SDKs for iOS Preview produced by MS Open Tech.
https://dev.office.com/
Other
96 stars 49 forks source link

Create folder in Office 365 ??? #91

Closed ishrek closed 8 years ago

ishrek commented 8 years ago

How to create folder in office 365. Please help me

tranhieutt commented 8 years ago

You can use: MSSharePointItem *item = [[MSSharePointItem alloc] init]; item.name = @"ABCDEF"; item.type = @"Folder";

[self.client.files  add:item callback:^(MSSharePointItem *item, MSOrcError *error) {
    NSLog(@"%@",item);
}];

If you want to create folder in sub-folder, you can use: [[[[self.client.files getById:self.currentDocumentId] asFolder] children] add:item callback:^(MSSharePointItem item, MSOrcError error) { NSLog(@"%@",item); }];

anihojnadel commented 8 years ago

What @tranhieutt is OK if you're using Files. You can also create folders for Outlook and it's different.

Which API are you using? (SharePoint, Outlook, etc)

Thanks!

tranhieutt commented 8 years ago

I use API in: http://cocoadocs.org/docsets/Office365/0.11.0/Classes/MSSharePointItemCollectionFetcher.html#//api/name/add:callback:

tranhieutt commented 8 years ago

@ishrek , this issue is solved. Could you close this issue?