micromdm / mdm

common library for mdm command payloads and responses.
MIT License
21 stars 16 forks source link

Changed type of LastCloudBackupDate to time.Time #20

Closed ghost closed 7 years ago

ghost commented 7 years ago

According to https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/MobileDeviceManagementProtocolRef/3-MDM_Protocol/MDM_Protocol.html#//apple_ref/doc/uid/TP40017387-CH3-SW24 and my iPhone the Type of LastCloudBackupDate is Date and not String.

I found out because i got error messages like this:

micromdm[19385]: transport=http err="plist: cannot unmarshal 2017-08-28 03:40:01 +0000 UTC into Go value of type string"

groob commented 7 years ago

Nice find! Mind specifying the iOS version you tested with? This could've been our mistake, but it's also possible that apple changed the plist type between versions.

ghost commented 7 years ago

Sure, i was testing it with my iPhone SE on iOS 10.3.3 (14G60). I unfortunately couldn't test it with older iOS versions.

groob commented 7 years ago

No problem, that's very helpful to keep know in the future.

I'll accept the PR and we can investigate later! Thanks a lot for the contribution.