← Back to Blog

Are .mobileconfig profiles useful for iOS developers?

Published July 17, 20266 min read
iOSCapacitorConfiguration ProfilesDeveloper Tooling

TLDR

For ordinary iOS or Capacitor development, a .mobileconfig profile is usually not worth using. It bundles related device settings into one installable file.

I compared direct installation of a local root CA with installing the same CA inside a profile. On two iPhones, both paths required the same explicit Full Trust step. The profile packaged the certificate. It did not grant trust.

For one device or one setting, configure it directly or use a tool designed for that specific job. Consider a profile when several settings must move together across devices and someone owns distribution, updates, security, and removal. That describes a device lab or managed fleet more often than everyday app development.

Why it looked promising

I found .mobileconfig while researching Capacitor live reload on a physical iPhone. This was not ordinary LAN live reload: the setup needed a stable HTTPS origin and a locally trusted root CA.

Leaving development-only Capacitor configuration or a WebView exception would have been easier, but also easy to forget. I wanted repeatable device setup without weakening the behavior being tested.

A named, inspectable, removable file that could contain the root certificate, Wi-Fi, and proxy settings looked ideal. Why was this not a normal iOS development tool?

I did not deploy .mobileconfig at work. I tested the idea separately to find out whether the excitement survived contact with a real iPhone.

What a .mobileconfig file actually is

The unsigned .mobileconfig used here is an XML property list. The outer dictionary describes the profile. Its PayloadContent array contains the settings, called payloads. It looks like an Info.plist, but it configures a device rather than an app bundle. Signed or encrypted profiles have additional wrapping.

It is also not a .mobileprovision provisioning profile. A .mobileprovision file is used in app signing and entitlement validation. A .mobileconfig asks the device to install settings. Apple’s configuration profile documentation places this model under Device Management.

This abbreviated example shows the two layers. It is illustrative and cannot be installed as shown:

<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadContent</key>
<array>
  <dict>
    <key>PayloadType</key>
    <string>com.apple.security.root</string>
    <key>PayloadContent</key>
    <data>BASE64_ENCODED_DER_CERTIFICATE</data>
  </dict>
</array>

For Apple’s root certificate payload, PayloadContent contains the public certificate in DER format. DER is a binary format. XML represents those bytes as Base64 text. The payload contains neither a hash nor the CA private key. The private key stays on the machine that owns the CA.

Profiles and payloads also carry a visible name, identifiers, and UUIDs. PayloadVersion is normally 1. It is a format version, not your profile’s release number.

What profiles can configure

A profile can also configure client identities, Wi-Fi and per-network proxies, VPN and encrypted DNS, accounts, Web Clips, diagnostics, restrictions, and managed apps.

Apple's iPhone and iPad payload list is much longer, but a valid plist does not mean a personal iPhone can apply every payload. Availability depends on the operating system, installation method, enrollment, supervision, and whether the payload targets a device or a user. Many controls require managed devices.

A profile containing only the root CA added no value in this test

I started with the smallest useful comparison: a disposable root CA installed directly or inside a .mobileconfig.

Security warning: A fully trusted development root affects the whole device, and whoever has its private key can issue certificates that the device will trust. Use a disposable CA on test devices, inspect the profile, and protect the private key.

I created temporary root and server certificates, verified them, and served a small HTTPS page from the Mac.

On both iPhones, the profile appeared under VPN & Device Management after installation. Safari still rejected the local server. Only after I enabled the root under Certificate Trust Settings did the page load successfully.

That matches Apple’s documented behavior for manually installed root certificates: installation alone does not enable SSL/TLS trust. The user must still turn on Full Trust.

Sending the public root certificate directly produced the same installation and Full Trust flow, so wrapping it in a profile added no value in this test.

This test covered manual installation and Safari trust on two iPhones, not every Capacitor networking path. I removed the disposable certificates and profiles afterward and confirmed that their Full Trust entries were gone.

Packaging trust does not solve networking

A trusted root does not repair:

  • a leaf certificate whose Subject Alternative Name does not match the URL
  • DNS or routing to a development Mac
  • a development Mac’s IP address changing between networks
  • CORS or WebView origin rules
  • App Transport Security requirements
  • proxy behavior or secure WebSocket handling

The original setup needed both a correct origin and local trust. Wrapping the root certificate did nothing for the other half.

Why Wi-Fi and PAC did not rescue the idea

To make the profile carry its weight, I considered adding Wi-Fi and a proxy auto-configuration (PAC) setting alongside the root CA. A PAC file decides whether a request goes directly to its destination or through a proxy. That proxy can capture, map, or rewrite traffic. TLS interception still requires its own interception CA. The PAC file only chooses the route.

In theory, one profile could join a test network, install trust, and route a development hostname through a debugging proxy. Wi-Fi credentials alone already have simpler QR and nearby sharing options, so the proxy had to justify the profile.

I did not test the compound Wi-Fi/PAC profile end to end. The setup had already grown to include PAC hosting, proxy reachability, the macOS firewall, an interception CA for TLS debugging, different client networking stacks, and cleanup. I stopped. This can make sense for a heavily reused network lab. It was disproportionate for ad hoc debugging.

Simulator trust is easiest from the command line

For iOS Simulator, common certificate-trust tasks can be handled from the command line with simctl. Adding a trusted root and resetting the Simulator keychain are scriptable, making the CLI the easiest option for repeatable Simulator setup.

See Add iOS Simulator root cert with simctl for the commands and verification steps. This path applies to Simulator only. The manually configured iPhones in this experiment still required interaction in Settings.

The short Android comparison

Android has no general .mobileconfig file for manual installation. Comparable fleet configuration lives in Android Enterprise: a management console, device enrollment, policies enforced by Android Device Policy, and apps delivered through Managed Google Play.

For one development device, Android developers normally use narrower tools: emulator state, adb, app/build configuration, or Network Security Configuration. A debug build can declare trust anchors used only during debugging without enrolling the whole device into enterprise management.

When a configuration profile is worth using

Start with the narrowest tool that can do the job:

Situation Better starting point Profile verdict
One device, one temporary setting Direct setting, app configuration, Simulator, or another narrow tool No
A few devices, several related settings repeated together Manual profile or Apple Configurator Maybe, if setup and cleanup are genuinely easier
A controlled local device lab Configurator or an existing management workflow Reasonable when repeatability matters
Organization-owned devices requiring remote control Mobile device management (MDM) with configuration profiles Natural fit

Whatever the scale, someone must own distribution, updates, failure handling, security, and removal. The repeatability must justify an artifact that can change device security or networking.

My conclusion: the original setup did not meet that threshold.
Browse all writing →