Skip to content

Commit ee67405

Browse files
authored
docs: Update documentation to show inits (#252)
* Update Jazzy to show async * documentation nits * ci should use latest xcode for docs
1 parent 9cab7f1 commit ee67405

29 files changed

+205
-31
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ coverage:
44
status:
55
patch:
66
default:
7-
target: 23
7+
target: auto
88
changes: false
99
project:
1010
default:

.github/workflows/ci.yml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches: '*'
77
env:
88
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
9-
CI_XCODE_13_VER: '/Applications/Xcode_13.0.app/Contents/Developer'
9+
CI_XCODE_13: '/Applications/Xcode_13.0.app/Contents/Developer'
1010

1111
jobs:
1212
xcode-test-ios:
@@ -16,18 +16,18 @@ jobs:
1616
- name: Version
1717
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -version
1818
env:
19-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
19+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
2020
- name: Build-Test
2121
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(iOS\) -destination platform\=iOS\ Simulator,name\=iPhone\ 12\ Pro\ Max -derivedDataPath DerivedData test | xcpretty
2222
env:
23-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
23+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
2424
- name: Upload coverage to Codecov
2525
uses: codecov/codecov-action@v2
2626
with:
2727
env_vars: IOS
2828
fail_ci_if_error: false
2929
env:
30-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
30+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
3131

3232
xcode-test-macos:
3333
runs-on: macos-11
@@ -42,13 +42,13 @@ jobs:
4242
- name: Build-Test
4343
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(macOS\) -destination platform\=macOS -derivedDataPath DerivedData test | xcpretty
4444
env:
45-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
45+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
4646
- name: Upload coverage to Codecov
4747
uses: codecov/codecov-action@v2
4848
with:
4949
env_vars: MACOS
5050
env:
51-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
51+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
5252

5353
xcode-test-tvos:
5454
runs-on: macos-11
@@ -57,13 +57,13 @@ jobs:
5757
- name: Build
5858
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(tvOS\) -destination platform\=tvOS\ Simulator,name\=Apple\ TV -derivedDataPath DerivedData test | xcpretty
5959
env:
60-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
60+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
6161
- name: Upload coverage to Codecov
6262
uses: codecov/codecov-action@v2
6363
with:
6464
env_vars: TVOS
6565
env:
66-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
66+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
6767

6868
xcode-build-watchos:
6969
runs-on: macos-11
@@ -72,13 +72,13 @@ jobs:
7272
- name: Build
7373
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -target ParseSwift\ \(watchOS\) | xcpretty
7474
env:
75-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
75+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
7676
- name: Upload coverage to Codecov
7777
uses: codecov/codecov-action@v2
7878
with:
7979
env_vars: WATCHOS
8080
env:
81-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
81+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
8282

8383
spm-test:
8484
runs-on: macos-11
@@ -93,25 +93,25 @@ jobs:
9393
- name: Build
9494
run: swift build -v
9595
env:
96-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
96+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
9797
- name: Test
9898
run: swift test --enable-code-coverage -v
9999
env:
100-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
100+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
101101
- name: Prepare codecov
102102
run: |
103103
XCTEST=$(find .build -type f -name 'ParseSwiftPackageTests')
104104
PROFDATA=$(find .build -type f -name '*.profdata')
105105
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info_spm.lcov
106106
env:
107-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
107+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
108108
- name: Upload coverage to Codecov
109109
uses: codecov/codecov-action@v2
110110
with:
111111
env_vars: SPM
112112
fail_ci_if_error: true
113113
env:
114-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
114+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
115115

116116
spm-test-5_2:
117117
needs: xcode-build-watchos
@@ -138,14 +138,14 @@ jobs:
138138
PROFDATA=$(find .build -type f -name '*.profdata')
139139
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info_spm_5_2.lcov
140140
env:
141-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
141+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
142142
- name: Upload coverage to Codecov
143143
uses: codecov/codecov-action@v2
144144
with:
145145
env_vars: SPM5_2
146146
fail_ci_if_error: true
147147
env:
148-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
148+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
149149

150150
linux:
151151
runs-on: ubuntu-18.04
@@ -188,6 +188,7 @@ jobs:
188188
run: ./Scripts/jazzy.sh
189189
env:
190190
BUILD_VERSION: '1.8.3'
191+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
191192

192193
cocoapods:
193194
needs: xcode-build-watchos
@@ -201,7 +202,7 @@ jobs:
201202
- name: CocoaPods
202203
run: pod lib lint --allow-warnings
203204
env:
204-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
205+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
205206

206207
carthage:
207208
needs: xcode-build-watchos
@@ -211,4 +212,4 @@ jobs:
211212
- name: Carthage
212213
run: ./carthage.sh build --no-skip-current --use-xcframeworks
213214
env:
214-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
215+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
types: [published]
55
env:
66
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
7-
CI_XCODE_13_VER: '/Applications/Xcode_13.0.app/Contents/Developer'
7+
CI_XCODE_13: '/Applications/Xcode_13.0.app/Contents/Developer'
88

99
jobs:
1010
cocoapods:
@@ -20,12 +20,12 @@ jobs:
2020
- name: CocoaPods
2121
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose
2222
env:
23-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
23+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
2424
- name: Deploy CocoaPods
2525
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push ParseSwift.podspec --allow-warnings --verbose
2626
env:
2727
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
28-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
28+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
2929

3030
docs:
3131
runs-on: macos-11
@@ -49,7 +49,7 @@ jobs:
4949
run: ./Scripts/jazzy.sh
5050
env:
5151
BUILD_VERSION: ${{ env.TAG }}
52-
DEVELOPER_DIR: ${{ env.CI_XCODE_13_VER }}
52+
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
5353
- name: Deploy Jazzy Docs
5454
uses: peaceiris/actions-gh-pages@v3
5555
with:

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Parse-Swift Changelog
22

33
### main
4-
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.10.2...main)
4+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.10.3...main)
55
* _Contributing to this repo? Add info about your change here to be included in the next release_
66

7+
### 1.10.3
8+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.10.2...1.10.3)
9+
10+
__Improvements__
11+
- Update documents to show new Swift 5.5 async/await methods ([#251](https://github.com/parse-community/Parse-Swift/pull/251)), thanks to [Corey Baker](https://github.com/cbaker6).
12+
713
### 1.10.2
814
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.10.1...1.10.2)
915

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
source 'https://rubygems.org'
22

3-
gem 'jazzy', '~> 0.14.0'
3+
gem 'jazzy', '~> 0.14.1'

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ GEM
6565
httpclient (2.8.3)
6666
i18n (1.8.10)
6767
concurrent-ruby (~> 1.0)
68-
jazzy (0.14.0)
68+
jazzy (0.14.1)
6969
cocoapods (~> 1.5)
7070
mustache (~> 1.1)
7171
open4 (~> 1.3)
@@ -112,7 +112,7 @@ PLATFORMS
112112
universal-darwin-20
113113

114114
DEPENDENCIES
115-
jazzy (~> 0.14.0)
115+
jazzy (~> 0.14.1)
116116

117117
BUNDLED WITH
118118
2.2.2

Scripts/jazzy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bundle exec jazzy \
55
--github_url https://github.com/parse-community/Parse-Swift \
66
--root-url http://parseplatform.org/Parse-Swift/api/ \
77
--module-version ${BUILD_VERSION} \
8-
--theme fullwidth \
8+
--theme apple \
99
--skip-undocumented \
1010
--output ./docs/api \
1111
--module ParseSwift \

Sources/ParseSwift/Authentication/3rd Party/ParseApple/ParseApple+async.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public extension ParseApple {
1919
- parameter identityToken: The `identityToken` from `ASAuthorizationAppleIDCredential`.
2020
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2121
- returns: An instance of the logged in `ParseUser`.
22+
- throws: `ParseError`.
2223
*/
2324
func login(user: String,
2425
identityToken: Data,
@@ -31,6 +32,13 @@ public extension ParseApple {
3132
}
3233
}
3334

35+
/**
36+
Login a `ParseUser` *asynchronously* using Apple authentication.
37+
- parameter authData: Dictionary containing key/values.
38+
- parameter options: A set of header options sent to the server. Defaults to an empty set.
39+
- returns: An instance of the logged in `ParseUser`.
40+
- throws: `ParseError`.
41+
*/
3442
func login(authData: [String: String],
3543
options: API.Options = []) async throws -> AuthenticatedUser {
3644
try await withCheckedThrowingContinuation { continuation in
@@ -51,6 +59,7 @@ public extension ParseApple {
5159
- parameter identityToken: The `identityToken` from `ASAuthorizationAppleIDCredential`.
5260
- parameter options: A set of header options sent to the server. Defaults to an empty set.
5361
- returns: An instance of the logged in `ParseUser`.
62+
- throws: `ParseError`.
5463
*/
5564
func link(user: String,
5665
identityToken: Data,
@@ -63,6 +72,13 @@ public extension ParseApple {
6372
}
6473
}
6574

75+
/**
76+
Link the *current* `ParseUser` *asynchronously* using Apple authentication.
77+
- parameter authData: Dictionary containing key/values.
78+
- parameter options: A set of header options sent to the server. Defaults to an empty set.
79+
- returns: An instance of the logged in `ParseUser`.
80+
- throws: `ParseError`.
81+
*/
6682
func link(authData: [String: String],
6783
options: API.Options = []) async throws -> AuthenticatedUser {
6884
try await withCheckedThrowingContinuation { continuation in

Sources/ParseSwift/Authentication/3rd Party/ParseApple/ParseApple+combine.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ public extension ParseApple {
3232
}
3333
}
3434

35+
/**
36+
Login a `ParseUser` *asynchronously* using Apple authentication. Publishes when complete.
37+
- parameter authData: Dictionary containing key/values.
38+
- parameter options: A set of header options sent to the server. Defaults to an empty set.
39+
- returns: A publisher that eventually produces a single value and then finishes or fails.
40+
*/
3541
func loginPublisher(authData: [String: String],
3642
options: API.Options = []) -> Future<AuthenticatedUser, ParseError> {
3743
Future { promise in
@@ -64,6 +70,12 @@ public extension ParseApple {
6470
}
6571
}
6672

73+
/**
74+
Link the *current* `ParseUser` *asynchronously* using Apple authentication. Publishes when complete.
75+
- parameter authData: Dictionary containing key/values.
76+
- parameter options: A set of header options sent to the server. Defaults to an empty set.
77+
- returns: A publisher that eventually produces a single value and then finishes or fails.
78+
*/
6779
func linkPublisher(authData: [String: String],
6880
options: API.Options = []) -> Future<AuthenticatedUser, ParseError> {
6981
Future { promise in

Sources/ParseSwift/Authentication/3rd Party/ParseFacebook/ParseFacebook+async.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public extension ParseFacebook {
2020
- parameter expiresIn: Optional expiration in seconds for Facebook login.
2121
- parameter options: A set of header options sent to the server. Defaults to an empty set.
2222
- returns: An instance of the logged in `ParseUser`.
23+
- throws: `ParseError`.
2324
*/
2425
func login(userId: String,
2526
authenticationToken: String,
@@ -41,6 +42,7 @@ public extension ParseFacebook {
4142
- parameter expiresIn: Optional expiration in seconds for Facebook login.
4243
- parameter options: A set of header options sent to the server. Defaults to an empty set.
4344
- returns: An instance of the logged in `ParseUser`.
45+
- throws: `ParseError`.
4446
*/
4547
func login(userId: String,
4648
accessToken: String,
@@ -55,6 +57,12 @@ public extension ParseFacebook {
5557
}
5658
}
5759

60+
/**
61+
Login a `ParseUser` *asynchronously* using Facebook authentication for graph API login.
62+
- parameter authData: Dictionary containing key/values.
63+
- returns: An instance of the logged in `ParseUser`.
64+
- throws: `ParseError`.
65+
*/
5866
func login(authData: [String: String],
5967
options: API.Options = []) async throws -> AuthenticatedUser {
6068
try await withCheckedThrowingContinuation { continuation in
@@ -75,6 +83,7 @@ public extension ParseFacebook {
7583
- parameter expiresIn: Optional expiration in seconds for Facebook login.
7684
- parameter options: A set of header options sent to the server. Defaults to an empty set.
7785
- returns: An instance of the logged in `ParseUser`.
86+
- throws: `ParseError`.
7887
*/
7988
func link(userId: String,
8089
authenticationToken: String,
@@ -96,6 +105,7 @@ public extension ParseFacebook {
96105
- parameter expiresIn: Optional expiration in seconds for Facebook login.
97106
- parameter options: A set of header options sent to the server. Defaults to an empty set.
98107
- returns: An instance of the logged in `ParseUser`.
108+
- throws: `ParseError`.
99109
*/
100110
func link(userId: String,
101111
accessToken: String,
@@ -110,6 +120,13 @@ public extension ParseFacebook {
110120
}
111121
}
112122

123+
/**
124+
Link the *current* `ParseUser` *asynchronously* using Facebook authentication for graph API login.
125+
- parameter authData: Dictionary containing key/values.
126+
- parameter options: A set of header options sent to the server. Defaults to an empty set.
127+
- returns: An instance of the logged in `ParseUser`.
128+
- throws: `ParseError`.
129+
*/
113130
func link(authData: [String: String],
114131
options: API.Options = []) async throws -> AuthenticatedUser {
115132
try await withCheckedThrowingContinuation { continuation in

0 commit comments

Comments
 (0)