I was reading up on iPhone in the enterprise and saw something about Mobile Device Management servers. As far as I can tell, there are a few 3rd party MDM vendors, but Apple
I think you might find that protocol for MDM here..
Mobile Device Management for enterprise
Mobile Device Management makes it easy to manage iOS devices. There are a lot of MDM vendors available in the industry. You can reach out them for solutions.
There are a lot of MDM products that serves the iOS device management purpose. There are a lot out there like Airwatch, Mobileiron, Meraki, SimpleMDM etc. I've tried out Hexnode MDM and it is worth checking out. Hope this helps.
DeviceMax http://www.kochartech.com/mobile-device-management-enterprise.html?tab=enterprise Enterprise Mobile Device Management (MDM) offers end -to-end security, enterprise grade architecture, world class service and support across major mobile platforms available. It addresses every facet of the need, for mobile device configuration at present and provides a framework for meeting future needs with most advanced technology.
You better follow the apple provided ruby code. Set it up and make it working. After that you can simply convert that to any language. That worked for me.
The best document for iOS MDM implementation is https://media.blackhat.com/bh-us-11/Schuetz/BH_US_11_Schuetz_InsideAppleMDM_WP.pdf. You can get sufficient detail to implement iOS MDM. Refer this How to develop iPhone MDM Server? and this generate MDM certificate