4.0.0 • Published 1 year ago

@capacitor-community/appcenter-crashes v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Maintainers

MaintainerGitHubSocial
John Borgesjohnborges@johnborges

Features

  • Generate test crashes
  • Get more information about a previous crash
  • Customize how crashes are processed
  • Enable or disable App Center Crashes at runtime

Install

npm install @capacitor-community/appcenter-crashes
npx cap sync

API

isEnabled()

isEnabled() => Promise<{ value: boolean; }>

Check if Crashes is enabled or not.

Returns: Promise<{ value: boolean; }>

Since: 0.1.0


setEnabled(...)

setEnabled(options: { enable: boolean; }) => Promise<void>

You can enable and disable App Center Crashes at runtime. If you disable it, the SDK won't do any crash reporting for the app. The state is persisted in the device's storage across application launches.

ParamType
options{ enable: boolean; }

Since: 0.1.1


generateTestCrash()

generateTestCrash() => Promise<void>

Generate a test crash for easy testing of the SDK. This API can only be used in test/beta apps and won't do anything in production apps.

Since: 0.2.0


hasReceivedMemoryWarningInLastSession()

hasReceivedMemoryWarningInLastSession() => Promise<{ value: boolean; }>

Check if app recieved memory warning in the last session.

Returns: Promise<{ value: boolean; }>

Since: 0.2.0


hasCrashedInLastSession()

hasCrashedInLastSession() => Promise<{ value: boolean; }>

Check if the app has crashed in the last session.

Returns: Promise<{ value: boolean; }>

Since: 0.3.0


lastSessionCrashReport()

lastSessionCrashReport() => Promise<{ value: ErrorReport; }>

Provides details about the crash that occurred in the last app session.

Returns: Promise<{ value: ErrorReport; }>

Since: 0.3.0


trackError(...)

trackError(errorModel: TrackableErrorModel) => Promise<{ value: string; }>

Track error

ParamType
errorModelTrackableErrorModel

Returns: Promise<{ value: string; }>

Since: 0.6.0


Interfaces

ErrorReport

PropTypeDescriptionSince
idstringUUID for the crash report.
threadNamestringThread name that triggered the crash
appErrorTimestring | numberDate and time the error occurred.0.7.3
appStartTimestring | numberDate and time the app started.0.7.3
exceptionNamestringException name that triggered the crash.
exceptionReasonstringException reason.
deviceDeviceDevice information of the app when it crashed.
signalstringSignal that caused the crash.
appProcessIdentifiernumberIdentifier of the app process that crashed.
stackTracestringThe stack trace of the crash

Device

PropTypeDescription
sdkNamestringName of the SDK. Consists of the name of the SDK and the platform, e.g. "appcenter.ios", "appcenter.android"
sdkVersionstringVersion of the SDK in semver format, e.g. "1.2.0" or "0.12.3-alpha.1".
modelstringDevice model (example: iPad2,3).
oemNamestringDevice manufacturer (example: HTC).
osNamestringOS name (example: iOS).
osVersionstringOS version (example: 9.3.0).
osBuildstringOS build code (example: LMY47X).
osApiLevelnumberAPI level when applicable like in Android (example: 15).
localestringLanguage code (example: en_US).
timeZoneOffsetnumberThe offset in minutes from UTC for the device time zone, including daylight savings time.
screenSizestringScreen size of the device in pixels (example: 640x480).
appVersionstringApplication version name, e.g. 1.1.0
carrierNamestringCarrier name (for mobile devices).
carrierCountrystringCarrier country code (for mobile devices).
appBuildstringThe app's build number, e.g. 42.
appNamespacestringThe bundle identifier, package identifier, or namespace, depending on what the individual plattforms use, .e.g com.microsoft.example.

TrackableErrorModel

PropType
errorExceptionModelType
properties{ name: string: string; }
attachmentsErrorAttachmentLog[]

ExceptionModelType

PropTypeDescription
wrapperSdkNamestringName of the wrapper SDK. e.g 'appcenter.capacitor'
typestringException type, e.g 'TypeException'
messagestringException message
stackTracestringException stacktrace
4.0.0

1 year ago

3.0.1

2 years ago

3.0.0

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.7.2

3 years ago

0.7.1

3 years ago

0.7.3

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago