-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat: Add Nintendo Switch getting started doc #96415
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
Merged
priscilawebdev
merged 9 commits into
master
from
priscila/feat/getting-started-docs/add-nintendo-switch-doc
Jul 28, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
e308ac1
feat: Add PlayStation getting started doc
priscilawebdev c9c6745
feat: Add getting started doc for Nintendo Switch
priscilawebdev 5b80770
This is an empty commit
priscilawebdev 8424d35
remove other configs
priscilawebdev f9b78e4
improve copy
priscilawebdev 519b2be
remove code
priscilawebdev b80df8c
remove modal for now
priscilawebdev f44eeb7
revert playstation
priscilawebdev d936fc1
fix errors
priscilawebdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
161 changes: 161 additions & 0 deletions
161
static/app/gettingStartedDocs/console/nintendo-switch.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,161 @@ | ||
| import {Button} from 'sentry/components/core/button'; | ||
| import {ExternalLink} from 'sentry/components/core/link'; | ||
| import List from 'sentry/components/list'; | ||
| import ListItem from 'sentry/components/list/listItem'; | ||
| import { | ||
| type Docs, | ||
| type OnboardingConfig, | ||
| StepType, | ||
| } from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
| import {IconLock} from 'sentry/icons/iconLock'; | ||
| import {t, tct} from 'sentry/locale'; | ||
|
|
||
| const onboarding: OnboardingConfig = { | ||
| install: () => [ | ||
| { | ||
| type: StepType.INSTALL, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'Our [sentrySwitchLink:Sentry Switch SDK] extends the core [sentryNativeLink:sentry-native] library with Nintendo Switch-specific implementations and is designed to work across standalone engines and proprietary game engines.', | ||
| { | ||
| sentrySwitchLink: ( | ||
| <ExternalLink href="https://github.com/getsentry/sentry-switch" /> | ||
| ), | ||
| sentryNativeLink: ( | ||
| <ExternalLink href="https://github.com/getsentry/sentry-native" /> | ||
| ), | ||
| } | ||
| ), | ||
| }, | ||
| { | ||
| type: 'alert', | ||
| alertType: 'warning', | ||
| icon: <IconLock size="sm" locked />, | ||
| text: tct( | ||
| '[strong:Access Restricted]. The Switch SDK is distributed through a private repository under NDA.', | ||
| { | ||
| strong: <strong />, | ||
| } | ||
| ), | ||
| showIcon: true, | ||
| trailingItems: ( | ||
| <Button size="sm" priority="primary"> | ||
| {t('Request Access')} | ||
| </Button> | ||
| ), | ||
| }, | ||
| { | ||
| type: 'text', | ||
| text: t( | ||
| 'Once the access is granted, you can proceed with the SDK integration.' | ||
| ), | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| configure: params => [ | ||
| { | ||
| type: StepType.CONFIGURE, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'After building the SDK, you can integrate it as a static library into your game. The SDK handles crash reporting automatically, with crash context forwarded to Sentry via CRPortal.', | ||
| { | ||
| code: <code />, | ||
| } | ||
| ), | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| }, | ||
| { | ||
| type: 'text', | ||
| text: t( | ||
| 'The SDK also supports sending additional runtime events, which requires:' | ||
| ), | ||
| }, | ||
| { | ||
| type: 'custom', | ||
| content: ( | ||
| <List symbol="bullet"> | ||
| <ListItem> | ||
| {tct( | ||
| 'Providing a valid [strong:database path] via [code:sentry_options_set_database_path()]', | ||
| {code: <code />, strong: <strong />} | ||
| )} | ||
| </ListItem> | ||
| <ListItem> | ||
| {tct( | ||
| 'Ensuring [strong:network access] is properly initialized and providing a thread-safe network request callback', | ||
| {code: <code />, strong: <strong />} | ||
| )} | ||
| </ListItem> | ||
| </List> | ||
| ), | ||
| }, | ||
| { | ||
| type: 'text', | ||
| text: tct( | ||
| 'The [privateRepositoryLink:private repository] contains complete setup instructions and configuration examples in the sample folder. Here is a basic example of how to initialize the SDK:', | ||
| { | ||
| privateRepositoryLink: ( | ||
| <ExternalLink href="https://github.com/getsentry/sentry-switch" /> | ||
| ), | ||
| } | ||
| ), | ||
| }, | ||
| { | ||
| type: 'code', | ||
| language: 'c', | ||
| code: ` | ||
| #include <sentry.h> | ||
|
|
||
| int main(void) { | ||
| sentry_options_t *options = sentry_options_new(); | ||
| sentry_options_set_dsn(options, "${params.dsn.public}"); | ||
| // Example of Nintendo Switch-specific configuration options | ||
| // (including database path) are available in | ||
| // the sample folder of the private repository | ||
| sentry_init(options); | ||
| } | ||
| `, | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| verify: () => [ | ||
| { | ||
| type: StepType.VERIFY, | ||
| content: [ | ||
| { | ||
| type: 'text', | ||
| text: t( | ||
| 'Once integrated, verify that your Sentry integration is working correctly by sending a test event:' | ||
| ), | ||
| }, | ||
| { | ||
| type: 'code', | ||
| language: 'c', | ||
| code: ` | ||
| sentry_capture_event(sentry_value_new_message_event( | ||
| /* level */ SENTRY_LEVEL_INFO, | ||
| /* logger */ "custom", | ||
| /* message */ "It works!" | ||
| ));`, | ||
| }, | ||
| { | ||
| type: 'text', | ||
| text: t( | ||
| 'After sending this test event, you should see it appear in your Sentry dashboard, confirming that the Nintendo Switch integration is working correctly.' | ||
| ), | ||
| }, | ||
| ], | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| const docs: Docs = { | ||
| onboarding, | ||
| }; | ||
|
|
||
| export default docs; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: SDK Access Button Fails to Trigger Action
The "Request Access" button for the Nintendo Switch SDK is non-functional as it lacks an
onClickhandler orhrefattribute, preventing users from initiating the access request process for the private repository.Locations (1)
static/app/gettingStartedDocs/console/nintendo-switch.tsx#L43-L46