Skip to content

Commit

Permalink
docs: add back SDK init links under Topics section (#400)
Browse files Browse the repository at this point in the history
* docs: add back SDK init links under Topics section

* switch codecov back to auto
  • Loading branch information
cbaker6 authored Sep 2, 2022
1 parent 4909de3 commit 48bec30
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ coverage:
status:
patch:
default:
target: 83
target: auto
changes: false
project:
default:
Expand Down
4 changes: 2 additions & 2 deletions Sources/ParseSwift/Documentation.docc/ParseSwift.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ To learn how to use or experiment with ParseSwift, you can run and edit the [Par

### Initialize the SDK

- ``ParseSwift/ParseSwift/initialize(configuration:)``
- ``ParseSwift/ParseSwift/initialize(applicationId:clientKey:masterKey:serverURL:liveQueryServerURL:allowingCustomObjectIds:usingTransactions:usingEqualQueryConstraint:keyValueStore:requestCachePolicy:cacheMemoryCapacity:cacheDiskCapacity:migratingFromObjcSDK:deletingKeychainIfNeeded:httpAdditionalHeaders:maxConnectionAttempts:authentication:)``
- ``ParseSwift/initialize(configuration:)``
- ``ParseSwift/initialize(applicationId:clientKey:masterKey:serverURL:liveQueryServerURL:allowingCustomObjectIds:usingTransactions:usingEqualQueryConstraint:usingPostForQuery:keyValueStore:requestCachePolicy:cacheMemoryCapacity:cacheDiskCapacity:usingDataProtectionKeychain:deletingKeychainIfNeeded:httpAdditionalHeaders:maxConnectionAttempts:authentication:)``

5 changes: 5 additions & 0 deletions Sources/ParseSwift/Parse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ public var configuration: ParseConfiguration {
Configure the Parse Swift client. This should only be used when starting your app. Typically in the
`application(... didFinishLaunchingWithOptions launchOptions...)`.
- parameter configuration: The Parse configuration.
- warning: It is recomended to only specify `masterKey` when using the SDK on a server. Do not use this key on the client.
- warning: `usingTransactions` is experimental.
- warning: Setting `usingPostForQuery` to **true** will require all queries to access the server instead of following the `requestCachePolicy`.
- warning: Setting `usingDataProtectionKeychain` to **true** is known to cause issues in Playgrounds or in
situtations when apps do not have credentials to setup a Keychain.
*/
public func initialize(configuration: ParseConfiguration) {
Parse.configuration = configuration
Expand Down
12 changes: 9 additions & 3 deletions Sources/ParseSwift/Types/ParseConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ import FoundationNetworking

// swiftlint:disable line_length

/// The Configuration for a Parse client.
/// - warning: It is recomended to only specify `masterKey` when using the
/// SDK on a server. Do not use this key on the client.
/**
The Configuration for a Parse client.

- warning: It is recomended to only specify `masterKey` when using the SDK on a server. Do not use this key on the client.
- warning: `usingTransactions` is experimental.
- warning: Setting `usingPostForQuery` to **true** will require all queries to access the server instead of following the `requestCachePolicy`.
- warning: Setting `usingDataProtectionKeychain` to **true** is known to cause issues in Playgrounds or in
situtations when apps do not have credentials to setup a Keychain.
*/
public struct ParseConfiguration {

/// The application id for your Parse application.
Expand Down
6 changes: 6 additions & 0 deletions Tests/ParseSwiftTests/ParseLiveQueryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1672,6 +1672,8 @@ class ParseLiveQueryTests: XCTestCase {
guard let isSubscribed = try? client.isSubscribed(query),
let isPending = try? client.isPendingSubscription(query) else {
XCTFail("Shound unwrap")
expectation1.fulfill()
expectation2.fulfill()
return
}
XCTAssertTrue(isSubscribed)
Expand All @@ -1685,6 +1687,8 @@ class ParseLiveQueryTests: XCTestCase {
installationId: "naw")
guard let encoded = try? ParseCoding.jsonEncoder().encode(response) else {
XCTFail("Should encode")
expectation1.fulfill()
expectation2.fulfill()
return
}
client.received(encoded)
Expand Down Expand Up @@ -1754,6 +1758,8 @@ class ParseLiveQueryTests: XCTestCase {
installationId: "naw")
guard let encoded = try? ParseCoding.jsonEncoder().encode(response) else {
XCTFail("Should have encoded")
expectation1.fulfill()
expectation2.fulfill()
return
}
client.received(encoded)
Expand Down

0 comments on commit 48bec30

Please sign in to comment.