Skip to content

Commit

Permalink
Updates modules for Standard changes in Spezi 0.7.0 (StanfordSpezi#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuravi authored Jul 28, 2023
1 parent d6db887 commit 5828932
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,9 @@ deployment_target: # Availability checks or attributes shouldn’t be using olde
iOSApplicationExtension_deployment_target: 16.0
iOS_deployment_target: 16.0

attributes:
attributes_with_arguments_always_on_line_above: false

excluded: # paths to ignore during linting. Takes precedence over `included`.
- .build
- .swiftpm
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let package = Package(
.library(name: "SpeziAccount", targets: ["SpeziAccount"])
],
dependencies: [
.package(url: "https://github.com/StanfordSpezi/Spezi", .upToNextMinor(from: "0.5.0")),
.package(url: "https://github.com/StanfordSpezi/Spezi", .upToNextMinor(from: "0.7.0")),
.package(url: "https://github.com/StanfordSpezi/SpeziViews", .upToNextMinor(from: "0.3.0"))
],
targets: [
Expand Down
4 changes: 1 addition & 3 deletions Sources/SpeziAccount/Account.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import SwiftUI
/// The ``Account/Account`` type also enables interaction with the ``AccountService``s from anywhere in the view hierachy.
public actor Account: ObservableObject {
/// The ``Account/Account/signedIn`` determines if the the current Account context is signed in or not yet signed in.
@MainActor
@Published
public var signedIn = false
@MainActor @Published public var signedIn = false

/// An account provides a collection of ``AccountService``s that are used to populate login, sign up, or reset password screens.
nonisolated let accountServices: [any AccountService]
Expand Down
4 changes: 2 additions & 2 deletions Sources/SpeziAccount/SpeziAccount.docc/SpeziAccount.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The following example shows a Spezi component that creates a `User` class/actor
`ExampleUsernamePasswordAccountService` ``AccountService`` that can then modify the `User` instance based on the login or sign up procedure.
The `Component` injects the `Account` and `User` instances into the SwiftUI environment so they can be used by SwiftUI views:
```swift
final class ExampleAccountConfiguration<ComponentStandard: Standard>: Component, ObservableObjectProvider {
final class ExampleAccountConfiguration: Component, ObservableObjectProvider {
private let account: Account
private let user: User

Expand Down Expand Up @@ -59,7 +59,7 @@ and, e.g., the ``Login`` and ``SignUp`` views:
```swift
class TestAppDelegate: SpeziAppDelegate {
override var configuration: Configuration {
Configuration(standard: TestAppStandard()) {
Configuration {
ExampleAccountConfiguration()
// ...
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Spezi
import SpeziAccount


final class TestAccountConfiguration<ComponentStandard: Standard>: Component, ObservableObjectProvider {
final class TestAccountConfiguration: Component, ObservableObjectProvider {
private let account: Account
private let user: User

Expand Down
2 changes: 1 addition & 1 deletion Tests/UITests/TestApp/TestAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import Spezi

class TestAppDelegate: SpeziAppDelegate {
override var configuration: Configuration {
Configuration(standard: TestAppStandard()) {
Configuration {
TestAccountConfiguration(emptyAccountServices: FeatureFlags.emptyAccountServices)
}
}
Expand Down
28 changes: 0 additions & 28 deletions Tests/UITests/TestApp/TestAppStandard.swift

This file was deleted.

2 changes: 0 additions & 2 deletions Tests/UITests/UITests.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
2F027C9029D6C2CD00234098 /* AccountResetPasswordTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F027C8D29D6C2CC00234098 /* AccountResetPasswordTests.swift */; };
2F027C9129D6C2CD00234098 /* AccountSignUpTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F027C8E29D6C2CD00234098 /* AccountSignUpTests.swift */; };
2F027C9529D6C63100234098 /* TestAppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F027C9429D6C63100234098 /* TestAppDelegate.swift */; };
2F027C9829D6C6DB00234098 /* TestAppStandard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F027C9729D6C6DB00234098 /* TestAppStandard.swift */; };
2F027C9B29D6C91E00234098 /* XCTestExtensions in Frameworks */ = {isa = PBXBuildFile; productRef = 2F027C9A29D6C91E00234098 /* XCTestExtensions */; };
2F027C9D29D6CA1100234098 /* XCUIApplication+TestPrimaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F027C9C29D6CA1100234098 /* XCUIApplication+TestPrimaryButton.swift */; };
2F6D139A28F5F386007C25D6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2F6D139928F5F386007C25D6 /* Assets.xcassets */; };
Expand Down Expand Up @@ -262,7 +261,6 @@
A9EE7D2A2A3359E800C2B9A9 /* FeatureFlags.swift in Sources */,
2F027C9529D6C63100234098 /* TestAppDelegate.swift in Sources */,
2F027C8929D6C2AD00234098 /* User.swift in Sources */,
2F027C9829D6C6DB00234098 /* TestAppStandard.swift in Sources */,
2F027C8729D6C2AD00234098 /* TestAccountConfiguration.swift in Sources */,
2F027C8A29D6C2AD00234098 /* MockEmailPasswordAccountService.swift in Sources */,
);
Expand Down

0 comments on commit 5828932

Please sign in to comment.