I'm working on the companion iOS app for my purpose-built MDM system. when I use the following in a .swift file:
import DeviceManagement
I get the build issue:
No such module 'DeviceManagement'
When I attempt to add the framework in the Frameworks, Libraries, and Embedded Content settings, DeviceManagement doesn't even show up in the available frameworks.
Alll the documentation I can find suggests that is the correct framework to import, but I'm new to this and not sure if I'm just missing something.
Some AI help is suggesting that the culprit might be v16.x of Xcode, but I don't know enough to prove that correct or not.
Any ideas on why Xcode believes there is no such module? Is there documentation that might help me learn how to make that framework available for my project?
Thans for the clarification.
Since the DDM can't change the configuration on it's own
Indeed. But wouldn’t it be cool if it could? (-: I think it’d be reasonable for you to file an enhancement request against DDM asking for this feature. And if you do that, please post your bug number, just for the record.
I was trying to wake up the app, and have the app update the declaration, then report back to the server on the current state of the device.
That might be feasible, but I see a number of potential challenges:
-
I don’t think you’ll be able to update the declaration directly from the app. But you could have the app communicate with a web service to do it on the app’s behalf.
-
Normally I’d recommend that you set up a custom web service for this, but if you’re building your own MDM then you could just have it expose a new endpoint for this.
-
Historically the biggest challenge with this sort of thing was authentication, but ManagedApp framework makes that so much easier.
-
There’s also a location services aspect to this. Historically this approach might fail if the user ‘force quit’ your app (that is, removed it from the multitasking UI by swiping up). I’m not 100% sure of the current state there, but ISTR it’s improved. But location isn’t really my forte, so if you have questions on that front I encourage you start a new thread in the App & System Services > Maps & Location topic area.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"