Is it still possible for a MDM server to get the IMEI with iOS12? - mdm

After upgrading to iOS12 we noticed that the IMEI was apparently not transmitted to the MDM server anymore.
Is there a workaround?

Related

Getting iOS version before enrollment (Without Agent)

How to conditionally set the
<key>AccessRights</key>
<integer>$enrollment_code</integer>
in MDM enrollment profile based on iOS version its getting installed..
like 5.0 and above it must be 8191
and below 5.0 it needs to be 2047
In the Phase1: profile service, we do not get the iOS version..
So where to get the iOS version before enrollment.
PS: I am enrolling devices without agent (So agent cannot be an option to send it)
You can use the User-Agent reported from the browser.

Push notifications doesn't work after approving in AppStore

After I had lost more than a day while searching for solution, I decided to ask here for advise.
So, I have an iPhone app that use PN, and I have server with installed Easy APNS module. Easy APNS is a bit modified for my needs, but still.
I expected that there could be a problems with PN after distributing my app and i tried to avoid it. I studied a lot of papers. But now I have problems.
As at most of similar questions, everything worked fine in development mode, but in production mode app doesn't receive notifications.
When I've tested my app, fixed bugs, checked my server in development mode, using sandbox apple server, I went to submitting my app for review. According to manuals, I've done:
- enabled production pushes for my AppId
- generated distribution provision for AppStore
- uploaded and installed both certificate and provision
- APS certificate and key in keyChain I've exported to .pem ssl certificate like described here: http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/
- I've uploaded certificate to my server
- built my source using Archive scheme with release configuration. Of course, I've used distribution provision
Than I've submitted binary for review and when it was approved, I've installed it on iPhone from AppStore. And now I can't receive push. Nor on my test device, nor any other.
Till now I've:
- regenerated pem certificate.
- tried to connect to ssl://gateway.push.apple.com/ using this cert - connection OK (connection to ssl://gateway.sandbox.push.apple.com/ with the same cert was rejected).
- checked provision file - key aps-environment is set to production
- checked manuals if I had to change something in source before submitting - nothing.
Actually, devices are registering on server after being launched. They are receiving device token and retrieving it to server with all additional information - all seems to be correct.
Server seems be sending messages correct too - using correct cert file, connecting to 2195 port of gateway.push.apple.com, having no any problems with creating connection and sending message, and receive no any feedback.
So, both device and server can connect to APNS, but server can't send message through it.
I saw a lot of similar problems and a lot of possible solutions. But none of them was helpful.
But I will be thankful for any help, ideas or advice.
Heh... Seems that problem was that my web-developer switched production and developing certificates... Rather silly...
But now I know a lot about Push-notifications)
Thanks a lot StackOverflow!

How does iOS identify received notification is for MDM?

I want to use MDM to manage number of iOS devices.
According to documentation I do not need anything installed on device. In that case when device receives a notification from APNS server, how will it come to know that this notificaation is for MDM?
You need to install at least a root certificate from the MDM-Company (in your case your software / yourself need to deploy the root certificate to the endusers device).
As soon as the device has the root certificate installed, you can send some MDM json payloads through APNS.
I think you can deploy the root certificate with many ways including download in safari on your iOS or also with the configuration utility.
Push Notification String: {"aps":{},"mdm":"MagicPushDeviceCode"}.

iPhone Simulator custom CA certificate

I'd like to test an application on the iphone simulator which connects to a service using a certificate which is signed by our own CA. I can do this on the actual device by adding a provisioning profile which has the CA certificate. I had thought that having the CA certificate in the standard OSX keychain would work, but it doesn't.
So I can access the service via Safari without warning, but I get error when trying to run things in simulator.
The crypto api's are unavailable to the simulator. I think someone at apple was smoking crack when they made this decision because i fail to see how having an iPhone changes the out come of a cryptographic algorithm. Never the less in order to develop with these systems you'll need an iphone or ipod touch.
This link worked for me
canAuthenticateAgainstProtectionSpace method set to return yes.
NOTE: this will accept any certificate so should be removed for production releases: ie: ONLY for testing
It seems to work okay when I point the emulator at one of our live servers which a use a 'real' certificate. But I've just been getting 1200 errors trying to get the emulator to talk to a local test server I set up this morning.
So there must be crypto libraries there (or our app wouldn't talk to the live servers with real certificates), but there certainly seems to be a problem with self-signed certs.

How to send HTTPS requests to host with untrusted server certificate in iPhone Simulator?

I develop an iPhone framework which sends HTTPS requests in order to communicate with a publicly available backend server. Currently I have a big problem regarding untrusted server certificates.
The certificate of the backend server is not signed by a trusted CA, so my first approach was to use NSURLRequest's private allowsAnyHTTPSCertificateForHost. While this worked as expected and was fine as temporary workaround, our customer demands a clean solution as final result. Therefore I wrote a method which allows to install a provided certificate from the file system in the keychain, but this method does not work as expected in the iPhone Simulator. The certificate is installed in the host machine's Mac OS X keychain instead. Unfortunately, if I call NSURLConnection's sendSynchronousRequest method, I retrieve an "untrusted server certificate" error. It seems as if NSURLConnection is not able to access the host's Mac OS X keychain to retrieve the certificate.
Is my guess correct or did I miss something?
Would my approach work if I ran my app on a real iPhone device instead (I do not have one available yet)?
Does there exist a keychain in the iPhone Simulator at all?
Is it at all possible to send HTTPS requests to a server with an untrusted certificate on the iPhone Simulator or do I have to use precompiler directives to implement different routines depending on the underlying platform (simulator or device, respectively)?
Any help is highly appreciated.
Thanks,
Matthias
You can get free trusted SSL certificates at http://startssl.com
Perhaps the ASIHTTPRequest library can help with that?
Yes agree with Beat Bolli but i have done this by NSURL request.may be you are skipping spmething.