Reuben Tanner
Reuben Tanner

Reputation: 5565

Install certificate to iOS device via OSX

I'm doing some automated certificate testing for an iOS app and want to know of a way to install a root certificate onto the device by way of the terminal.

The goal is to have this whole certificate install process be automated with no user interaction. It would be totally acceptable to have this done via the Automator if installing the certificate can be done through a GUI on the Mac.

I've looked at: iOS: Pre install SSL certificate in keychain - programmatically but it's not applicable because this is being done through Objective-C in the app itself. I want to do completely separately from the app.

And I don't believe How to install developer certificate/private key and provisioning profile for iOS development via command line? is applicable because it's installing the development cert to the Mac's keychain not a generic cert to the iOS device.

An answer of "this is impossible" with proof would be totally acceptable as well.

EDIT 1

Per the suggestion of @Rivera I attempted to use the Prepare feature of Configurator but it is too intrusive: a new version of iOS is installed, the device is unusable for ~10 minutes, user interaction was required etc. I just want to do one action: install the certificate.

Further research showed no CLI or scripting capabilities with the Configurator aside from some hacks that may or may not work found here.

I've put out a ticket with Apple to see if they've got any more information.

EDIT 2

Added this line: "It would be totally acceptable to have this done via the Automator if installing the certificate can be done through a GUI on the Mac." to the main question body.

Upvotes: 8

Views: 1288

Answers (1)

E. Rivera
E. Rivera

Reputation: 10938

I would take a look at Apple Configurator to see if it has some CLI/scripting support.

Upvotes: 2

Related Questions