Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Response struct missing fields for ProfileList and ProvisioningProfileList #9

Open
ThomasDotCodes opened this issue Nov 18, 2016 · 1 comment

Comments

@ThomasDotCodes
Copy link

ThomasDotCodes commented Nov 18, 2016

If it matters, this is via iOS 9.3.5

The ResponseStruct has a field for InstalledApplicationList:

InstalledApplicationList InstalledApplicationListResponse `json:"installed_application_list,omitempty" plist:",omitempty"`

However it does not have any fields for ProfileList or ProvisioningProfileList

A quick (but less than ideal) solution in testing so far was to update response.go with following edits:

Response struct

// Response is an MDM Command Response
type Response struct {
	UDID                     string
	UserID                   *string `json:"user_id,omitempty" plist:"UserID,omitempty"`
	Status                   string
	CommandUUID              string
	RequestType              string                           `json:"request_type,omitempty" plist:",omitempty"`
	ErrorChain               []ErrorChainItem                 `json:"error_chain" plist:",omitempty"`
	QueryResponses           QueryResponses                   `json:"query_responses,omitempty" plist:",omitempty"`
	SecurityInfo             SecurityInfo                     `json:"security_info,omitempty" plist:",omitempty"`
	CertificateList          CertificateList                  `json:"certificate_list,omitempty" plist:",omitempty"`
	InstalledApplicationList InstalledApplicationListResponse `json:"installed_application_list,omitempty" plist:",omitempty"`
	ProvisioningProfileList  []ProvisioningProfileListItem
	ProfileList              []ProfileListItem
}

additional structs

type ProfileListItem struct {
	HasRemovalPasscode bool
	IsEncrypted        bool
	PayloadContent     []PayloadData
	PayloadData
}

type PayloadData struct {
	PayloadDescription       string
	PayloadDisplayName       string
	PayloadIdentifier        string
	PayloadType              string
	PayloadVersion           uint32
	PayloadUUID              string
	PayloadRemovalDisallowed bool
}

Any suggestions on how to do this better are more than welcome. Will update this issue as I make any changes/improvements.

@ThomasDotCodes
Copy link
Author

ThomasDotCodes commented Nov 18, 2016

NOTE: I'm not using micromdm, only using the mdm package for structs. So the associated json isn't important for me, but I assume would be for micromdm.

Another NOTE: same issue applies to Restrictions response (it doesn't have a field in the Response struct)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant