Objective-C error tracking
Know when your Objective-C app breaks, before your users do
ForgeOps connects the errors your Objective-C app reports to the deploys, traces, and changes around them, so when production breaks, the incident already says who's affected, what changed, and where to look.
Captures an uncaught NSException or fatal signal automatically, then uploads the crash report on next launch. Running on ForgeOps' own dedicated infrastructure, so nothing about a Objective-C app's errors or its users' data gets routed through a third-party error-tracking vendor. See an incident investigated →
Install
// Not packaged for CocoaPods/SPM: clone github.com/Luke-Popwell/forge-ops-tracker-objc (tag v0.6.0) and add its Sources/ForgeOpsTracker/ to your Xcode project
#import <ForgeOpsTracker/ForgeOpsTracker.h>
[ForgeOpsTracker configureWithBlock:^(FOTConfiguration *config) {
config.dsn = @"https://<api_key>@getforgeops.net/api/v1/events";
}];
[ForgeOpsTracker installHandlers];
Uploads happen on the next app launch, not live during the crash itself, the same model every real mobile crash reporter uses.
Every client reports the same shape
Wherever it comes from, an event arrives with an exception class, a message, and a backtrace, plus whatever environment/release/server context that client can gather on its own. ForgeOps fingerprints and groups on the first three, so a Objective-C app's issues list works exactly the same way every other language's does: report the same bug a thousand times and it's still one row, not a thousand.
No agent, no sidecar: it's a plain HTTPS POST to ForgeOps' own ingestion API, so nothing about a Objective-C app's traffic gets routed through a third-party pipeline first.
Works with your framework
The Objective-C client hooks in at the framework level, not by wrapping individual calls, so nothing about how you already write Objective-C code has to change.
Uncaught NSException
Installed via NSSetUncaughtExceptionHandler, chained onto any previously-installed handler rather than replacing it.
Fatal signals
SIGABRT, SIGSEGV, and the rest are caught via sigaction, writing a raw backtrace to disk before re-raising so the OS's own crash behavior still happens.
Caught exceptions
captureException:context: reports anything your own @catch block already handles, uploaded immediately rather than waiting for the next launch.
What it looks like
The issue list
Every Objective-C issue reported into a project shows up here: title, status, assignee, event count, and when it was last seen, the same columns as any other language's project.
The issue detail
Every occurrence keeps its own timestamp, environment, release, and server, plus the backtrace exactly as Objective-C reported it, expandable per occurrence rather than flattened into one generic stack.
Alerting
A new Objective-C issue, a regression, or a spike past a threshold you set can reach Slack, Microsoft Teams, email, PagerDuty, Opsgenie, or a generic webhook, configured per project, per trigger.
Heartbeats
For the failure mode error tracking can't see on its own: a Objective-C cron job or recurring task that's supposed to run but silently stopped. Each heartbeat gets its own ping URL and its own grace period before it alerts.
Performance monitoring
Times whatever you wrap and reports one small aggregate per transaction, flushed on FOTConfiguration.performanceFlushInterval, never one network call per timed call. This client has no web framework integration, so nothing is timed automatically: you choose what to wrap. Keep transaction names low-cardinality (@"GET /users/:id", not @"GET /users/42"), since every distinct name is its own row. measureTransaction records even if the block raises, and is safe to call from any thread. Turn it off with trackPerformance = NO. An iOS app is suspended shortly after it goes to the background and nothing is flushed at exit, so call [ForgeOpsTracker flushPerformance] yourself from applicationDidEnterBackground: or sceneDidEnterBackground:, or before a command-line tool quits. Each report also carries a small latency histogram, so ForgeOps shows an approximate p50/p95/p99 per transaction, not just an average, accurate to the width of the latency bucket a duration falls into. Requires a plan that includes performance monitoring; on a plan that doesn't, the periodic reports are accepted but not recorded (the response says why), so a working setup never looks broken.
// Wrap a block; recorded even if it raises an NSException (which propagates unchanged):
[ForgeOpsTracker measureTransaction:@"GET /users/:id" block:^{
[self handleRequest:request];
}];
// Or record a duration you measured yourself, in milliseconds:
[ForgeOpsTracker recordPerformance:@"nightly-export" durationMs:elapsedMs];
Distributed tracing
One flow's own call tree, such as a screen load, a sign-in, or a network round trip and what it triggered. A mobile flow hops between queues, so a trace is an explicit object you pass around or capture in a block, safe to use from any thread. Only a slow flow's trace is ever sent: whether it crossed the threshold (one second by default, configurable) is decided entirely inside your app, so a fast flow costs nothing over the wire. Requires a plan that includes distributed tracing.
[ForgeOpsTracker traceNamed:@"load home screen" block:^(FOTTrace *trace) {
[trace measureSpan:@"fetch feed" kind:@"http" block:^{ [self fetchFeed]; }];
[trace measureSpan:@"decode" kind:@"service" data:@{ @"items": @42 } block:^{ [self decode]; }];
}];
// Or hold the trace across queues and finish it when the flow ends:
FOTTrace *trace = [ForgeOpsTracker startTrace:@"checkout"];
dispatch_async(queue, ^{ [trace recordSpan:@"charge" kind:@"http" startedAt:started durationMs:ms data:nil]; });
[trace finish];
Send a request through the trace with dataTaskWithSession:request:trace: (or start a FOTRequestSpan for any other transport) and it goes out with the standard traceparent header, recorded as its own http span, so your backend's request nests under it. Report a failure with that trace and the error carries its trace id: with your backend on the current ForgeOps server SDK and the two projects linked in ForgeOps, the failed checkout shows the API error from the very same request. Limit which hosts get the header with tracePropagationTargets. Needs tag v0.4.0.
FOTTrace *trace = [ForgeOpsTracker startTrace:@"checkout"];
[[ForgeOpsTracker dataTaskWithSession:NSURLSession.sharedSession request:request trace:trace
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (((NSHTTPURLResponse *)response).statusCode != 201) {
NSException *failure = [NSException exceptionWithName:@"CheckoutRejected" reason:@"order was not created" userInfo:nil];
[ForgeOpsTracker captureException:failure context:@{ @"orderId": orderId } user:nil trace:trace];
}
[trace finish];
}] resume];
SQL in a request
When an error is captured inside a trace that ran database queries, its issue opens with the slowest of them: how long it took, its share of the trace's time, how many queries ran, and a likely N+1 warning when the same statement ran five or more times. Pass a query's SQL to measureSpan:kind:data:statement:dbSystem:block: on a database span (a query against the app's own SQLite database, say). The statement is masked before it leaves your device, every string and number replaced with a question mark, and the same SQL shows under that span's bar in the trace's waterfall. Needs tag v0.6.0, on a plan that includes distributed tracing.
NSString *sql = @"SELECT * FROM messages WHERE thread_id = 42 AND read = 0";
[ForgeOpsTracker traceNamed:@"load inbox" block:^(FOTTrace *trace) {
[trace measureSpan:@"Load messages" kind:@"database" data:nil statement:sql dbSystem:@"sqlite" block:^{
self.messages = [self.database rowsForQuery:sql];
}];
}];
// Sent as "SELECT * FROM messages WHERE thread_id = ? AND read = ?"
What changed
When a feature flag flips or a remote config value changes, record it from your flag client's callback, and it shows under What changed on any issue that starts in the next two hours, and on the project's Changes page beside your releases, labeled potentially relevant, never as the cause. "Crashes started right after new_checkout turned on" becomes one glance. recordChange: returns immediately and sends on a private serial queue, off the main thread, and never raises. An app has no deploy of its own to compare, so every change is one you record. Needs tag v0.5.0, on a plan that includes change tracking.
#import <ForgeOpsTracker/ForgeOpsTracker.h>
// Your flag client's change listener, with the key and the old and new values
[flagClient onFlagChanged:^(NSString *key, BOOL oldValue, BOOL newValue) {
[ForgeOpsTracker recordChange:FOTChangeKindFeatureFlag
title:[NSString stringWithFormat:@"%@ turned %@", key, newValue ? @"on" : @"off"]
details:@{ @"key": key, @"from": @(oldValue), @"to": @(newValue) }];
}];
Custom metrics and infrastructure monitoring
Track a business event you name yourself (a signup, a payment) or a reading from one of your own hosts, with one explicit call each; nothing is automatic. The value defaults to 1, so a bare call is a counter; pass a real amount for anything else (it can be negative, for a refund). A captured value is stored as its own row, so counts and sums you compute later are exact. Calls are buffered and flushed as one batch in the background, so they are safe to make inside a request, and flushMetrics sends whatever is buffered right now. An infrastructure reading needs a hostname, and this client has no server name by default, so pass one or set the server name; a reading with none is dropped. Requires a plan that includes custom metrics and infrastructure monitoring.
[ForgeOpsTracker captureMetric:@"signup"]; // value defaults to 1: a bare counter [ForgeOpsTracker captureMetric:@"payment" value:49]; // a real magnitude; it may be negative (a refund) [ForgeOpsTracker captureInfrastructureMetric:@"cpu" value:0.42 hostname:nil]; // nil defaults to serverName [ForgeOpsTracker captureInfrastructureMetric:@"disk" value:0.81 hostname:@"db-1"]; [ForgeOpsTracker flushMetrics]; // send right now
Database errors
When an error comes from a database call, the issue shows which stored procedure, table or view its SQL touched, so you know where to start looking. Attach the statement to an exception under FOTSqlStatementKey, or pass it when you report, and SQLite's own while-compiling error text is recognized too. The names are sent by default and are identifiers, never values. The SQL statement itself is opt-in, with every string and number replaced by a question mark before it leaves your app, and a project setting can stop ForgeOps storing the statement at all.
@catch (NSException *exception) {
[ForgeOpsTracker captureException:exception sql:query context:nil];
}
// Opt in to also sending the masked statement (default NO).
[ForgeOpsTracker configureWithBlock:^(FOTConfiguration *config) {
config.captureSqlStatement = YES;
}];
Questions
Do I need to change how I already handle errors?
Almost never. Every client hooks the framework's own exception handling directly, the same way the install snippet above shows, so your own logs, error pages, and rescue blocks keep working exactly as they did before, and ForgeOps just also finds out about it. The one common exception is a background-job runner that doesn't forward through that same mechanism on its own; that needs one small hook added instead, not a change to anything already there.
Where does the data actually go?
Straight to ForgeOps' own ingestion API over plain HTTPS. No agent, no sidecar, and no third-party ingestion service in between, so nothing about your app's traffic or its users' data gets routed through anyone else's pipeline first.
What happens if the same bug fires a thousand times?
It's fingerprinted from its exception class, message, and backtrace, so a thousand reports of the same bug still show up as one issue with an event count of 1,000, not a thousand separate rows to dig through. And a runaway loop can't use up your monthly event quota: once one issue repeats faster than your plan's hourly limit (50 an hour on Free), further repeats are still counted, and still count toward spike alerts, but they aren't stored or charged to your quota.
Is anything scrubbed before it's stored?
Yes. Emails, credit card numbers, and known API key/token formats are redacted out of every event before it's even written, on every plan, with room for per-project custom field names on top of the defaults.
Try it with your own Objective-C app
Free plan included, no credit card required. New organizations start with 14 days of Business.
Get started freeGet