Skip to content

Commit 015b197

Browse files
committed
Allow macOS app keychain to upgrade
1 parent 53cde57 commit 015b197

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.9.7...1.9.8)
99

1010
__Fixes__
11-
- Use a seperate Keychain for each app bundleId. This only effects macOS apps as their Keychain is handled by the OS differently. macOS app users will need to sign-in again after upgrading to this version. ([#224](https://github.com/parse-community/Parse-Swift/pull/224)), thanks to [Corey Baker](https://github.com/cbaker6).
11+
- Use a seperate Keychain for each app bundleId. This only effects macOS apps as their Keychain is handled by the OS differently. For macOS app developers only, the user who logged in last to your app will have their Keychain upgraded to the patched version. Other users/apps will either need to login again or logout then login again ([#224](https://github.com/parse-community/Parse-Swift/pull/224)), thanks to [Corey Baker](https://github.com/cbaker6).
1212

1313
### 1.9.7
1414
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.9.6...1.9.7)

Sources/ParseSwift/Parse.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,15 @@ public struct ParseSwift {
141141
let oneNineEightSDKVersion = try ParseVersion("1.9.8")
142142

143143
// All migrations from previous versions to current should occur here:
144+
#if !os(Linux) && !os(Android)
144145
if previousSDKVersion < oneNineEightSDKVersion {
145146
// Old macOS Keychain can't be used because it's global to all apps.
146-
#if !os(macOS) && !os(Linux) && !os(Android)
147147
_ = KeychainStore.old
148148
KeychainStore.shared.copy(keychain: KeychainStore.old)
149-
#endif
150-
#if !os(Linux) && !os(Android)
151149
// Need to delete the old Keychain because a new one is created with bundleId.
152150
try? KeychainStore.old.deleteAll()
153-
#endif
154151
}
152+
#endif
155153
if currentSDKVersion > previousSDKVersion {
156154
ParseVersion.current = currentSDKVersion.string
157155
}

Tests/ParseSwiftTests/InitializeSDKTests.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -293,21 +293,12 @@ class InitializeSDKTests: XCTestCase {
293293
masterKey: "masterKey",
294294
serverURL: url)
295295
XCTAssertEqual(ParseVersion.current, ParseConstants.version)
296-
#if !os(macOS)
297296
XCTAssertEqual(BaseParseUser.current, user)
298297
XCTAssertEqual(Installation.current, installation)
299298
XCTAssertEqual(Config.current?.welcomeMessage, config.welcomeMessage)
300299
XCTAssertEqual(Config.current?.winningNumber, config.winningNumber)
301300
let defaultACL = try? ParseACL.defaultACL()
302301
XCTAssertEqual(defaultACL, acl)
303-
#else
304-
XCTAssertNil(BaseParseUser.current)
305-
XCTAssertNil(Installation.current)
306-
XCTAssertNil(Config.current?.welcomeMessage)
307-
XCTAssertNil(Config.current?.winningNumber)
308-
let defaultACL = try? ParseACL.defaultACL()
309-
XCTAssertNil(defaultACL)
310-
#endif
311302
expectation1.fulfill()
312303
}
313304
wait(for: [expectation1], timeout: 10.0)

0 commit comments

Comments
 (0)