Skip to content

Commit f110307

Browse files
authored
refactor: Modernize Xcode project and testing (#101)
* fix building docs in Xcode proj * modernize testing and schemes * fix CI * update proj * run oldest on macOS * run oldest on iOS * bump oldest CI * build for oldest OS * remove carthage support * fix error codes on macOS
1 parent 519f222 commit f110307

File tree

72 files changed

+346
-3835
lines changed

Some content is hidden

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

72 files changed

+346
-3835
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99

1010
env:
1111
CI_XCODE_OLDEST: '/Applications/Xcode_13.3.1.app/Contents/Developer'
12-
CI_XCODE_13: '/Applications/Xcode_13.4.1.app/Contents/Developer'
1312
CI_XCODE_LATEST: '/Applications/Xcode_14.2.app/Contents/Developer'
1413

1514
concurrency:
@@ -25,7 +24,7 @@ jobs:
2524
- name: Use multiple cores
2625
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
2726
- name: Build-Test
28-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(iOS\) -destination platform\=iOS\ Simulator,name\=iPhone\ 14\ Pro\ Max -derivedDataPath DerivedData clean test | xcpretty
27+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift -destination platform\=iOS\ Simulator,name\=iPhone\ 14\ Pro\ Max -derivedDataPath DerivedData clean test | xcpretty
2928
env:
3029
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
3130
- name: Prepare codecov
@@ -59,7 +58,7 @@ jobs:
5958
- name: Use multiple cores
6059
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
6160
- name: Build-Test
62-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(macOS\) -destination platform\=macOS -derivedDataPath DerivedData clean test | xcpretty
61+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift -destination platform\=macOS -derivedDataPath DerivedData clean test | xcpretty
6362
env:
6463
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
6564
- name: Prepare codecov
@@ -87,7 +86,7 @@ jobs:
8786
- name: Use multiple cores
8887
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
8988
- name: Build-Test
90-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(tvOS\) -destination platform\=tvOS\ Simulator,name\=Apple\ TV -derivedDataPath DerivedData clean test | xcpretty
89+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift -destination platform\=tvOS\ Simulator,name\=Apple\ TV -derivedDataPath DerivedData clean test | xcpretty
9190
env:
9291
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
9392
- name: Prepare codecov
@@ -115,13 +114,7 @@ jobs:
115114
- name: Use multiple cores
116115
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
117116
- name: Build
118-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -target ParseSwift\ \(watchOS\) | xcpretty
119-
env:
120-
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
121-
- name: Upload coverage to Codecov
122-
uses: codecov/codecov-action@v3
123-
with:
124-
env_vars: WATCHOS
117+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -target ParseSwift | xcpretty
125118
env:
126119
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
127120

@@ -166,21 +159,7 @@ jobs:
166159
steps:
167160
- uses: actions/checkout@v3
168161
- name: Build-Test
169-
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift\ \(tvOS\) -destination platform\=tvOS\ Simulator,name\=Apple\ TV -derivedDataPath DerivedData clean test | xcpretty
170-
env:
171-
DEVELOPER_DIR: ${{ env.CI_XCODE_OLDEST }}
172-
- name: Prepare codecov
173-
uses: sersoft-gmbh/swift-coverage-action@v3
174-
id: coverage-files
175-
with:
176-
format: lcov
177-
search-paths: ./DerivedData
178-
- name: Upload coverage to Codecov
179-
uses: codecov/codecov-action@v3
180-
with:
181-
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
182-
env_vars: IOS_Earliest
183-
fail_ci_if_error: true
162+
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace Parse.xcworkspace -scheme ParseSwift -destination platform\=iOS\ Simulator,name\=iPhone\ 13\ Pro\ Max -derivedDataPath DerivedData build | xcpretty
184163
env:
185164
DEVELOPER_DIR: ${{ env.CI_XCODE_OLDEST }}
186165

@@ -252,15 +231,3 @@ jobs:
252231
env:
253232
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
254233

255-
carthage:
256-
timeout-minutes: 25
257-
needs: xcode-build-watchos
258-
runs-on: macos-latest
259-
steps:
260-
- uses: actions/checkout@v3
261-
- name: Use multiple cores
262-
run: defaults write com.apple.dt.XCBuild EnableSwiftBuildSystemIntegration 1
263-
- name: Carthage
264-
run: ./Scripts/carthage.sh build --no-skip-current --use-xcframeworks
265-
env:
266-
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.5.1...main), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/main/documentation/parseswift)
66
* _Contributing to this repo? Add info about your change here to be included in the next release_
77

8+
__Fixes__
9+
* Modernize Xcode project by using only one framework target. Also removes Carthage testing from CI ([#101](https://github.com/netreconlab/Parse-Swift/pull/101)), thanks to [Corey Baker](https://github.com/cbaker6).
10+
811
### 5.5.1
912
[Full Changelog](https://github.com/netreconlab/Parse-Swift/compare/5.5.0...5.5.1), [Documentation](https://swiftpackageindex.com/netreconlab/Parse-Swift/5.5.1/documentation/parseswift)
1013

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $ brew install swiftlint
7070

7171
### Swift Playgrounds
7272

73-
Any feature additions should work with a real Parse Server. You can experiment with features in the ParseSwift SDK by modifying the [ParseSwift Playground files](https://github.com/netreconlab/Parse-Swift/tree/main/ParseSwift.playground/Pages). It is recommended to make sure your ParseSwift workspace in Xcode is set to build for `ParseSwift (macOS)` framework when using Swift Playgrounds. To configure the playgounds, you can do one of the following:
73+
Any feature additions should work with a real Parse Server. You can experiment with features in the ParseSwift SDK by modifying the [ParseSwift Playground files](https://github.com/netreconlab/Parse-Swift/tree/main/ParseSwift.playground/Pages). It is recommended to make sure your ParseSwift workspace in Xcode is set to build for `ParseSwift` framework when using Swift Playgrounds. To configure the playgounds, you can do one of the following:
7474

7575
* Use the pre-configured parse-server in [this repo](https://github.com/netreconlab/parse-hipaa/tree/parse-swift) which comes with docker compose files (`docker-compose up` gives you a working server) configured to connect with the ParseSwift Playgrounds. The docker comes with [Parse Dashboard](https://github.com/parse-community/parse-dashboard) and can be used with MongoDB or PostgreSQL.
7676
* Configure the ParseSwift Playgrounds to work with your own Parse Server by editing the configuation in [Common.swift](https://github.com/netreconlab/Parse-Swift/blob/e9ba846c399257100b285d25d2bd055628b13b4b/ParseSwift.playground/Sources/Common.swift#L4-L19).

ParseSwift-macOS/Info.plist

Lines changed: 0 additions & 26 deletions
This file was deleted.

ParseSwift-tvOS/Info.plist

Lines changed: 0 additions & 22 deletions
This file was deleted.

ParseSwift-tvOS/ParseSwift_tvOS.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

ParseSwift-watchOS/Info.plist

Lines changed: 0 additions & 22 deletions
This file was deleted.

ParseSwift-watchOS/ParseSwift_watchOS.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

ParseSwift.playground/Pages/1 - Your first Object.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//: For this page, make sure your build target is set to ParseSwift (macOS) and targeting
1+
//: For this page, make sure your build target is set to ParseSwift and targeting
22
//: `My Mac` or whatever the name of your mac is. Also be sure your `Playground Settings`
33
//: in the `File Inspector` is `Platform = macOS`. This is because
44
//: Keychain in iOS Playgrounds behaves differently. Every page in Playgrounds should

ParseSwift.playground/Pages/10 - Cloud Code.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//: [Previous](@previous)
22

3-
//: For this page, make sure your build target is set to ParseSwift (macOS) and targeting
3+
//: For this page, make sure your build target is set to ParseSwift and targeting
44
//: `My Mac` or whatever the name of your mac is. Also be sure your `Playground Settings`
55
//: in the `File Inspector` is `Platform = macOS`. This is because
66
//: Keychain in iOS Playgrounds behaves differently. Every page in Playgrounds should

0 commit comments

Comments
 (0)