Skip to content

Commit a64726f

Browse files
authored
feat: add ParsePointer async fetch (#271)
* docs: update documentation * add ParsePointer async fetch * Update CI to Xcode 13.1 * Try concurrency build for older OS's * revert
1 parent 321905d commit a64726f

File tree

11 files changed

+219
-41
lines changed

11 files changed

+219
-41
lines changed

.github/workflows/ci.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
branches: '*'
77
env:
88
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
9-
CI_XCODE_13: '/Applications/Xcode_13.0.app/Contents/Developer'
9+
CI_XCODE_13: '/Applications/Xcode_13.1.app/Contents/Developer'
1010

1111
jobs:
1212
xcode-test-ios:
13-
runs-on: macos-11
13+
runs-on: macos-latest
1414
steps:
1515
- uses: actions/checkout@v2
1616
- name: Version
@@ -40,7 +40,7 @@ jobs:
4040
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
4141

4242
xcode-test-macos:
43-
runs-on: macos-11
43+
runs-on: macos-latest
4444
steps:
4545
- uses: actions/checkout@v2
4646
- name: Create and set the default keychain
@@ -71,7 +71,7 @@ jobs:
7171
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
7272

7373
xcode-test-tvos:
74-
runs-on: macos-11
74+
runs-on: macos-latest
7575
steps:
7676
- uses: actions/checkout@v2
7777
- name: Build
@@ -96,7 +96,7 @@ jobs:
9696
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
9797

9898
xcode-build-watchos:
99-
runs-on: macos-11
99+
runs-on: macos-latest
100100
steps:
101101
- uses: actions/checkout@v2
102102
- name: Build
@@ -111,7 +111,7 @@ jobs:
111111
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
112112

113113
spm-test:
114-
runs-on: macos-11
114+
runs-on: macos-latest
115115
steps:
116116
- uses: actions/checkout@v2
117117
- name: Create and set the default keychain
@@ -201,7 +201,7 @@ jobs:
201201

202202
docs:
203203
needs: xcode-build-watchos
204-
runs-on: macos-11
204+
runs-on: macos-latest
205205
steps:
206206
- uses: actions/checkout@v2
207207
- name: Cache Gems
@@ -224,7 +224,7 @@ jobs:
224224

225225
cocoapods:
226226
needs: xcode-build-watchos
227-
runs-on: macos-11
227+
runs-on: macos-latest
228228
steps:
229229
- uses: actions/checkout@v2
230230
- name: Update Framework Version
@@ -238,7 +238,7 @@ jobs:
238238

239239
carthage:
240240
needs: xcode-build-watchos
241-
runs-on: macos-11
241+
runs-on: macos-latest
242242
steps:
243243
- uses: actions/checkout@v2
244244
- name: Carthage

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
types: [published]
55
env:
66
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
7-
CI_XCODE_13: '/Applications/Xcode_13.0.app/Contents/Developer'
7+
CI_XCODE_13: '/Applications/Xcode_13.1.app/Contents/Developer'
88

99
jobs:
1010
cocoapods:
11-
runs-on: macos-11
11+
runs-on: macos-latest
1212
steps:
1313
- uses: actions/checkout@v2
1414
- name: Get release version
@@ -24,7 +24,7 @@ jobs:
2424
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
2525

2626
docs:
27-
runs-on: macos-11
27+
runs-on: macos-latest
2828
steps:
2929
- uses: actions/checkout@v2
3030
- name: Cache Gems

ParseSwift.xcodeproj/project.pbxproj

+28
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,17 @@
358358
70BDA2B4250536FF00FC2237 /* ParseInstallation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70BDA2B2250536FF00FC2237 /* ParseInstallation.swift */; };
359359
70BDA2B5250536FF00FC2237 /* ParseInstallation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70BDA2B2250536FF00FC2237 /* ParseInstallation.swift */; };
360360
70BDA2B6250536FF00FC2237 /* ParseInstallation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70BDA2B2250536FF00FC2237 /* ParseInstallation.swift */; };
361+
70C167AF27304EE4009F4E30 /* Pointer+combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167AE27304EE4009F4E30 /* Pointer+combine.swift */; };
362+
70C167B027304EE4009F4E30 /* Pointer+combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167AE27304EE4009F4E30 /* Pointer+combine.swift */; };
363+
70C167B127304EE4009F4E30 /* Pointer+combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167AE27304EE4009F4E30 /* Pointer+combine.swift */; };
364+
70C167B227304EE4009F4E30 /* Pointer+combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167AE27304EE4009F4E30 /* Pointer+combine.swift */; };
365+
70C167B427304F09009F4E30 /* Pointer+async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167B327304F09009F4E30 /* Pointer+async.swift */; };
366+
70C167B527304F09009F4E30 /* Pointer+async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167B327304F09009F4E30 /* Pointer+async.swift */; };
367+
70C167B627304F09009F4E30 /* Pointer+async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167B327304F09009F4E30 /* Pointer+async.swift */; };
368+
70C167B727304F09009F4E30 /* Pointer+async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167B327304F09009F4E30 /* Pointer+async.swift */; };
369+
70C167B927305101009F4E30 /* ParsePointerAsyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167B827305101009F4E30 /* ParsePointerAsyncTests.swift */; };
370+
70C167BA27305101009F4E30 /* ParsePointerAsyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167B827305101009F4E30 /* ParsePointerAsyncTests.swift */; };
371+
70C167BB27305101009F4E30 /* ParsePointerAsyncTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C167B827305101009F4E30 /* ParsePointerAsyncTests.swift */; };
361372
70C5502225B3D8F700B5DBC2 /* ParseAppleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C5502125B3D8F700B5DBC2 /* ParseAppleTests.swift */; };
362373
70C5502325B3D8F700B5DBC2 /* ParseAppleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C5502125B3D8F700B5DBC2 /* ParseAppleTests.swift */; };
363374
70C5502425B3D8F700B5DBC2 /* ParseAppleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70C5502125B3D8F700B5DBC2 /* ParseAppleTests.swift */; };
@@ -883,6 +894,9 @@
883894
70BC0B32251903D1001556DB /* ParseGeoPointTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseGeoPointTests.swift; sourceTree = "<group>"; };
884895
70BC988F252A5B5C00FF3074 /* Objectable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Objectable.swift; sourceTree = "<group>"; };
885896
70BDA2B2250536FF00FC2237 /* ParseInstallation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseInstallation.swift; sourceTree = "<group>"; };
897+
70C167AE27304EE4009F4E30 /* Pointer+combine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Pointer+combine.swift"; sourceTree = "<group>"; };
898+
70C167B327304F09009F4E30 /* Pointer+async.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Pointer+async.swift"; sourceTree = "<group>"; };
899+
70C167B827305101009F4E30 /* ParsePointerAsyncTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParsePointerAsyncTests.swift; sourceTree = "<group>"; };
886900
70C5502125B3D8F700B5DBC2 /* ParseAppleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseAppleTests.swift; sourceTree = "<group>"; };
887901
70C5503725B406B800B5DBC2 /* ParseSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseSession.swift; sourceTree = "<group>"; };
888902
70C5504525B40D5200B5DBC2 /* ParseSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseSessionTests.swift; sourceTree = "<group>"; };
@@ -1169,6 +1183,7 @@
11691183
917BA43D2703E84000F8D747 /* ParseOperationAsyncTests.swift */,
11701184
7044C1EB25C5CC930011F6E7 /* ParseOperationCombineTests.swift */,
11711185
70C5508425B4A68700B5DBC2 /* ParseOperationTests.swift */,
1186+
70C167B827305101009F4E30 /* ParsePointerAsyncTests.swift */,
11721187
70E09E1B262F0634002DD451 /* ParsePointerCombineTests.swift */,
11731188
70CE1D882545BF730018D572 /* ParsePointerTests.swift */,
11741189
91285B2026991EE80051B544 /* ParsePolygonTests.swift */,
@@ -1520,6 +1535,8 @@
15201535
7004C21F25B63C7A005E0AD9 /* ParseRelation.swift */,
15211536
91679D63268E596300F71809 /* ParseVersion.swift */,
15221537
F97B45BE24D9C6F200F4A88B /* Pointer.swift */,
1538+
70C167B327304F09009F4E30 /* Pointer+async.swift */,
1539+
70C167AE27304EE4009F4E30 /* Pointer+combine.swift */,
15231540
F97B45BB24D9C6F200F4A88B /* Query.swift */,
15241541
7045769726BD917500F86F71 /* Query+async.swift */,
15251542
7044C1AC25C4FC080011F6E7 /* Query+combine.swift */,
@@ -2060,6 +2077,7 @@
20602077
F97B45F224D9C6F200F4A88B /* Pointer.swift in Sources */,
20612078
703B095826BF480D005A112F /* ParseFacebook+combine.swift in Sources */,
20622079
70510AAC259EE25E00FEA700 /* LiveQuerySocket.swift in Sources */,
2080+
70C167AF27304EE4009F4E30 /* Pointer+combine.swift in Sources */,
20632081
7044C19125C4F5B60011F6E7 /* ParseFile+combine.swift in Sources */,
20642082
70F79A192639CE6F00731C46 /* ParseHealth.swift in Sources */,
20652083
7044C19F25C4FA870011F6E7 /* ParseOperation+combine.swift in Sources */,
@@ -2073,6 +2091,7 @@
20732091
7028373926BD8C89007688C9 /* ParseUser+async.swift in Sources */,
20742092
705A9A2F25991C1400B3547F /* Fileable.swift in Sources */,
20752093
89899D342603CF36002E2043 /* ParseTwitter.swift in Sources */,
2094+
70C167B427304F09009F4E30 /* Pointer+async.swift in Sources */,
20762095
F97B464A24D9C78B00F4A88B /* Delete.swift in Sources */,
20772096
F97B460624D9C6F200F4A88B /* ParseUser.swift in Sources */,
20782097
700396F825A394AE0052CB31 /* ParseLiveQueryDelegate.swift in Sources */,
@@ -2153,6 +2172,7 @@
21532172
91679D6D268F261800F71809 /* ParseVersionTests.swift in Sources */,
21542173
917BA44E2703F2B400F8D747 /* ParseFacebookAsyncTests.swift in Sources */,
21552174
911DB13624C4FC100027F3C7 /* ParseObjectTests.swift in Sources */,
2175+
70C167B927305101009F4E30 /* ParsePointerAsyncTests.swift in Sources */,
21562176
70E09E1C262F0634002DD451 /* ParsePointerCombineTests.swift in Sources */,
21572177
89899D592603CF3E002E2043 /* ParseTwitterTests.swift in Sources */,
21582178
70CE1D892545BF730018D572 /* ParsePointerTests.swift in Sources */,
@@ -2270,6 +2290,7 @@
22702290
F97B45F324D9C6F200F4A88B /* Pointer.swift in Sources */,
22712291
703B095926BF480D005A112F /* ParseFacebook+combine.swift in Sources */,
22722292
70510AAD259EE25E00FEA700 /* LiveQuerySocket.swift in Sources */,
2293+
70C167B027304EE4009F4E30 /* Pointer+combine.swift in Sources */,
22732294
7044C19225C4F5B60011F6E7 /* ParseFile+combine.swift in Sources */,
22742295
70F79A1A2639CE6F00731C46 /* ParseHealth.swift in Sources */,
22752296
7044C1A025C4FA870011F6E7 /* ParseOperation+combine.swift in Sources */,
@@ -2283,6 +2304,7 @@
22832304
7028373A26BD8C89007688C9 /* ParseUser+async.swift in Sources */,
22842305
705A9A3025991C1400B3547F /* Fileable.swift in Sources */,
22852306
89899D332603CF36002E2043 /* ParseTwitter.swift in Sources */,
2307+
70C167B527304F09009F4E30 /* Pointer+async.swift in Sources */,
22862308
F97B464B24D9C78B00F4A88B /* Delete.swift in Sources */,
22872309
F97B460724D9C6F200F4A88B /* ParseUser.swift in Sources */,
22882310
700396F925A394AE0052CB31 /* ParseLiveQueryDelegate.swift in Sources */,
@@ -2372,6 +2394,7 @@
23722394
91679D6F268F261A00F71809 /* ParseVersionTests.swift in Sources */,
23732395
917BA4502703F2B400F8D747 /* ParseFacebookAsyncTests.swift in Sources */,
23742396
709B98512556ECAA00507778 /* ParseEncoderExtraTests.swift in Sources */,
2397+
70C167BB27305101009F4E30 /* ParsePointerAsyncTests.swift in Sources */,
23752398
70E09E1E262F0634002DD451 /* ParsePointerCombineTests.swift in Sources */,
23762399
89899D642603CF3F002E2043 /* ParseTwitterTests.swift in Sources */,
23772400
709B98532556ECAA00507778 /* ParsePointerTests.swift in Sources */,
@@ -2458,6 +2481,7 @@
24582481
91679D6E268F261900F71809 /* ParseVersionTests.swift in Sources */,
24592482
917BA44F2703F2B400F8D747 /* ParseFacebookAsyncTests.swift in Sources */,
24602483
70F2E2B6254F283000B2EA5C /* ParseACLTests.swift in Sources */,
2484+
70C167BA27305101009F4E30 /* ParsePointerAsyncTests.swift in Sources */,
24612485
70E09E1D262F0634002DD451 /* ParsePointerCombineTests.swift in Sources */,
24622486
89899D632603CF3E002E2043 /* ParseTwitterTests.swift in Sources */,
24632487
70F2E2B7254F283000B2EA5C /* ParsePointerTests.swift in Sources */,
@@ -2575,6 +2599,7 @@
25752599
F97B45FD24D9C6F200F4A88B /* ParseACL.swift in Sources */,
25762600
703B095B26BF480D005A112F /* ParseFacebook+combine.swift in Sources */,
25772601
70510AAF259EE25E00FEA700 /* LiveQuerySocket.swift in Sources */,
2602+
70C167B227304EE4009F4E30 /* Pointer+combine.swift in Sources */,
25782603
7044C19425C4F5B60011F6E7 /* ParseFile+combine.swift in Sources */,
25792604
70F79A1C2639CE6F00731C46 /* ParseHealth.swift in Sources */,
25802605
7044C1A225C4FA870011F6E7 /* ParseOperation+combine.swift in Sources */,
@@ -2588,6 +2613,7 @@
25882613
7028373C26BD8C89007688C9 /* ParseUser+async.swift in Sources */,
25892614
705A9A3225991C1400B3547F /* Fileable.swift in Sources */,
25902615
89899D282603CF35002E2043 /* ParseTwitter.swift in Sources */,
2616+
70C167B727304F09009F4E30 /* Pointer+async.swift in Sources */,
25912617
F97B45F524D9C6F200F4A88B /* Pointer.swift in Sources */,
25922618
F97B460924D9C6F200F4A88B /* ParseUser.swift in Sources */,
25932619
700396FB25A394AE0052CB31 /* ParseLiveQueryDelegate.swift in Sources */,
@@ -2699,6 +2725,7 @@
26992725
F97B45FC24D9C6F200F4A88B /* ParseACL.swift in Sources */,
27002726
703B095A26BF480D005A112F /* ParseFacebook+combine.swift in Sources */,
27012727
70510AAE259EE25E00FEA700 /* LiveQuerySocket.swift in Sources */,
2728+
70C167B127304EE4009F4E30 /* Pointer+combine.swift in Sources */,
27022729
7044C19325C4F5B60011F6E7 /* ParseFile+combine.swift in Sources */,
27032730
70F79A1B2639CE6F00731C46 /* ParseHealth.swift in Sources */,
27042731
7044C1A125C4FA870011F6E7 /* ParseOperation+combine.swift in Sources */,
@@ -2712,6 +2739,7 @@
27122739
7028373B26BD8C89007688C9 /* ParseUser+async.swift in Sources */,
27132740
705A9A3125991C1400B3547F /* Fileable.swift in Sources */,
27142741
89899D322603CF35002E2043 /* ParseTwitter.swift in Sources */,
2742+
70C167B627304F09009F4E30 /* Pointer+async.swift in Sources */,
27152743
F97B45F424D9C6F200F4A88B /* Pointer.swift in Sources */,
27162744
F97B460824D9C6F200F4A88B /* ParseUser.swift in Sources */,
27172745
700396FA25A394AE0052CB31 /* ParseLiveQueryDelegate.swift in Sources */,

Sources/ParseSwift/Objects/ParseObject+combine.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import Combine
1212

1313
public extension ParseObject {
1414

15-
// MARK: Combine
15+
// MARK: Fetchable - Combine
1616
/**
1717
Fetches the `ParseObject` *aynchronously* with the current data from the server and sets an error if one occurs.
1818
Publishes when complete.

Sources/ParseSwift/Operations/ParseOperation.swift

+1
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ public struct ParseOperation<T>: Savable where T: ParseObject {
399399
}
400400
}
401401

402+
// MARK: Savable
402403
extension ParseOperation {
403404
/**
404405
Saves the operations on the `ParseObject` *synchronously* and throws an error if there's an issue.

Sources/ParseSwift/Types/ParseFile+async.swift

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import FoundationNetworking
1515
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
1616
public extension ParseFile {
1717

18-
// MARK: Async/Await
18+
// MARK: Fetchable - Async/Await
1919
/**
20-
Fetches a file with given url *synchronously*.
20+
Fetches a file with given url *asynchronously*.
2121
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2222
- returns: A publisher that eventually produces a single value and then finishes or fails.
2323
- throws: `ParseError`.
@@ -30,7 +30,7 @@ public extension ParseFile {
3030
}
3131

3232
/**
33-
Fetches a file with given url *synchronously*.
33+
Fetches a file with given url *asynchronously*.
3434
- parameter options: A set of header options sent to the server. Defaults to an empty set.
3535
- parameter progress: A block that will be called when file updates it's progress.
3636
It should have the following argument signature: `(task: URLSessionDownloadTask,
@@ -48,6 +48,7 @@ public extension ParseFile {
4848
}
4949
}
5050

51+
// MARK: Savable - Async/Await
5152
/**
5253
Creates a file with given data *asynchronously* and executes the given callback block.
5354
A name will be assigned to it by the server. If the file hasn't been downloaded, it will automatically
@@ -86,6 +87,7 @@ public extension ParseFile {
8687
}
8788
}
8889

90+
// MARK: Deletable - Async/Await
8991
/**
9092
Deletes the file from the Parse Server. Publishes when complete.
9193
- requires: `.useMasterKey` has to be available.

Sources/ParseSwift/Types/ParseFile+combine.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Combine
1515

1616
public extension ParseFile {
1717

18-
// MARK: Combine
18+
// MARK: Fechable - Combine
1919
/**
2020
Fetches a file with given url *synchronously*. Publishes when complete.
2121
- parameter options: A set of header options sent to the server. Defaults to an empty set.
@@ -46,6 +46,7 @@ public extension ParseFile {
4646
}
4747
}
4848

49+
// MARK: Savable - Combine
4950
/**
5051
Creates a file with given data *asynchronously* and executes the given callback block.
5152
Publishes when complete.
@@ -80,6 +81,7 @@ public extension ParseFile {
8081
}
8182
}
8283

84+
// MARK: Deletable - Combine
8385
/**
8486
Deletes the file from the Parse Server. Publishes when complete.
8587
- requires: `.useMasterKey` has to be available.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// Pointer+async.swift
3+
// ParseSwift
4+
//
5+
// Created by Corey Baker on 11/1/21.
6+
// Copyright © 2021 Parse Community. All rights reserved.
7+
//
8+
9+
#if swift(>=5.5) && canImport(_Concurrency)
10+
import Foundation
11+
12+
// MARK: Fetchable - Async/Await
13+
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
14+
public extension Pointer {
15+
/**
16+
Fetches the `ParseObject` *aynchronously* with the current data from the server and sets an error if one occurs.
17+
- parameter includeKeys: The name(s) of the key(s) to include that are
18+
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
19+
`includeAll` for `Query`.
20+
- parameter options: A set of header options sent to the server. Defaults to an empty set.
21+
- returns: The `ParseObject` with respect to the `Pointer`.
22+
*/
23+
func fetch(includeKeys: [String]? = nil,
24+
options: API.Options = []) async throws -> T {
25+
try await withCheckedThrowingContinuation { continuation in
26+
self.fetch(includeKeys: includeKeys,
27+
options: options,
28+
completion: continuation.resume)
29+
}
30+
}
31+
}
32+
33+
#endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// Pointer+combine.swift
3+
// ParseSwift
4+
//
5+
// Created by Corey Baker on 11/1/21.
6+
// Copyright © 2021 Parse Community. All rights reserved.
7+
//
8+
9+
#if canImport(Combine)
10+
import Foundation
11+
import Combine
12+
13+
// MARK: Fetchable - Combine
14+
public extension Pointer {
15+
/**
16+
Fetches the `ParseObject` *aynchronously* with the current data from the server and sets an error if one occurs.
17+
Publishes when complete.
18+
- parameter includeKeys: The name(s) of the key(s) to include that are
19+
`ParseObject`s. Use `["*"]` to include all keys. This is similar to `include` and
20+
`includeAll` for `Query`.
21+
- parameter options: A set of header options sent to the server. Defaults to an empty set.
22+
- returns: A publisher that eventually produces a single value and then finishes or fails.
23+
*/
24+
func fetchPublisher(includeKeys: [String]? = nil,
25+
options: API.Options = []) -> Future<T, ParseError> {
26+
Future { promise in
27+
self.fetch(includeKeys: includeKeys,
28+
options: options,
29+
completion: promise)
30+
}
31+
}
32+
}
33+
#endif

0 commit comments

Comments
 (0)