I coding a iOS app using O365-iOS-Connect
to connect my app to Office 365. My app can sign in to 365 account. But i can not find some docs how to Fetch/Create calender.
Thanks and sorry for my bad english.
I coding a iOS app using O365-iOS-Connect
to connect my app to Office 365. My app can sign in to 365 account. But i can not find some docs how to Fetch/Create calender.
Thanks and sorry for my bad english.
Steps to fetch outlook calendars in iOS are:
I use MSGraph SDK & Azure AD v2.0 endpoint(for personal login)
Note: You must know how to install pods and check this link for details: https://graph.microsoft.io/en-us/
Steps:
Register your iOS application on Microsoft Application Registration Portal and it will give you a client-id
Install the following pods :
Go to your ViewController and define :
Now import these files as:
5.On your button click: First you have use your client-id and define your permissions in the scope as:
Now you have to authenticate with your login details and Microsoft login screen automatically opens up:
If there is no error, then error is nil and it will logged in successfully.
Now we can use different APIs using MSGraphClient and for calendars list:
Now, get calendars button action look like this:
we have a couple options in our GitHub code samples that might be of assistance.
One is called O365-iOS- Snippets: https://github.com/OfficeDev/O365-iOS-Snippets. The O365 iOS Snippets project shows you how to do basic operations against the Calendar, Contacts, Mail, and Files service endpoints in Office 365.
For Microsoft Graph, we've also created an iOS snippets project for that - https://github.com/OfficeDev/O365-iOS-Microsoft-Graph-Snippets. This sample shows how to use Microsoft Graph to send email, manage groups, and perform other activities with Office 365 data.
Hope this helps!
Freya H, The Office Newsroom