
- XCODE TUTORIAL INSTALL
- XCODE TUTORIAL CODE
xcworkspace to reload the project in Xcode.
XCODE TUTORIAL INSTALL
In a terminal window, navigate to the folder that contains the podfile you created and run pod install to install the MSAL library.Ĭlose Xcode and open. Add the following to podfile: use_frameworks! If you're using CocoaPods, install MSAL by first creating an empty file called podfile in the same folder as your project's.
Select Configure and save the MSAL Configuration that appears in the MSAL configuration page so you can enter it when you configure your app later.Ĭhoose one of the following ways to install the MSAL library in your app: CocoaPods. The bundle identifier appears in the Identity section. If you're creating your own project, select your project in Xcode and open the General tab. XCODE TUTORIAL CODE
If downloaded the code sample, the Bundle ID is. Under Manage, select Authentication > Add a platform > iOS/macOS.Skype, Xbox) under Supported account types. Select Accounts in any organizational directory (Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g.Users of your app might see this name, and you can change it later.
Under Manage, select App registrations > New registration. Search for and select Azure Active Directory. In the top menu to switch to the tenant in which you want to register the application. If you have access to multiple tenants, use the Directories + subscriptions filter. Select a folder to create your app and select Create. Set the Language to Swift and select Next. For macOS apps, select macOS > Cocoa App and select Next. For iOS apps, select iOS > Single view App and select Next. Open Xcode and select Create a new Xcode project. If you'd like to download a completed version of the app you build in this tutorial, you can find both versions on GitHub: MSAL will automatically renew tokens, deliver single sign-on (SSO) between other apps on the device, and manage the account(s). This sample uses the Microsoft Authentication Library (MSAL) to implement Authentication. The access token will be included in the HTTP request to the web API. Your app will be issued an access token for the Microsoft Graph API. The end user will accept the permissions your application has requested.
Your app will sign in the user either through a browser or the Microsoft Authenticator. This data will be accessed via a protected API (Microsoft Graph API in this case) that requires authorization and is protected by the Microsoft identity platform. The app in this tutorial can sign in users and get data from Microsoft Graph on their behalf. Add code to call the Microsoft Graph API.
Add code to support user sign-in and sign-out.Create an iOS or macOS app project in Xcode.