Skip to content

Commit cf24b79

Browse files
authored
Merge pull request #89777 from TylerMSFT/twhitney-iosfixes
Twhitney iosfixes
2 parents ac25fd7 + 85c9f0f commit cf24b79

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

articles/active-directory/develop/quickstart-v2-ios.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,9 @@ Your app must also have the following in your `AppDelegate`. This lets MSAL SDK
193193
194194
```swift
195195
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
196-
guard let sourceApplication = options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String else {
197-
return false
198-
}
199-
200-
return MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: sourceApplication)
201-
}
196+
197+
return MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String)
198+
}
202199
203200
```
204201

articles/active-directory/develop/tutorial-v2-ios.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,15 +336,12 @@ func initWebViewParams() {
336336
Open the `AppDelegate.swift` file. To handle the callback after sign-in, add `MSALPublicClientApplication.handleMSALResponse` to the `appDelegate` class like this:
337337

338338
```swift
339-
// Inside AppDelegate...
340-
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
339+
// Inside AppDelegate...
340+
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
341341

342-
guard let sourceApplication = options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String else {
343-
return false
344-
}
345-
346-
return MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: sourceApplication)
347-
}
342+
return MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: options[UIApplication.OpenURLOptionsKey.sourceApplication] as? String)
343+
}
344+
348345
```
349346

350347
**If you are using Xcode 11**, you should place MSAL callback into the `SceneDelegate.swift` instead.

0 commit comments

Comments
 (0)