Skip to content

Commit b5f0642

Browse files
author
Jayson Ng
committed
Update Swift login snippet to work with current version of Swift
Update to change 1. NSError to Error when logging in 2. use updated function name
1 parent bfe23a4 commit b5f0642

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_includes/ios/users.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ Of course, after you allow users to sign up, you need to let them log in to thei
8787
}];
8888
```
8989
```swift
90-
PFUser.logInWithUsernameInBackground("myname", password:"mypass") {
91-
(user: PFUser?, error: NSError?) -> Void in
90+
PFUser.logInWithUsername(inBackground:"myname", password:"mypass") {
91+
(user: PFUser?, error: Error?) -> Void in
9292
if user != nil {
9393
// Do stuff after successful login.
9494
} else {

0 commit comments

Comments
 (0)