始めて
インストールステップとこのプラグインの完全なマークダウンガイドを含む設定用の質問をコピーする。
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.__CAPGO_KEEP_0__の手動セットアップを利用する場合は、以下のコマンドを実行してプラットフォーム固有の指示を参照してください:
bun add @capgo/capacitor-firebase-crashlyticsbunx cap syncインポート
「インポート」のセクションimport { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';APIの概要
「APIの概要」のセクションcrash
「クラッシュ」のセクションクラッシュを強制して実装をテストする。
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
ユーザーIDの設定fatalおよびnon-fatalレポートに関連付けられたユーザーIDを設定します。
AndroidおよびiOSのみ対応
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.setUserId({} as SetUserIdOptions);log
ログの設定クラッシュデータとともに送信されるカスタムログメッセージを追加して、クラッシュの前提となるイベントについてより多くの情報を得ることができます。
AndroidおよびiOSのみ対応
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.log({} as LogOptions);setEnabled
setEnabledのセクション自動データ収集を有効/無効にします。 アプリの次の実行時まで値は適用されません。
AndroidおよびiOSのみ
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.setEnabled({} as SetEnabledOptions);isEnabled
isEnabledのセクション自動データ収集が有効かどうかを返します。
iOSのみ
import { FirebaseCrashlytics } from '@capgo/capacitor-firebase-crashlytics';
await FirebaseCrashlytics.isEnabled();didCrashOnPreviousExecution
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
クラッシュオプションexport interface CrashOptions { /** * @since 0.1.0 */ message: string;}SetCustomKeyOptions
型式リファレンスexport type SetCustomKeyOptions = CustomKeyAndValue;SetUserIdOptions
ユーザーIDの設定オプションexport interface SetUserIdOptions { /** * @since 0.1.0 */ userId: string;}LogOptions
ログオプションexport interface LogOptions { /** * @since 0.1.0 */ message: string;}SetEnabledOptions
有効化オプションexport interface SetEnabledOptions { /** * @since 0.1.0 */ enabled: boolean;}IsEnabledResult
「IsEnabledResult」セクションexport interface IsEnabledResult { /** * @since 0.1.0 */ enabled: boolean;}DidCrashOnPreviousExecutionResult
「DidCrashOnPreviousExecutionResult」セクションexport interface DidCrashOnPreviousExecutionResult { /** * @since 0.1.0 */ crashed: boolean;}RecordExceptionOptions
「RecordExceptionOptions」セクション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
「GetPluginVersionResult」セクションexport interface GetPluginVersionResult { /** * The semantic version of this plugin. * * @since 8.0.2 */ version: string;}CustomKeyAndValue
「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 によって生成されたサブセットのエラーログ。
export interface StackFrame { lineNumber?: number; fileName?: string; functionName?: string;}真実の源
「真実の源」セクションこのページはプラグインの src/definitions.tsパブリック API がアップストリームで変更された場合に再度同步を実行してください。
「Getting Started」から続けてください
「Getting Started」から続けてくださいあなたが 「Getting Started」を使用してダッシュボードと __CAPGO_KEEP_0__ の操作を計画している場合、 「API Overview」 「API Overview」 APIの実装詳細についてはOverviewを参照してください。 Introduction __CAPGO_KEEP_0__のキーについてはIntroductionを参照してください。 API Keys API Keysの実装詳細についてはAPI Keysを参照してください。 Devices __CAPGO_KEEP_0__の実装詳細についてはDevicesを参照してください。 Bundles __CAPGO_KEEP_0__の実装詳細についてはBundlesを参照してください。