Skip to content

Commit a121bde

Browse files
authored
fix: overload QueryConstraint to accept Pointer<ParseObject> (#281)
* fix: overload QueryConstraint to accept Pointer<ParseObject> * Compile for Windows
1 parent 25b70d9 commit a121bde

File tree

92 files changed

+315
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+315
-239
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
### main
44

5-
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.2.4...main)
5+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.2.5...main)
66
* _Contributing to this repo? Add info about your change here to be included in the next release_
77

8+
### 2.2.5
9+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.2.4...2.2.5)
10+
11+
__Fixes__
12+
- Overload QueryConstraint to accept Pointer<ParseObject> ([#281](https://github.com/parse-community/Parse-Swift/pull/281)), thanks to [Corey Baker](https://github.com/cbaker6).
13+
- Add checks to build for Windows ([#281](https://github.com/parse-community/Parse-Swift/pull/281)), thanks to [Corey Baker](https://github.com/cbaker6).
14+
815
### 2.2.4
916
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/2.2.3...2.2.4)
1017

Sources/ParseSwift/Extensions/URLCache.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ internal extension URLCache {
2121
let parseCacheDirectory = "ParseCache"
2222
let diskURL = cacheURL.appendingPathComponent(parseCacheDirectory, isDirectory: true)
2323
if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) {
24-
#if !os(Linux) && !os(Android)
24+
#if !os(Linux) && !os(Android) && !os(Windows)
2525
return URLCache(memoryCapacity: ParseSwift.configuration.cacheMemoryCapacity,
2626
diskCapacity: ParseSwift.configuration.cacheDiskCapacity,
2727
directory: diskURL)

Sources/ParseSwift/InternalObjects/BaseParseInstallation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ internal struct BaseParseInstallation: ParseInstallation {
2929
guard let installationId = Self.currentContainer.installationId,
3030
Self.currentContainer.currentInstallation?.installationId == installationId else {
3131
try? ParseStorage.shared.delete(valueFor: ParseStorage.Keys.currentInstallation)
32-
#if !os(Linux) && !os(Android)
32+
#if !os(Linux) && !os(Android) && !os(Windows)
3333
try? KeychainStore.shared.delete(valueFor: ParseStorage.Keys.currentInstallation)
3434
#endif
3535
_ = Self.currentContainer

Sources/ParseSwift/LiveQuery/LiveQuerySocket.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Corey Baker on 12/31/20.
66
// Copyright © 2020 Parse Community. All rights reserved.
77
//
8-
#if !os(Linux) && !os(Android)
8+
#if !os(Linux) && !os(Android) && !os(Windows)
99
import Foundation
1010
#if canImport(FoundationNetworking)
1111
import FoundationNetworking

Sources/ParseSwift/LiveQuery/ParseLiveQuery+async.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Copyright © 2021 Parse Community. All rights reserved.
77
//
88

9-
#if swift(>=5.5) && canImport(_Concurrency) && !os(Linux) && !os(Android)
9+
#if swift(>=5.5) && canImport(_Concurrency) && !os(Linux) && !os(Android) && !os(Windows)
1010
import Foundation
1111

1212
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)

Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Corey Baker on 1/2/21.
66
// Copyright © 2021 Parse Community. All rights reserved.
77
//
8-
#if !os(Linux) && !os(Android)
8+
#if !os(Linux) && !os(Android) && !os(Windows)
99
import Foundation
1010
#if canImport(FoundationNetworking)
1111
import FoundationNetworking

Sources/ParseSwift/LiveQuery/Protocols/LiveQuerySocketDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Corey Baker on 1/4/21.
66
// Copyright © 2021 Parse Community. All rights reserved.
77
//
8-
#if !os(Linux) && !os(Android)
8+
#if !os(Linux) && !os(Android) && !os(Windows)
99
import Foundation
1010
#if canImport(FoundationNetworking)
1111
import FoundationNetworking

Sources/ParseSwift/LiveQuery/Protocols/ParseLiveQueryDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by Corey Baker on 1/4/21.
66
// Copyright © 2021 Parse Community. All rights reserved.
77
//
8-
#if !os(Linux) && !os(Android)
8+
#if !os(Linux) && !os(Android) && !os(Windows)
99
import Foundation
1010
#if canImport(FoundationNetworking)
1111
import FoundationNetworking

Sources/ParseSwift/Objects/ParseInstallation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public extension ParseInstallation {
128128
get {
129129
guard let installationInMemory: CurrentInstallationContainer<Self> =
130130
try? ParseStorage.shared.get(valueFor: ParseStorage.Keys.currentInstallation) else {
131-
#if !os(Linux) && !os(Android)
131+
#if !os(Linux) && !os(Android) && !os(Windows)
132132
guard let installationFromKeyChain: CurrentInstallationContainer<Self> =
133133
try? KeychainStore.shared.get(valueFor: ParseStorage.Keys.currentInstallation)
134134
else {
@@ -191,14 +191,14 @@ public extension ParseInstallation {
191191
}
192192

193193
internal static func saveCurrentContainerToKeychain() {
194-
#if !os(Linux) && !os(Android)
194+
#if !os(Linux) && !os(Android) && !os(Windows)
195195
try? KeychainStore.shared.set(Self.currentContainer, for: ParseStorage.Keys.currentInstallation)
196196
#endif
197197
}
198198

199199
internal static func deleteCurrentContainerFromKeychain() {
200200
try? ParseStorage.shared.delete(valueFor: ParseStorage.Keys.currentInstallation)
201-
#if !os(Linux) && !os(Android)
201+
#if !os(Linux) && !os(Android) && !os(Windows)
202202
try? KeychainStore.shared.delete(valueFor: ParseStorage.Keys.currentInstallation)
203203
#endif
204204
//Prepare new installation
@@ -253,7 +253,7 @@ extension ParseInstallation {
253253
guard let appInfo = Bundle.main.infoDictionary else {
254254
return
255255
}
256-
#if !os(Linux) && !os(Android)
256+
#if !os(Linux) && !os(Android) && !os(Windows)
257257
#if TARGET_OS_MACCATALYST
258258
// If using an Xcode new enough to know about Mac Catalyst:
259259
// Mac Catalyst Apps use a prefix to the bundle ID. This should not be transmitted

Sources/ParseSwift/Objects/ParseUser.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public extension ParseUser {
103103
get {
104104
guard let currentUserInMemory: CurrentUserContainer<Self>
105105
= try? ParseStorage.shared.get(valueFor: ParseStorage.Keys.currentUser) else {
106-
#if !os(Linux) && !os(Android)
106+
#if !os(Linux) && !os(Android) && !os(Windows)
107107
return try? KeychainStore.shared.get(valueFor: ParseStorage.Keys.currentUser)
108108
#else
109109
return nil
@@ -115,14 +115,14 @@ public extension ParseUser {
115115
}
116116

117117
internal static func saveCurrentContainerToKeychain() {
118-
#if !os(Linux) && !os(Android)
118+
#if !os(Linux) && !os(Android) && !os(Windows)
119119
try? KeychainStore.shared.set(Self.currentContainer, for: ParseStorage.Keys.currentUser)
120120
#endif
121121
}
122122

123123
internal static func deleteCurrentContainerFromKeychain() {
124124
try? ParseStorage.shared.delete(valueFor: ParseStorage.Keys.currentUser)
125-
#if !os(Linux) && !os(Android)
125+
#if !os(Linux) && !os(Android) && !os(Windows)
126126
if #available(macOS 10.15, iOS 13.0, macCatalyst 13.0, watchOS 6.0, tvOS 13.0, *) {
127127
URLSession.liveQuery.closeAll()
128128
}
@@ -992,7 +992,7 @@ extension ParseUser {
992992
var mutableSelf = self
993993
if let currentUser = Self.current,
994994
currentUser.hasSameObjectId(as: mutableSelf) == true {
995-
#if !os(Linux) && !os(Android)
995+
#if !os(Linux) && !os(Android) && !os(Windows)
996996
// swiftlint:disable:next line_length
997997
if let currentUserContainerInKeychain: CurrentUserContainer<BaseParseUser> = try? KeychainStore.shared.get(valueFor: ParseStorage.Keys.currentUser),
998998
currentUserContainerInKeychain.currentUser?.email == mutableSelf.email {

0 commit comments

Comments
 (0)