Skip to content

Commit 843fb31

Browse files
authored
Merge pull request #6645 from segmentio/acharles/signals-swiftui-note
Add Signals SwiftUI info
2 parents b37467a + 05ce54b commit 843fb31

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/connections/auto-instrumentation/setup.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,21 @@ Follow these steps to integrate the Signals SDK into your Swift application:
6262

6363
Verify that you replaced `<WRITE_KEY>` with the actual write key you copied in Step 1.
6464

65+
#### SwiftUI projects
66+
67+
If your app is written in SwiftUI, you'll need to add a `TypeAlias.swift` file to your project that captures interaction and navigation Signals, like in this example:
68+
69+
```swift
70+
import Foundation
71+
import Signals
72+
73+
typealias Button = SignalButton
74+
typealias NavigationStack = SignalNavigationStack
75+
typealias NavigationLink = SignalNavigationLink
76+
typealias TextField = SignalTextField
77+
typealias SecureField = SignalSecureField
78+
```
79+
6580
### Kotlin
6681
6782
Follow these steps to integrate the Signals SDK into your Kotlin application:
@@ -136,4 +151,4 @@ Redeployment ensures that the new rules are active and that your application can
136151
137152
## Next steps
138153
139-
This guide walked you through initial Signals SDK/Auto-Instrumentation setup. Next, read the [Auto-Instrumentation Signals Implementation Guide](/docs/connections/auto-instrumentation/configuration/), which dives deeper into Signals and offers examples rules.
154+
This guide walked you through initial Signals SDK/Auto-Instrumentation setup. Next, read the [Auto-Instrumentation Signals Implementation Guide](/docs/connections/auto-instrumentation/configuration/), which dives deeper into Signals and offers examples rules.

src/connections/sources/catalog/libraries/mobile/apple/live-plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Next, you'll authenticate with Segment to give the CLI access to your workspace:
100100
7. Use your source ID and live plugin file name to upload your live plugin:
101101
102102
```shell
103-
$ segmentcli upload <SourceID> <FileName>
103+
$ segmentcli liveplugins upload <SourceID> <FileName>
104104
```
105105
106106
You've now successfully attached your live plugin(s) to your mobile source. The next time your users launch your app, their Segment SDK will download the latest live plugins, which will run every time new events are generated.

0 commit comments

Comments
 (0)