はじめから始める
このプラグインのインストール手順とフルマークダウンガイドをコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-firebase-crashlytics`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/firebase-crashlytics/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」のセクションCapgoのAI-Assisted Setupを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のコマンドを実行してください:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-firebase-crashlytics` plugin in my project.Manual Setup を使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の手順に従ってください:
bun add @capgo/capacitor-firebase-crashlyticsbunx cap syncImport
「Import」セクションimport { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';「API の概要」セクション
Section titled “API Overview”Copy to clipboard
AndroidおよびiOSのみで利用可能
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.crash({} as CrashOptions);setCustomKey
「setCustomKey」のセクションfatalおよびnon-fatalレポートに紐付けされるカスタムキーと値を設定します。
AndroidおよびiOSのみで利用可能
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.setCustomKey({} as SetCustomKeyOptions);setUserId
「setUserId」のセクションfatalおよびnon-fatalレポートに紐付けされるユーザーIDを設定します。
AndroidおよびiOSのみで利用可能
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.setUserId({} as SetUserIdOptions);log
「log」のセクションクラッシュデータとともに送信されるカスタムログメッセージを追加します。
AndroidおよびiOSのみで利用可能です。
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.log({} as LogOptions);setEnabled
Section titled “setEnabled”setEnabled
Only available for Android and iOS.
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.setEnabled({} as SetEnabledOptions);isEnabled
AndroidおよびiOSのみで利用可能です。クリップボードにコピー
Only available for iOS.
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.isEnabled();didCrashOnPreviousExecution
Section titled “didCrashOnPreviousExecution”自動データ収集が有効かどうかを返します。
AndroidおよびiOSのみで利用可能です。
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.didCrashOnPreviousExecution();sendUnsentReports
「sendUnsentReports」セクション起動時には、Crashlyticsに未送信のレポートをアップロードします。
自動データ収集が有効になっている場合、起動時にCrashlyticsがレポートを自動的にアップロードします。
AndroidおよびiOSのみで利用可能です。
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.sendUnsentReports();deleteUnsentReports
「deleteUnsentReports」セクションデバイス上の未送信レポートを削除します。
AndroidおよびiOSのみで利用可能です。
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.deleteUnsentReports();recordException
「recordException」セクションCrashlytics への非致死的なレポートを送信するために記録します。
Android と iOS のみで利用可能です。
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.recordException({} as RecordExceptionOptions);型参照
「型参照」のセクションCrashOptions
「CrashOptions」のセクションexport interface CrashOptions { /** * @since 0.1.0 */ message: string;}SetCustomKeyOptions
「SetCustomKeyOptions」のセクションexport type SetCustomKeyOptions = CustomKeyAndValue;SetUserIdOptions
「SetUserIdOptions」のセクションexport interface SetUserIdOptions { /** * @since 0.1.0 */ userId: string;}LogOptions
「LogOptions」のセクションexport interface LogOptions { /** * @since 0.1.0 */ message: string;}SetEnabledOptions
「有効化オプションの設定」を含むセクションexport interface SetEnabledOptions { /** * @since 0.1.0 */ enabled: boolean;}IsEnabledResult
「有効化結果」を含むセクションexport interface IsEnabledResult { /** * @since 0.1.0 */ enabled: boolean;}DidCrashOnPreviousExecutionResult
「前の実行でクラッシュした結果」を含むセクションexport interface DidCrashOnPreviousExecutionResult { /** * @since 0.1.0 */ crashed: boolean;}RecordExceptionOptions
「エクシPTIONのレコードオプション」を含むセクションexport interface RecordExceptionOptions { /** * The message to record as a non-fatal exception. * * @since 0.1.0 */ message: string; /** * Error code within a specific error domain. * * **Attention:** This option is ignored on iOS if `stacktrace` is provided. * * Only available for iOS. * * @since 0.1.0 */ code?: number; /** * A string containing the error domain. * * **Attention:** This option is ignored on iOS if `stacktrace` is provided. * * Only available for iOS. * * @since 0.1.0 */ domain?: string; /** * An array of keys and the values to associate with the non fatal exception, * in addition to the app level custom keys. * * **Attention:** This option is ignored on iOS if `stacktrace` is provided. * * @since 7.1.0 */ keysAndValues?: CustomKeyAndValue[]; /** * A stacktrace generated by stacktrace.js. * * @since 1.1.0 */ stacktrace?: StackFrame[];}GetPluginVersionResult
「プラグインバージョンを取得する結果」を含むセクションexport interface GetPluginVersionResult { /** * The semantic version of this plugin. * * @since 8.0.2 */ version: string;}CustomKeyAndValue
「カスタムキーと値」を含むセクションexport interface CustomKeyAndValue { /** * @since 7.1.0 */ key: string; /** * @since 7.1.0 */ value: string | number | boolean; /** * @since 7.1.0 */ type: 'string' | 'long' | 'double' | 'boolean' | 'int' | 'float';}StackFrame
「StackFrame」のセクションstacktrace.jsによって生成されたStacktraceのサブセット。
export interface StackFrame { lineNumber?: number; fileName?: string; functionName?: string;}真実の源
「真実の源」のセクションこのページはプラグインの src/definitions.tsパブリックAPIがアップストリームで変更されたときに再度Syncを実行してください。
Getting Startedから続けてください
「Getting Startedから続けてください」のセクションCapacitorを使用している場合 Getting Started Capgoの計画ダッシュボードとAPIの運用に接続する APIの概要 APIの実装詳細についてはAPIの概要を参照してください 導入 __CAPGO_KEEP_0__の実装詳細については導入を参照してください APIのキー APIのキーに関する実装詳細についてはAPIのキーを参照してください デバイス デバイスに関する実装詳細についてはデバイスを参照してください バンドル バンドルに関する実装詳細についてはバンドルを参照してください