iPhone app SDK
Let people report a bug from inside your own iPhone or iPad app: the app's screen, its network requests, its logs and your metadata, redacted on the phone.
MidgeSDK is the website SDK for native iPhone and iPad apps. Someone using your app shakes the phone, or taps your own Report a bug button, records the app’s screen and says what went wrong. The report reaches your workspace with what the app did in that time: its HTTP requests and responses, its log messages and the context you set, such as the user’s ID or plan.
Everything is redacted on the phone before it’s sent, by the same code as the Chrome extension: passwords, tokens, cookies, card numbers and your workspace’s own hidden names never leave it.
Set it up
- Make a recording link. Open Settings › Workspace › Recording links on midge.dev and create one. Reports from the app go to it.
- Register your app. In the App SDK card, an owner or admin adds the app’s bundle id, such as
com.example.shop. MidgeSDK sends only from apps registered there; for any other app, the report sheet says so and sends nothing. - Add the package. MidgeSDK is in early access: email [email protected] with your app’s name, and we’ll give you access to the Swift package (iOS 17 or later). Then start it at launch with your link’s token, the part after
/record/:
import MidgeSDK
@main
struct ShopApp: App {
init() {
Midge.start(link: "rl_YOUR_TOKEN")
}
// …
}
Shaking the phone now opens the report sheet. To open it from your own button instead, or as well:
Button("Report a bug") { Midge.report() }
What’s captured
- Network: requests made with
URLSession.shared, with their headers, bodies (up to 64 KB), status and timing. For a session of your own, callMidge.instrument(configuration)before creating it. - Logs: your app’s own
Logger,os_logandNSLogmessages from the time of the recording, read from the unified log when the report is sent; Apple’s framework logs are left out. Values you interpolate into aLoggermessage show as<private>unless you mark themprivacy: .public, as Apple’s logging does everywhere.Midge.log("…", level: .error)adds a line of your own. - Device: the app’s name, version and build, the iPhone or iPad model, iOS version, language and time zone.
- Metadata: whatever you set with
Midge.metadata, the latest value:
Midge.metadata(["userId": user.id, "plan": "pro", "flags": ["newCheckout": true]])
Midge.user(name: user.name, email: user.email) // fills the sheet's name and email
Requests from the last five minutes are kept in memory only, and nothing is sent unless the person taps Send.
Options
var options = Midge.Options()
options.shakeToReport = false // only your button opens it
options.captureNetwork = false
options.captureLogs = false
Midge.start(link: "rl_YOUR_TOKEN", options: options)
What the person sees
A sheet explains what will be recorded. Record the screen asks iOS for permission once, then a small red Stop pill with a timer stays at the top while they use the app. Only your app is recorded, not other apps or notifications. Afterwards they watch the recording, describe what happened, optionally add a name and email, and tap Send.
What you get
The report appears in your workspace like any recording from a link, marked as sent from an SDK, with the app’s name. Its network requests and console line up with the video, and the AI summary, Slack, Linear, Jira, GitHub and webhooks work as usual.
Limits
The recording link limits apply. A workspace can register up to 20 apps.