Pipe your React Native logs to Apple's
os_log— visible in Console.app on a real device, no debugger required.
Named after Argos Panoptes, the hundred-eyed giant of Greek mythology.
When you install a native build on a device (TestFlight, ad-hoc, etc.) and something goes wrong, console.log is silent — it never leaves the JS runtime. os_log writes to the system log, which you can read live in Console.app over USB, even without Xcode attached.
- iOS 14+
- React Native 0.71+ (new architecture)
npm install react-native-argos
cd ios && pod installCall once, early in your entry point. Every console.log/info/warn/error/debug call is forwarded to os_log while still reaching Metro/DevTools normally.
// index.ts
import { argos } from 'react-native-argos';
argos.watch();To stop watching and restore the original console:
argos.unwatch();import { argos } from 'react-native-argos';
argos.debug('Loading user');
argos.info('User loaded', { id: 42 });
argos.warning('Cache miss');
argos.error('Network failed', new Error('timeout'));
argos.fault('Unrecoverable state');By default, the subsystem is your app's bundle ID and the category is ReactNative. Override either:
argos.configure({
subsystem: 'com.mycompany.myapp', // defaults to Bundle.main.bundleIdentifier
category: 'Networking',
});Useful for filtering in Console.app by category:
const authLog = argos.withCategory('Auth');
const netLog = argos.withCategory('Networking');
authLog.info('Token refreshed');
netLog.error('Request failed', { url, status });- Connect your device via USB
- Open Console.app (Cmd+Space → "Console")
- Select your device in the sidebar
- Filter by Subsystem = your bundle ID, or Category =
ReactNative
That's it. Logs appear in real time, with level colors, on any build — debug, release, TestFlight.
| JS call | os_log level | Console.app color |
|---|---|---|
argos.debug / console.debug |
.debug |
grey |
argos.info / console.log |
.debug |
grey |
argos.info / console.info |
.info |
white |
argos.warning / console.warn |
.warning |
yellow |
argos.error / console.error |
.error |
red |
argos.fault |
.fault |
red (persisted) |
Note: By default,
os_logredacts dynamic string content in non-debug builds with<private>. Argos marks all messages as.publicso they're always readable in Console.app.
MIT