Skip to content

Commit e26dafb

Browse files
author
Swasti Gupta
committed
updated correct code snippets
1 parent cf35b70 commit e26dafb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/MSAL_2x_Migration_Guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -402,30 +402,30 @@ MSALAccount *account = [application accountForIdentifier:@"accountId"
402402
}];
403403
```
404404

405-
Swift – Before:
405+
Swift – Before (Deprecated):
406406
```swift
407407
do {
408-
let account = try application.account(forIdentifier: "accountId")
408+
let account = try application.account(forHomeAccountId: "homeAccountId")
409409
// Handle account
410410
} catch {
411411
print("Failed to get account: \(error)")
412412
}
413413

414-
application.accountsFromDevice { (accounts, error) in
414+
application.allAccountsFilteredByAuthority { (accounts, error) in
415415
// Handle accounts
416416
}
417417
```
418418

419-
Swift – Before (Deprecated):
419+
Swift – After:
420420
```swift
421421
do {
422-
let account = try application.account(forHomeAccountId: "homeAccountId")
422+
let account = try application.account(forIdentifier: "accountId")
423423
// Handle account
424424
} catch {
425425
print("Failed to get account: \(error)")
426426
}
427427

428-
application.allAccountsFilteredByAuthority { (accounts, error) in
428+
application.accountsFromDevice { (accounts, error) in
429429
// Handle accounts
430430
}
431431
```

0 commit comments

Comments
 (0)