Skip to content

Commit a5197f6

Browse files
committed
remove the optional binding
use nil coalescing operator for sourceApplication argument.
1 parent eebeb20 commit a5197f6

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

samples/swift/uidemo/AppDelegate.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
3535
}
3636

3737
func application(app: UIApplication, openURL url: NSURL, options: [String : AnyObject]) -> Bool {
38-
if let sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String? {
39-
if FIRAuthUI.authUI()?.handleOpenURL(url, sourceApplication: sourceApplication) ?? false {
40-
return true
41-
}
38+
let sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey] as! String?
39+
if FIRAuthUI.authUI()?.handleOpenURL(url, sourceApplication: sourceApplication ?? "") ?? false {
40+
return true
4241
}
4342
// other URL handling goes here.
4443
return false

0 commit comments

Comments
 (0)