| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
React Native and Expo client for Exceptionless — real-time error and event reporting with native iOS crash capture.
Features:
npm install @exceptionless/react-native @react-native-async-storage/async-storageimport { Exceptionless } from "@exceptionless/react-native";
await Exceptionless.startup((c) => {
c.apiKey = "API_KEY_HERE";
});That's it. Unhandled errors, promise rejections, and native iOS crashes are now automatically reported.
npx expo install @exceptionless/react-native @react-native-async-storage/async-storageAdd the config plugin to app.json when using development or standalone builds:
{
"expo": {
"plugins": ["@exceptionless/react-native/expo-plugin"]
}
}Note: Native iOS crash reporting requires an Expo development build or standalone build. It does not work in Expo Go. For local development with native crash capture, install expo-dev-client and run npx expo run:ios. JS error reporting works everywhere, including Expo Go.
npm install @exceptionless/react-native @react-native-async-storage/async-storage
cd ios && pod installCocoaPods will automatically link PLCrashReporter for native crash reporting.
Call startup once when your app initializes:
import { Exceptionless } from "@exceptionless/react-native";
await Exceptionless.startup((c) => {
c.apiKey = "API_KEY_HERE";
// Optional: identify the user
c.setUserIdentity("user-123", "Jane Doe");
// Optional: enable managed sessions with heartbeats (every 60s)
c.useSessions(true, 60000, true);
// Optional: add default tags
c.defaultTags.push("react-native", "ios");
// Optional: add default data
c.defaultData["environment"] = "production";
});await Exceptionless.startup((c) => {
c.apiKey = "API_KEY_HERE";
c.serverUrl = "https://your-exceptionless-server.com";
});Wrap your component tree to catch and report React rendering errors:
import { Exceptionless, ExceptionlessErrorBoundary } from "@exceptionless/react-native";
function App() {
return (
<ExceptionlessErrorBoundary>
<YourApp />
</ExceptionlessErrorBoundary>
);
}You can provide a custom fallback UI:
<ExceptionlessErrorBoundary fallback={<Text>Something went wrong</Text>}>
<YourApp />
</ExceptionlessErrorBoundary>import { Exceptionless, toError } from "@exceptionless/react-native";
// Submit errors
try {
riskyOperation();
} catch (error) {
await Exceptionless.submitException(toError(error));
}
// Submit logs
await Exceptionless.submitLog("App started");
await Exceptionless.submitLog("app.startup", "User opened app", "info");
// Submit feature usage
await Exceptionless.submitFeatureUsage("DarkMode");
// Fluent builder API
await Exceptionless.createException(new Error("Checkout failed")).addTags("checkout", "critical").setProperty("orderId", "12345").markAsCritical(true).submit();The following is captured automatically with every event (when available):
| Data | Source | Platforms |
|---|---|---|
| OS name and version | Platform.OS, Platform.Version | All |
| Device brand and model | Platform.constants | Android |
| Locale | Intl.DateTimeFormat | All |
| React Native version | Platform.constants | All |
Monitor SDK internal logs for debugging (useful during development):
import { CallbackLog, ConsoleLog, Exceptionless } from "@exceptionless/react-native";
import type { LogEntry } from "@exceptionless/react-native";
const log = new CallbackLog(new ConsoleLog());
log.subscribe((entry: LogEntry) => {
console.log(`[${entry.level}] ${entry.message}`);
});
await Exceptionless.startup((c) => {
c.apiKey = "API_KEY_HERE";
c.services.log = log;
});On iOS, the package automatically installs a native crash reporter using PLCrashReporter. This captures crashes that JavaScript cannot detect:
Crash reports are saved to disk by PLCrashReporter and submitted automatically on the next app launch. No additional configuration is needed.
Note: Native crash reporting is only available on iOS. Android native crash support is planned for a future release. JS error reporting works on all platforms.
| Export | Description |
|---|---|
| Exceptionless | Pre-configured singleton client — use this for most cases |
| ExceptionlessErrorBoundary | React error boundary component |
| ReactNativeExceptionlessClient | Client class (for creating additional instances) |
| CallbackLog | Log decorator for monitoring SDK internals |
| AsyncStorageProvider | IStorage implementation using AsyncStorage |
| ReactNativeErrorPlugin | Parses React Native JavaScript stack traces |
| NativeCrashPlugin | Submits pending iOS native crash reports |
All exports from @exceptionless/core are also re-exported (event types, configuration, plugin interfaces, etc.).
If you need help, please contact us via in-app support, open an issue or join our chat on Discord. We're always here to help if you have any questions!
| Back | FazBrowse Home | New Git URL |