Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit 0ccb99a

Browse files
committed
Nil check for open url callback
1 parent f22871f commit 0ccb99a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

MSALiOSB2C/AppDelegate.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
8080

8181
print("Received callback!")
8282

83-
MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: sourceApplication!)
83+
guard let sourceApp = sourceApplication else { return false }
84+
85+
MSALPublicClientApplication.handleMSALResponse(url, sourceApplication: sourceApp)
8486

8587
return true
8688
}

0 commit comments

Comments
 (0)