Skip to content

Commit

Permalink
Docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Oct 14, 2024
1 parent 6aa8e4d commit dd59b84
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Sources/Spezi/Spezi.docc/Interactions with Application.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SPDX-License-Identifier: MIT

Spezi provides platform-agnostic mechanisms to interact with your application instance.
To access application properties or actions you can use the ``Module/Application`` property wrapper within your
``Module``, ``Standard`` or SwiftUI `View`.
``Module`` or ``Standard``.

> Tip: The <doc:Notifications> articles illustrates how you can easily manage user notifications within your Spezi application.
Expand Down
42 changes: 42 additions & 0 deletions Sources/Spezi/Spezi.docc/Module/Interactions with Application.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Interactions with Application

Interact with the Application.

<!--
This source file is part of the Stanford Spezi open-source project
SPDX-FileCopyrightText: 2024 Stanford University and the project authors (see CONTRIBUTORS.md)
SPDX-License-Identifier: MIT
-->

## Overview

Spezi provides platform-agnostic mechanisms to interact with your application instance.
To access application properties or actions you can use the ``Module/Application`` property wrapper within your
``Module`` or ``Standard``.

> Tip: The <doc:Notifications> articles illustrates how you can easily manage user notifications within your Spezi application.
## Topics

### Application Interaction

- ``Module/Application``

### Properties

- ``Spezi/logger``
- ``Spezi/launchOptions``

### Notifications

- ``Spezi/registerRemoteNotifications``
- ``Spezi/unregisterRemoteNotifications``

### Platform-agnostic type-aliases

- ``ApplicationDelegateAdaptor``
- ``BackgroundFetchResult``
1 change: 1 addition & 0 deletions Sources/Spezi/Spezi.docc/Module/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class ExampleModule: Module {

### Capabilities
- <doc:Interactions-with-SwiftUI>
- <doc:Interactions-with-Application>
- <doc:Module-Dependency>
- <doc:Module-Communication>
- <doc:Notifications>
13 changes: 6 additions & 7 deletions Sources/Spezi/Spezi.docc/Module/Notifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPDX-License-Identifier: MIT

## Overview

Spezi provides platform-agnostic mechanisms to manage and respond to User Notifications within your ``Module``, ``Standard`` or SwiftUI `View`.
Spezi provides platform-agnostic mechanisms to manage and respond to User Notifications within your ``Module`` or ``Standard``.

### Handling Notifications

Expand All @@ -29,8 +29,6 @@ respectively for more details.
To register for remote notifications, you can use the ``Module/Application`` property and the corresponding ``Spezi/registerRemoteNotifications`` action.
Below is a short code example on how to use this action.

- Note: You can also use the `@Application` property wrapper in your SwiftUI `View` directly.

```swift
class ExampleModule: Module {
@Application(\.registerRemoteNotifications)
Expand Down Expand Up @@ -59,12 +57,13 @@ implement the ``NotificationHandler/receiveRemoteNotification(_:)`` method.

## Topics

### Remote Notification Registration
### Notifications

- ``Spezi/registerRemoteNotifications``
- ``Spezi/unregisterRemoteNotifications``
- ``NotificationHandler``

### Apple Push Notification Service

- ``NotificationHandler``
- ``NotificationTokenHandler``
- ``Spezi/registerRemoteNotifications``
- ``Spezi/unregisterRemoteNotifications``

1 change: 0 additions & 1 deletion Sources/Spezi/Spezi.docc/Spezi.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ You can learn more about modules in the <doc:Module> documentation.
- ``Spezi/Spezi``
- ``Standard``
- ``Module``
- <doc:Interactions-with-Application>

### Previews

Expand Down
2 changes: 0 additions & 2 deletions Tests/UITests/TestApp/TestApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import Spezi
import SwiftUI
import XCTestApp

// TODO: test @Application somewhere! (maybe just use @Environment???)


@main
struct UITestsApp: App {
Expand Down

0 comments on commit dd59b84

Please sign in to comment.