How to Programmatically Install an iOS App on USB-Connected iPhones from a macOS Application?

Hello Apple Developer Community,

We are developing a hardware diagnostic solution consisting of a macOS desktop application and a companion iOS application.

Our iOS application is currently distributed through Apple TestFlight for testing purposes. The application installs and functions correctly when users download it manually through TestFlight.

However, we are facing an issue when attempting to automatically install the same iOS application onto iPhones connected to our macOS application via USB.

Our Intended Workflow

A user connects one or multiple iPhones to a Mac using USB cables.

Our macOS application automatically detects the connected devices.

The macOS application initiates installation of our iOS diagnostic application onto the connected iPhones.

The iOS application performs hardware diagnostic tests.

Test results are transferred back to the macOS application.

Once testing is completed, the iOS application can be removed from the connected devices.

Current Issue

When installing the iOS application manually through TestFlight, everything works correctly.

However, when attempting to install the application programmatically from our macOS application over USB, we encounter a developer recognition or trust-related error.

Our objective is to support commercial hardware diagnostic testing on customer-owned iPhones without requiring users to manually install the application, enable Developer Mode, trust developer certificates, or register individual device UDIDs.

Questions

Is there an officially supported Apple API, framework, or method that allows a macOS application to programmatically install an iOS application onto USB-connected iPhones?

Is this functionality available for applications distributed through TestFlight, or does it require an App Store production release?

Can installation be initiated on customer-owned, unmanaged iPhones without requiring Developer Mode, manual certificate trust, or device registration?

Are there specific code-signing, provisioning profile, or distribution requirements for installing an iOS application through USB?

Does Apple provide a supported solution for deploying diagnostic applications to multiple USB-connected iPhones simultaneously?

If direct USB installation is restricted, what alternative Apple-supported workflow would be recommended for commercial device diagnostic and refurbishment applications?

Additional Information

Our iOS diagnostic application and macOS desktop application have already been developed, and the core diagnostic functionality is working.

The remaining challenge is determining the correct Apple-supported method for installing the iOS companion application automatically onto connected devices.

We would appreciate guidance from Apple engineers or developers who have experience with USB-based iOS application deployment, device management, or commercial diagnostic solutions.

Thank you for your assistance.

There's no way to do this without some kind of user opt-in.
I suggest using Apple Configurator for Mac, available for free from the App Store.

First, publish your app on the App Store as a free unlisted app, and publish it to the Enterprise App Store.
Then sign up for an Apple Business organization. You'll need this to obtain licenses for Configurator to distribute to devices (yes, even though it's free).
Run Configurator on the Mac, sign in to a user on the Apple Business account, and obtain licenses for your app. In Configurator's help there's an article "Assign apps to devices in Apple Configurator for Mac" that describes how to do this.
Then when it's time to install the app on a user's device, connect it to the Mac using a cable. The user will have to "trust" the computer by unlocking their device, tapping Trust, and entering their passcode.
After that, you can have Configurator automatically install the app on the phone.


Bob Whiteman - Device management engineer

Thank you for your detailed explanation. This approach sounds promising for our use case.

Our target customers are device refurbishment facilities and wholesalers processing large volumes of used iPhones, potentially 2,000 or more devices per shipment, with 30–50 devices connected to a Mac simultaneously.

We are comfortable requiring the operator to unlock the devices and approve the initial Trust This Computer prompt.

Before proceeding, could you please clarify two points?

  1. After the operator trusts the Mac, can Apple Configurator install a free, unlisted App Store app onto these devices without supervising, erasing, or permanently enrolling them in MDM?

  2. Can this licensed-app installation process be initiated programmatically through cfgutil or another supported interface, so it can be integrated into our own macOS application rather than requiring the operator to use the Apple Configurator interface separately?

We would also like to remove the diagnostic application after testing and move to the next batch of devices.

Thank you again for your guidance.

It is not necessary to supervise, erase, or enroll a device in MDM when using Configurator to install an app.

cfgutil has some capabilities, but it does not do what you need. However the full Configurator UI has a feature for this kind of workflow, where a technician is applying the same configuration changes to many devices. The technician selects the target devices and the blueprint to apply from a menu, and Configurator applies the changes. Blueprints cannot remove the app afterwards though. That would need to be done with a more manual operation in Configurator or on the device.

Thank you for your previous guidance regarding Apple Configurator, Blueprints, and installing applications without device supervision or MDM enrollment.

We have now confirmed the exact technical issue with our developer and would appreciate further clarification.

Current Implementation:

We have a macOS desktop application that installs an IPA onto iPhones connected via USB.

The IPA is currently signed using an Apple Development certificate and a development provisioning profile.

When our desktop application transfers and attempts to install the IPA, iOS displays the following error:

"Unable to Install — This app cannot be installed because its integrity could not be verified."

Our objective is to install the iOS application onto arbitrary customer-owned iPhones without registering device UDIDs or requiring Developer Mode.

We understand that development provisioning profiles are not suitable for this production use case.

Our Questions:

If we publish our iOS application as a free, unlisted App Store application, can we use that production distribution method to install it onto USB-connected iPhones without registering their UDIDs or enabling Developer Mode?

Can our existing macOS application programmatically initiate this installation, or must installation be performed separately through the Apple Configurator graphical interface?

Is there any Apple-supported API, framework, command-line tool, or distribution mechanism that allows third-party macOS applications to install App Store-distributed applications onto USB-connected, unsupervised iPhones?

If Apple Configurator is the only supported approach, can its Blueprint installation process be triggered programmatically from another macOS application?

Does installing an App Store-distributed app through Apple Configurator require any additional user interaction beyond trusting the computer and approving the installation where prompted?

Our Commercial Use Case:

Our customers are device refurbishment warehouses processing hundreds or thousands of used iPhones. They typically connect 30–50 iPhones simultaneously through USB hubs for hardware diagnostics, network checks, grading, and inventory processing.

We want to minimize manual installation steps while respecting Apple's security and authorization requirements.

We are not looking to bypass Apple's security protections. We want to replace our development-signed IPA installation approach with the correct Apple-supported production deployment method.

Could you please recommend the most appropriate technical implementation?

Thank you again for your assistance.