block/unmount iPhone connection to a MacOs

I am trying to develop a "Device control" app that will allow companies to block specific devices.

Once a device is connected physically via a USB port, my app checks it and then decides if to unmount it.

I am able to do it with mass storage devices like Disk-On-Key and SSD cards. 

For that I am using the API functions: DADiskCreateFromIOMedia, DADiskUnmount, etc'


However, looks like iPhones aren't mounted like storage devices and they don't have an IOMedia object. 

I can't find a way to unmount an iPhone at all. 

Is it even possible? If yes, can you please give me a reference to a resource?

I am writing the app in Objectice-C.

Thanks!



Mac mini, macOS 10.15

Posted on Feb 28, 2024 07:14 AM

Reply
3 replies

Feb 28, 2024 01:40 PM in response to Keith Barkley

Keith Barkley wrote:

Not necessarily, at Sandia, all the computers on the classified network had their USB ports blocked.
I guess you could consider it MalWare, but it had a purpose.


I’m well aware of entities that wish to maintain controls over data, having worked with and having worked on OS support for mandatory access controls running in both system high and multi-level security configurations. Wouldn’t surprise me that some of that code got deployed at Sandia, too.


In this context, this effort is still basically malware, albeit by a different name, and a different purpose.


It’s in the realm of the Mac mandatory access controls (Mac macOS MAC, not often I get to write that) TrustedBSD code, but I’m not sure that macOS code even still supported or user-accessible. Outside of its use underneath SIP and sandboxes and ilk.


Semi-related: macOS Security Compliance Project - Apple Support


A discussion with developer support will hopefully get the OP to something that might be more maintainable.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

block/unmount iPhone connection to a MacOs

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.