diff --git a/static/app/gettingStartedDocs/console/nintendo-switch.tsx b/static/app/gettingStartedDocs/console/nintendo-switch.tsx new file mode 100644 index 00000000000000..e784cd859c34d4 --- /dev/null +++ b/static/app/gettingStartedDocs/console/nintendo-switch.tsx @@ -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: ( + + ), + sentryNativeLink: ( + + ), + } + ), + }, + { + type: 'alert', + alertType: 'warning', + icon: , + text: tct( + '[strong:Access Restricted]. The Switch SDK is distributed through a private repository under NDA.', + { + strong: , + } + ), + showIcon: true, + trailingItems: ( + + ), + }, + { + 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: , + } + ), + }, + { + type: 'text', + text: t( + 'The SDK also supports sending additional runtime events, which requires:' + ), + }, + { + type: 'custom', + content: ( + + + {tct( + 'Providing a valid [strong:database path] via [code:sentry_options_set_database_path()]', + {code: , strong: } + )} + + + {tct( + 'Ensuring [strong:network access] is properly initialized and providing a thread-safe network request callback', + {code: , strong: } + )} + + + ), + }, + { + 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: ( + + ), + } + ), + }, + { + type: 'code', + language: 'c', + code: ` +#include + +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;