Skip to content

Commit 56349a0

Browse files
ref(apple): Common getting started config (#8480)
Add a joint getting started config for Apple to reduce duplicated content. Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent acf929c commit 56349a0

File tree

3 files changed

+71
-106
lines changed

3 files changed

+71
-106
lines changed

src/platform-includes/getting-started-config/apple.ios.mdx

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,4 @@ Additional options can be found <PlatformLink to="/configuration/options/">on ou
22

33
Here, you'll also be able to set context data, which includes data about the <PlatformLink to="/enriching-events/identify-user/">user</PlatformLink>, <PlatformLink to="/enriching-events/tags/">tags</PlatformLink>, or even <PlatformLink to="/enriching-events/context/">arbitrary data</PlatformLink>, all of which will be added to every event sent to Sentry.
44

5-
## Experimental Features
6-
7-
> Want to play with something new? Try out our experimental features for [View Hierarchy](/platforms/apple/guides/ios/enriching-events/viewhierarchy/), [Time to Full Display (TTFD)](/platforms/apple/guides/ios/performance/instrumentation/automatic-instrumentation/#time-to-full-display), [MetricKit](/platforms/apple/guides/watchos/configuration/metric-kit/), [Prewarmed App Start Tracing](/platforms/apple/performance/instrumentation/automatic-instrumentation/#prewarmed-app-start-tracing), and [Swift Async Stack Traces](/platforms/apple/guides/ios/#stitch-together-swift-concurrency-stack-traces). Experimental features are still a work-in-progress and may have bugs. We recognize the irony.
8-
>
9-
> Let us know if you have feedback through [GitHub issues](https://github.com/getsentry/sentry-cocoa/issues).
10-
11-
```swift {tabTitle:Swift}
12-
import Sentry
13-
14-
SentrySDK.start { options in
15-
// ...
16-
17-
// Enable all experimental features
18-
options.attachViewHierarchy = true
19-
options.enablePreWarmedAppStartTracing = true
20-
options.enableMetricKit = true
21-
options.enableTimeToFullDisplayTracing = true
22-
options.swiftAsyncStacktraces = true
23-
}
24-
```
25-
26-
```objc {tabTitle:Objective-C}
27-
@import Sentry;
28-
29-
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
30-
// ...
31-
32-
// Enable all experimental features
33-
options.attachViewHierarchy = YES;
34-
options.enablePreWarmedAppStartTracing = YES;
35-
options.enableMetricKit = YES;
36-
options.enableTimeToFullDisplayTracing = YES;
37-
}];
38-
```
39-
40-
## Use Sentry with SwiftUI
41-
42-
If you want to find out the performance of your Views in a SwiftUI project, [try the SentrySwiftUI library](/platforms/apple/performance/instrumentation/swiftui-instrumentation).
5+
<PlatformContent includePath="getting-started-config/basic-config" />

src/platform-includes/getting-started-config/apple.mdx

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -63,71 +63,4 @@ struct SwiftUIApp: App {
6363

6464
<!-- You can't write SwiftUI in Objective-C. Therefore no code sample. -->
6565

66-
## Experimental features
67-
68-
> Want to play with some new features? Try out our experimental features for [View Hierarchy](/platforms/apple/guides/ios/enriching-events/viewhierarchy/), [Time to Full Display (TTFD)](/platforms/apple/guides/ios/performance/instrumentation/automatic-instrumentation/#time-to-full-display), [MetricKit](/platforms/apple/guides/watchos/configuration/metric-kit/), [Prewarmed App Start Tracing](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#prewarmed-app-start-tracing), and [Swift Async Stack Traces](/platforms/apple/guides/ios/#stitch-together-swift-concurrency-stack-traces). Experimental features are still a work-in-progress and may have bugs. We recognize the irony.
69-
>
70-
> Let us know if you have feedback through [GitHub issues](https://github.com/getsentry/sentry-cocoa/issues).
71-
72-
```swift {tabTitle:Swift}
73-
import Sentry
74-
75-
SentrySDK.start { options in
76-
// ...
77-
78-
// Enable all experimental features
79-
options.attachViewHierarchy = true
80-
options.enablePreWarmedAppStartTracing = true
81-
options.enableMetricKit = true
82-
options.enableTimeToFullDisplayTracing = true
83-
options.swiftAsyncStacktraces = true
84-
}
85-
```
86-
87-
```objc {tabTitle:Objective-C}
88-
@import Sentry;
89-
90-
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
91-
// ...
92-
93-
// Enable all experimental features
94-
options.attachViewHierarchy = YES;
95-
options.enablePreWarmedAppStartTracing = YES;
96-
options.enableMetricKit = YES;
97-
options.enableTimeToFullDisplayTracing = YES;
98-
}];
99-
```
100-
101-
## Stitch Together Swift Concurrency Stack Traces
102-
103-
<Note>This feature is experimental and may have bugs.</Note>
104-
105-
If you use Swift concurrency, this feature will stitch your stack traces together. That means you will be able to see the full stack trace of your async code.
106-
For this to happen you need to enable the `swiftAsyncStacktraces` option.
107-
You can also enable this in your Objective-C project, however, only async code written in Swift will be stitched together.
108-
109-
```swift {tabTitle:Swift}
110-
import Sentry
111-
112-
SentrySDK.start { options in
113-
// ...
114-
options.swiftAsyncStacktraces = true
115-
}
116-
```
117-
118-
```objc {tabTitle:Objective-C}
119-
@import Sentry;
120-
121-
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
122-
// ...
123-
options.swiftAsyncStacktraces = YES;
124-
}];
125-
```
126-
127-
## Use Sentry with SwiftUI
128-
129-
If you want to find out the performance of your Views in a SwiftUI project, [try the SentrySwiftUI library](/platforms/apple/performance/instrumentation/swiftui-instrumentation).
130-
131-
## Provide Debug Information {#debug-symbols}
132-
133-
To capture crashes, you need to provide debug information to Sentry. You can also use our source context feature to display code snippets next to the event stack traces by enabling the `include-sources` option when uploading your debug information files. Debug information is provided by <PlatformLink to="/dsym">uploading dSYM files</PlatformLink>.
66+
<PlatformContent includePath="getting-started-config/basic-config" />
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
## Experimental features
2+
3+
> Want to play with some new features? Try out our experimental features for [View Hierarchy](/platforms/apple/guides/ios/enriching-events/viewhierarchy/), [Time to Full Display (TTFD)](/platforms/apple/guides/ios/performance/instrumentation/automatic-instrumentation/#time-to-full-display), [MetricKit](/platforms/apple/guides/watchos/configuration/metric-kit/), [Prewarmed App Start Tracing](https://docs.sentry.io/platforms/apple/performance/instrumentation/automatic-instrumentation/#prewarmed-app-start-tracing), and [Swift Async Stack Traces](/platforms/apple/guides/ios/#stitch-together-swift-concurrency-stack-traces). Experimental features are still a work-in-progress and may have bugs. We recognize the irony.
4+
>
5+
> Let us know if you have feedback through [GitHub issues](https://github.com/getsentry/sentry-cocoa/issues).
6+
7+
```swift {tabTitle:Swift}
8+
import Sentry
9+
10+
SentrySDK.start { options in
11+
// ...
12+
13+
// Enable all experimental features
14+
options.attachViewHierarchy = true
15+
options.enablePreWarmedAppStartTracing = true
16+
options.enableMetricKit = true
17+
options.enableTimeToFullDisplayTracing = true
18+
options.swiftAsyncStacktraces = true
19+
}
20+
```
21+
22+
```objc {tabTitle:Objective-C}
23+
@import Sentry;
24+
25+
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
26+
// ...
27+
28+
// Enable all experimental features
29+
options.attachViewHierarchy = YES;
30+
options.enablePreWarmedAppStartTracing = YES;
31+
options.enableMetricKit = YES;
32+
options.enableTimeToFullDisplayTracing = YES;
33+
options.swiftAsyncStacktraces = YES;
34+
}];
35+
```
36+
37+
## Stitch Together Swift Concurrency Stack Traces
38+
39+
<Note>This feature is experimental and may have bugs.</Note>
40+
41+
If you use Swift concurrency, this feature will stitch your stack traces together. That means you will be able to see the full stack trace of your async code.
42+
For this to happen you need to enable the `swiftAsyncStacktraces` option.
43+
You can also enable this in your Objective-C project, however, only async code written in Swift will be stitched together.
44+
45+
```swift {tabTitle:Swift}
46+
import Sentry
47+
48+
SentrySDK.start { options in
49+
// ...
50+
options.swiftAsyncStacktraces = true
51+
}
52+
```
53+
54+
```objc {tabTitle:Objective-C}
55+
@import Sentry;
56+
57+
[SentrySDK startWithConfigureOptions:^(SentryOptions *options) {
58+
// ...
59+
options.swiftAsyncStacktraces = YES;
60+
}];
61+
```
62+
63+
## Use Sentry with SwiftUI
64+
65+
If you want to find out the performance of your Views in a SwiftUI project, [try the SentrySwiftUI library](/platforms/apple/performance/instrumentation/swiftui-instrumentation).
66+
67+
## Provide Debug Information {#debug-symbols}
68+
69+
To capture crashes, you need to provide debug information to Sentry. You can also use our source context feature to display code snippets next to the event stack traces by enabling the `include-sources` option when uploading your debug information files. Debug information is provided by <PlatformLink to="/dsym">uploading dSYM files</PlatformLink>.

0 commit comments

Comments
 (0)