You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/develop/quickstart-v2-ios.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ ms.devlang: na
13
13
ms.topic: quickstart
14
14
ms.tgt_pltfrm: na
15
15
ms.workload: identity
16
-
ms.date: 09/16/2019
16
+
ms.date: 09/24/2019
17
17
ms.author: twhitney
18
18
ms.reviewer: jmprieur, saeeda
19
19
ms.custom: aaddev, identityplatformtop40
@@ -41,7 +41,7 @@ This quickstart is applicable to both iOS and macOS apps. Some steps are needed
41
41
> *[Express][Option 1: Register and auto configure your app and then download your code sample](#option-1-register-and-auto-configure-your-app-and-then-download-your-code-sample)
42
42
> *[Manual][Option 2: Register and manually configure your application and code sample](#option-2-register-and-manually-configure-your-application-and-code-sample)
43
43
>
44
-
> ### Option 1: Register and auto configure your app and then download your code sample
44
+
> ### Option 1: Register and auto configure your app and then download the code sample
45
45
> #### Step 1: Register your application
46
46
> To register your app,
47
47
> 1. Go to the new [Azure portal - App registrations](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/applicationsListBlade/quickStartType/IosQuickstartPage/sourceType/docs) pane.
@@ -58,15 +58,15 @@ This quickstart is applicable to both iOS and macOS apps. Some steps are needed
58
58
> 1. When the **Register an application** page appears, enter your application's registration information:
59
59
> - In the **Name** section, enter a meaningful application name that will be displayed to users of the app when they sign in or consent to your app.
60
60
> - Skip other configurations on this page.
61
-
> -Hit the `Register` button.
61
+
> -Select `Register`.
62
62
> 1. In the **Manage** section, select `Authentication` > `Add Platform` > `iOS`.
63
-
> - Enter the ***Bundle Identifier*** for your application.
63
+
> - Enter the ***Bundle Identifier*** for your application. The bundle identifier is just a unique string that uniquely identifies your application, for example `com.<yourname>.identitysample.MSALMacOS`. Make a note of the value you use.
64
64
> - Note that the iOS configuration is also applicable to macOS applications.
65
-
> 1. Select `Configure` and save the ***MSAL Configuration*** details for later.
65
+
> 1. Select `Configure` and save the ***MSAL Configuration*** details for later in this quickstart.
66
66
> [!div renderon="portal" class="sxs-lookup"]
67
67
>
68
68
> #### Step 1: Configure your application
69
-
> For the code sample for this quickstart to work, you need to add a redirect URI compatible with the Auth broker.
69
+
> For the code sample for this quickstart to work, you need to add a redirect URI compatible with the Auth broker.
@@ -80,7 +80,7 @@ This quickstart is applicable to both iOS and macOS apps. Some steps are needed
80
80
81
81
#### Step 3: Install dependencies
82
82
83
-
In a terminal window, navigate to the folder with the downloaded code sample and run `pod install` to install the latest MSAL library
83
+
In a terminal window, navigate to the folder with the downloaded code sample and run `pod install` to install the latest MSAL library.
84
84
85
85
#### Step 4: Configure your project
86
86
@@ -89,13 +89,14 @@ In a terminal window, navigate to the folder with the downloaded code sample and
89
89
90
90
> [!div renderon="portal" class="sxs-lookup"]
91
91
> 1. Extract the zip file and open the project in XCode.
92
-
> 1. Edit **ViewController.swift** and replace the line starting with 'let kClientID' with the following code snippet:
92
+
> 1. Edit **ViewController.swift** and replace the line starting with 'let kClientID' with the following code snippet. Remember to update the value for `kClientID` and `kAuthority` with the client ID and tenant ID that you saved when you registered your app in the portal earlier in the quickstart:
>1. Open the project settings. In the **Identity** section, enter the **Bundle Identifier** that you entered into the portal.
97
98
>1. For iOS only, right-click **Info.plist** and select **Open As**>**Source Code**.
98
-
>1. For iOS only, under the dict root node, replace with your***Bundle Id***:
99
+
>1. For iOS only, under the dict root node, replace `Enter_the_bundle_Id_Here`with the***Bundle Id*** that you entered in the portal.
99
100
>
100
101
> ```xml
101
102
><key>CFBundleURLTypes</key>
@@ -107,7 +108,6 @@ In a terminal window, navigate to the folder with the downloaded code sample and
107
108
></array>
108
109
></dict>
109
110
></array>
110
-
>
111
111
> ```
112
112
>1. Build & run the app!
113
113
> [!div class="sxs-lookup" renderon="portal"]
@@ -116,34 +116,34 @@ In a terminal window, navigate to the folder with the downloaded code sample and
116
116
> [!div renderon="docs"]
117
117
>
118
118
>1. Extract the zip file and open the project in XCode.
119
-
>1. Edit **ViewController.swift** and replace the line starting with 'let kClientID' with the following code snippet:
120
-
>
119
+
>1. Edit **ViewController.swift** and replace the line starting with 'let kClientID' with the following code snippet. Remember to update the value for `kClientID` and `kAuthority` with the clientID and tenant ID that you saved when you registered your app in the portal earlier in this quickstart:
>1. Open the project settings. In the **Identity** section, enter the **Bundle Identifier** that you entered into the portal.
125
125
>1. For iOS only, right-click **Info.plist** and select **Open As**>**Source Code**.
126
-
>1. For iOS only, under the dict root node, replace with your***Bundle Id***:
126
+
>1. For iOS only, under the dict root node, replace `Enter_the_bundle_Id_Here`with the***Bundle Id*** that you used in the portal.
127
127
>
128
128
> ```xml
129
129
><key>CFBundleURLTypes</key>
130
130
><array>
131
131
><dict>
132
132
><key>CFBundleURLSchemes</key>
133
133
><array>
134
-
><string>msauth.<ENTER_YOUR_BUNDLE_ID></string>
134
+
><string>msauth.Enter_the_Bundle_Id_Here</string>
135
135
></array>
136
136
></dict>
137
137
></array>
138
-
>
138
+
>
139
139
> ```
140
140
>1. Build & run the app!
141
141
142
142
## More Information
143
143
144
144
Read these sections to learn more about this quickstart.
145
145
146
-
### Getting MSAL
146
+
### Get MSAL
147
147
148
148
MSAL ([MSAL.framework](https://github.com/AzureAD/microsoft-authentication-library-for-objc)) is the library used to sign in users and request tokens used to access an API protected by Microsoft identity platform. You can add MSAL to your application using the following process:
149
149
@@ -166,7 +166,7 @@ Run CocoaPods installation command:
166
166
167
167
```pod install```
168
168
169
-
### MSAL initialization
169
+
### Initialize MSAL
170
170
171
171
You can add the reference for MSAL by adding the following code:
172
172
@@ -233,11 +233,11 @@ Finally, your app must has an `LSApplicationQueriesSchemes` entry in your ***Inf
233
233
</array>
234
234
```
235
235
236
-
### Sign in users &Request tokens
236
+
### Sign in users &request tokens
237
237
238
238
MSAL has two methods used to acquire tokens: `acquireToken` and `acquireTokenSilent`.
239
239
240
-
#### acquireToken:Getting a token interactively
240
+
#### acquireToken:Get a token interactively
241
241
242
242
Some situations require users to interact with Microsoft identity platform. In these cases, the end user may be required to select their account, enter their credentials, or consent to your app's permissions. For example,
>| `scopes` | Contains the scopes being requested (that is, `[ "user.read" ]` for Microsoft Graph or `[ "<Application ID URL>/scope" ]` for custom Web APIs (`api://<Application ID>/access_as_user`) |
257
257
258
-
#### acquireTokenSilent:Getting an access token silently
258
+
#### acquireTokenSilent:Get an access token silently
259
259
260
260
Apps shouldn't require their users to sign in every time they request a token. If the user has already signed in, this method allows apps to request tokens silently.
0 commit comments