Skip to content

Commit 7cbf97b

Browse files
authored
docs: add DocC API documentation (#214)
* Use DocC for documentation * Remove jazzy badge, create dir * remove Gem lock file * build docs in local directory * place in documentation folder * fixed find folder * Try original docs/api link first * Update change log * Added initial tutorial * fix warning * fix docs build * Improve doc logo and fix warnings * clean up
1 parent 054a226 commit 7cbf97b

File tree

11 files changed

+76
-18
lines changed

11 files changed

+76
-18
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ coverage:
1010
changes: false
1111
project:
1212
default:
13-
target: 81
13+
target: 84
1414
comment:
1515
require_changes: true

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ jobs:
214214
runs-on: macos-latest
215215
steps:
216216
- uses: actions/checkout@v2
217+
#- name: Build
218+
# run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild docbuild -scheme ParseSwift\ \(macOS\) -derivedDataPath DerivedData | xcpretty
217219
- name: Cache Gems
218220
id: cache-gems
219221
uses: actions/cache@v2

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
bundle install
4444
- name: Get release version
4545
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
46+
#- name: Build
47+
# run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild docbuild -scheme ParseSwift\ \(macOS\) -derivedDataPath DerivedData | xcpretty
4648
# - name: Use multiple cores
4749
# run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
4850
- name: Create Jazzy Docs

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ __New features__
2121
__Improvements__
2222
- (Breaking Change) Change the following method parameter names: isUsingMongoDB -> usingMongoDB, isIgnoreCustomObjectIdConfig -> ignoringCustomObjectIdConfig, isUsingEQ -> usingEqComparator ([#321](https://github.com/parse-community/Parse-Swift/pull/321)), thanks to [Corey Baker](https://github.com/cbaker6).
2323
- (Breaking Change) Change the following method parameter names: isUsingTransactions -> usingTransactions, isAllowingCustomObjectIds -> allowingCustomObjectIds, isUsingEqualQueryConstraint -> usingEqualQueryConstraint, isMigratingFromObjcSDK -> migratingFromObjcSDK, isDeletingKeychainIfNeeded -> deletingKeychainIfNeeded ([#323](https://github.com/parse-community/Parse-Swift/pull/323)), thanks to [Corey Baker](https://github.com/cbaker6).
24+
- Add DocC for SDK documentation ([#209](https://github.com/parse-community/Parse-Swift/pull/214)), thanks to [Corey Baker](https://github.com/cbaker6).
2425

2526
### 3.1.2
2627
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/3.1.1...3.1.2)

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ let package = Package(
1616
dependencies: []),
1717
.testTarget(
1818
name: "ParseSwiftTests",
19-
dependencies: ["ParseSwift"])
19+
dependencies: ["ParseSwift"],
20+
exclude: ["Info.plist"])
2021
]
2122
)

ParseSwift.xcodeproj/project.pbxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,10 @@
334334
7085DDB326D1EC7F0033B977 /* ParseAuthenticationCombineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7085DDB226D1EC7F0033B977 /* ParseAuthenticationCombineTests.swift */; };
335335
7085DDB426D1EC7F0033B977 /* ParseAuthenticationCombineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7085DDB226D1EC7F0033B977 /* ParseAuthenticationCombineTests.swift */; };
336336
7085DDB526D1EC7F0033B977 /* ParseAuthenticationCombineTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7085DDB226D1EC7F0033B977 /* ParseAuthenticationCombineTests.swift */; };
337+
7085DD9426CBF3A70033B977 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = 7085DD9326CBF3A70033B977 /* Documentation.docc */; };
338+
7085DD9526CBF3A70033B977 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = 7085DD9326CBF3A70033B977 /* Documentation.docc */; };
339+
7085DD9626CBF3A70033B977 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = 7085DD9326CBF3A70033B977 /* Documentation.docc */; };
340+
7085DD9726CBF3A70033B977 /* Documentation.docc in Sources */ = {isa = PBXBuildFile; fileRef = 7085DD9326CBF3A70033B977 /* Documentation.docc */; };
337341
708D035225215F9B00646C70 /* Deletable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 708D035125215F9B00646C70 /* Deletable.swift */; };
338342
708D035325215F9B00646C70 /* Deletable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 708D035125215F9B00646C70 /* Deletable.swift */; };
339343
708D035425215F9B00646C70 /* Deletable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 708D035125215F9B00646C70 /* Deletable.swift */; };
@@ -962,6 +966,7 @@
962966
707A3C1F25B14BCF000D215C /* ParseApple.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseApple.swift; sourceTree = "<group>"; };
963967
7085DDA226CC8A470033B977 /* ParseHealth+combine.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "ParseHealth+combine.swift"; sourceTree = "<group>"; };
964968
7085DDB226D1EC7F0033B977 /* ParseAuthenticationCombineTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseAuthenticationCombineTests.swift; sourceTree = "<group>"; };
969+
7085DD9326CBF3A70033B977 /* Documentation.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = Documentation.docc; sourceTree = "<group>"; };
965970
708D035125215F9B00646C70 /* Deletable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Deletable.swift; sourceTree = "<group>"; };
966971
709B40C0268F999000ED2EAC /* IOS13Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IOS13Tests.swift; sourceTree = "<group>"; };
967972
709B98302556EC7400507778 /* ParseSwiftTeststvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ParseSwiftTeststvOS.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -1349,6 +1354,7 @@
13491354
4AB8B4F61F254AE10070F682 /* ParseSwift */ = {
13501355
isa = PBXGroup;
13511356
children = (
1357+
7085DD9326CBF3A70033B977 /* Documentation.docc */,
13521358
4AB8B4F71F254AE10070F682 /* Parse.h */,
13531359
4A82B7EE1F254B820063D731 /* Parse.swift */,
13541360
70110D51250680140091CC1D /* ParseConstants.swift */,
@@ -2212,6 +2218,7 @@
22122218
91679D64268E596300F71809 /* ParseVersion.swift in Sources */,
22132219
91285B1C26990D7F0051B544 /* ParsePolygon.swift in Sources */,
22142220
91BB8FCA2690AC99005A6BA5 /* QueryViewModel.swift in Sources */,
2221+
7085DD9426CBF3A70033B977 /* Documentation.docc in Sources */,
22152222
F97B45D624D9C6F200F4A88B /* ParseEncoder.swift in Sources */,
22162223
700395A325A119430052CB31 /* Operations.swift in Sources */,
22172224
91BB8FCF2690BA70005A6BA5 /* QueryObservable.swift in Sources */,
@@ -2445,6 +2452,7 @@
24452452
91679D65268E596300F71809 /* ParseVersion.swift in Sources */,
24462453
91285B1D26990D7F0051B544 /* ParsePolygon.swift in Sources */,
24472454
91BB8FCB2690AC99005A6BA5 /* QueryViewModel.swift in Sources */,
2455+
7085DD9526CBF3A70033B977 /* Documentation.docc in Sources */,
24482456
F97B45D724D9C6F200F4A88B /* ParseEncoder.swift in Sources */,
24492457
700395A425A119430052CB31 /* Operations.swift in Sources */,
24502458
91BB8FD02690BA70005A6BA5 /* QueryObservable.swift in Sources */,
@@ -2782,6 +2790,7 @@
27822790
91679D67268E596300F71809 /* ParseVersion.swift in Sources */,
27832791
91285B1F26990D7F0051B544 /* ParsePolygon.swift in Sources */,
27842792
91BB8FCD2690AC99005A6BA5 /* QueryViewModel.swift in Sources */,
2793+
7085DD9726CBF3A70033B977 /* Documentation.docc in Sources */,
27852794
F97B465D24D9C78C00F4A88B /* Increment.swift in Sources */,
27862795
700395A625A119430052CB31 /* Operations.swift in Sources */,
27872796
91BB8FD22690BA70005A6BA5 /* QueryObservable.swift in Sources */,
@@ -2921,6 +2930,7 @@
29212930
91679D66268E596300F71809 /* ParseVersion.swift in Sources */,
29222931
91285B1E26990D7F0051B544 /* ParsePolygon.swift in Sources */,
29232932
91BB8FCC2690AC99005A6BA5 /* QueryViewModel.swift in Sources */,
2933+
7085DD9626CBF3A70033B977 /* Documentation.docc in Sources */,
29242934
F97B465C24D9C78C00F4A88B /* Increment.swift in Sources */,
29252935
700395A525A119430052CB31 /* Operations.swift in Sources */,
29262936
91BB8FD12690BA70005A6BA5 /* QueryObservable.swift in Sources */,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ``ParseSwift``
2+
A pure Swift library that gives you access to the powerful Parse Server backend from your Swift applications.
3+
4+
## Overview
5+
![Parse logo](parse-swift.png)
6+
For more information about the Parse Platform and its features, see the public [documentation](https://docs.parseplatform.org). The ParseSwift SDK is not a port of the [Parse-SDK-iOS-OSX SDK](https://github.com/parse-community/Parse-SDK-iOS-OSX) and though some of it may feel familiar, it is not backwards compatible and is designed using [protocol oriented programming (POP) and value types](https://www.pluralsight.com/guides/protocol-oriented-programming-in-swift) instead of OOP and reference types. You can learn more about POP by watching [Protocol-Oriented Programming in Swift](https://developer.apple.com/videos/play/wwdc2015/408/) or [Protocol and Value Oriented Programming in UIKit Apps](https://developer.apple.com/videos/play/wwdc2016/419/) videos from previous WWDC's. For more details about ParseSwift, visit the [api documentation](http://parseplatform.org/Parse-Swift/api/).
7+
8+
To learn how to use or experiment with ParseSwift, you can run and edit the [ParseSwift.playground](https://github.com/parse-community/Parse-Swift/tree/main/ParseSwift.playground/Pages). You can use the parse-server in [this repo](https://github.com/netreconlab/parse-hipaa/tree/parse-swift) which has docker compose files (`docker-compose up` gives you a working server) configured to connect with the playground files, has [Parse Dashboard](https://github.com/parse-community/parse-dashboard), and can be used with MongoDB or PostgreSQL. You can also configure the Swift Playgrounds to work with your own Parse Server by editing the configuation in [Common.swift](https://github.com/parse-community/Parse-Swift/blob/e9ba846c399257100b285d25d2bd055628b13b4b/ParseSwift.playground/Sources/Common.swift#L4-L19). To learn more, check out [CONTRIBUTING.md](https://github.com/parse-community/Parse-Swift/blob/main/CONTRIBUTING.md#swift-playgrounds).
9+
10+
## Topics
11+
12+
### Initialize the SDK
13+
14+
- ``ParseSwift/ParseSwift/initialize(configuration:)``
15+
- ``ParseSwift/ParseSwift/initialize(applicationId:clientKey:masterKey:serverURL:liveQueryServerURL:allowingCustomObjectIds:usingTransactions:usingEqualQueryConstraint:keyValueStore:requestCachePolicy:cacheMemoryCapacity:cacheDiskCapacity:migratingFromObjcSDK:deletingKeychainIfNeeded:httpAdditionalHeaders:maxConnectionAttempts:authentication:)``
16+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@Tutorials(name: "ParseSwift") {
2+
@Intro(title: "Welcome to ParseSwift") {
3+
4+
}
5+
6+
@Chapter(name: "Your first Object") {
7+
8+
@Image(source: parse.png, alt: "Parse image")
9+
10+
@TutorialReference(tutorial: "doc:Your-First-Object")
11+
}
12+
}
442 KB
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@Tutorial(time: 15) {
2+
@Intro(title: "Your First Object") {
3+
4+
}
5+
6+
@Section(title: "Check server health") {
7+
@Steps {
8+
9+
@Step {
10+
Check your server health.
11+
}
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)