Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more flexible Account Service interactions #39

Merged
merged 27 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1dcddf9
First draft to upgrade to SpeziAccount 2.0
Supereg Jul 24, 2024
6c3a0f8
Reorder files
Supereg Jul 24, 2024
6f4a9a9
Tests compile
Supereg Jul 24, 2024
e907b70
Minor bump
Supereg Jul 24, 2024
c2c2908
Rewrite firestore account storage to new model
Supereg Jul 25, 2024
fc01d44
Minor changes
Supereg Jul 30, 2024
55c9a32
Update to latest version and make tests work
Supereg Aug 2, 2024
982d664
Merge branch 'main' into feature/spezi-account-2.0
Supereg Aug 2, 2024
78c7ae9
Update build command
Supereg Aug 2, 2024
09dd098
Update to latest SpeziAccount commit, supply user details within conf…
Supereg Aug 8, 2024
54526a1
Some concurrency fixes in the UITests
Supereg Aug 9, 2024
dbc6ce8
Complete documentation and todos
Supereg Aug 9, 2024
37fd7ad
Fix some issues
Supereg Aug 9, 2024
0d1d881
Minor fixes in tests
Supereg Aug 9, 2024
3dc47ec
Upgrade Firebase SDK and inherit isolation for setData methods
Supereg Aug 12, 2024
c834daf
Upgrade dependencies
Supereg Aug 13, 2024
9d50c68
Try with continatuions again for sendability
Supereg Aug 14, 2024
a19e42b
Minor adjustments
Supereg Aug 15, 2024
1505ea9
Make firebase data functions more safe
Supereg Aug 16, 2024
ddfe2bc
Restore projectid
Supereg Aug 16, 2024
e96ca97
Can we rerun?
Supereg Aug 16, 2024
0dd0cf8
Require latest beta
Supereg Aug 16, 2024
4195dd6
Rerun so Codecov might be able to report coverage this time?
Supereg Aug 16, 2024
d2fa896
Use new test extensions
Supereg Aug 19, 2024
8920a35
Fix compatibility
Supereg Aug 19, 2024
1ae1854
Versions
Supereg Aug 19, 2024
ce64630
Use latest beta to fix test focus issues
Supereg Aug 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
setupfirebaseemulator: true
path: Tests/UITests
customcommand: |
firebase emulators:exec 'set -o pipefail && xcodebuild test -project UITests.xcodeproj -scheme TestApp -destination "platform=iOS Simulator,name=iPhone 15 Pro" -resultBundlePath UITests.xcresult -derivedDataPath ".derivedData" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | xcbeautify'
firebase emulators:exec 'set -o pipefail && xcodebuild test -project UITests.xcodeproj -scheme TestApp -destination "platform=iOS Simulator,name=iPhone 15 Pro" -resultBundlePath UITests.xcresult -derivedDataPath ".derivedData" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -skipPackagePluginValidation -skipMacroValidation | xcbeautify'
uploadcoveragereport:
name: Upload Coverage Report
needs: [buildandtest, buildandtestuitests]
Expand Down
80 changes: 65 additions & 15 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@
// SPDX-License-Identifier: MIT
//

import class Foundation.ProcessInfo
import PackageDescription


#if swift(<6)
let swiftConcurrency: SwiftSetting = .enableExperimentalFeature("StrictConcurrency")
#else
let swiftConcurrency: SwiftSetting = .enableUpcomingFeature("StrictConcurrency")
#endif


let package = Package(
name: "SpeziFirebase",
defaultLocalization: "en",
Expand All @@ -25,48 +33,64 @@ let package = Package(
.library(name: "SpeziFirebaseAccountStorage", targets: ["SpeziFirebaseAccountStorage"])
],
dependencies: [
.package(url: "https://github.com/StanfordSpezi/Spezi", from: "1.0.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziViews.git", from: "1.0.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziStorage", from: "1.0.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziAccount", from: "1.2.2"),
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: "10.13.0")
],
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "2.0.0-beta.1"),
.package(url: "https://github.com/StanfordSpezi/Spezi", from: "1.7.1"),
.package(url: "https://github.com/StanfordSpezi/SpeziViews", from: "1.6.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziAccount", from: "2.0.0-beta.2"),
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: "11.0.0"),
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.2.0")
] + swiftLintPackage(),
targets: [
.target(
name: "SpeziFirebaseAccount",
dependencies: [
.target(name: "SpeziFirebaseConfiguration"),
.product(name: "SpeziFoundation", package: "SpeziFoundation"),
.product(name: "Spezi", package: "Spezi"),
.product(name: "SpeziValidation", package: "SpeziViews"),
.product(name: "SpeziAccount", package: "SpeziAccount"),
.product(name: "SpeziLocalStorage", package: "SpeziStorage"),
.product(name: "SpeziSecureStorage", package: "SpeziStorage"),
.product(name: "FirebaseAuth", package: "firebase-ios-sdk")
]
],
swiftSettings: [
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
),
.target(
name: "SpeziFirebaseConfiguration",
dependencies: [
.product(name: "Spezi", package: "Spezi"),
.product(name: "FirebaseFirestore", package: "firebase-ios-sdk")
]
],
swiftSettings: [
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
),
.target(
name: "SpeziFirestore",
dependencies: [
.target(name: "SpeziFirebaseConfiguration"),
.product(name: "Spezi", package: "Spezi"),
.product(name: "FirebaseFirestore", package: "firebase-ios-sdk"),
.product(name: "FirebaseFirestoreSwift", package: "firebase-ios-sdk")
]
.product(name: "Atomics", package: "swift-atomics")
],
swiftSettings: [
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
),
.target(
name: "SpeziFirebaseStorage",
dependencies: [
.target(name: "SpeziFirebaseConfiguration"),
.product(name: "Spezi", package: "Spezi"),
.product(name: "FirebaseStorage", package: "firebase-ios-sdk")
]
],
swiftSettings: [
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
),
.target(
name: "SpeziFirebaseAccountStorage",
Expand All @@ -75,15 +99,41 @@ let package = Package(
.product(name: "Spezi", package: "Spezi"),
.product(name: "SpeziAccount", package: "SpeziAccount"),
.target(name: "SpeziFirestore")
]
],
swiftSettings: [
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
),
.testTarget(
name: "SpeziFirebaseTests",
dependencies: [
.target(name: "SpeziFirebaseAccount"),
.target(name: "SpeziFirebaseConfiguration"),
.target(name: "SpeziFirestore")
]
],
swiftSettings: [
swiftConcurrency
],
plugins: [] + swiftLintPlugin()
)
]
)


func swiftLintPlugin() -> [Target.PluginUsage] {
// Fully quit Xcode and open again with `open --env SPEZI_DEVELOPMENT_SWIFTLINT /Applications/Xcode.app`
if ProcessInfo.processInfo.environment["SPEZI_DEVELOPMENT_SWIFTLINT"] != nil {
[.plugin(name: "SwiftLintBuildToolPlugin", package: "SwiftLint")]
} else {
[]
}
}

func swiftLintPackage() -> [PackageDescription.Package.Dependency] {
if ProcessInfo.processInfo.environment["SPEZI_DEVELOPMENT_SWIFTLINT"] != nil {
[.package(url: "https://github.com/realm/SwiftLint.git", from: "0.55.1")]
} else {
[]
}
}

This file was deleted.

Loading
Loading