AvailableOSUpdates new behavior when no update available is not consistent with other commands

Originator:pierrenicolasr
Number:rdar://39591791 Date Originated:20-Apr-2018 10:55 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.3
Classification:Other Bug Reproducible:Always
 
Summary:
with iOS 11.3, AvailableOSUpdates now returns an error when there is no update.
1. this is not consistent with other commands - they all return empty lists, why would this command return an error when there is no update ?
2. this makes error detection more complicated - we need to parse the error chain and detect that the error code is 2213 and in this case not return an error to the end user.

Steps to Reproduce:
1. Enroll iOS 11.3 device to MDM
2. send AvailableOSUpdates command when no update is requested


Expected Results:
3. empty list is returned

Actual Results:
3. device returns:
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CommandUUID</key>
	<string>f5066860-d63f-4dad-b982-1b431e271268</string>
	<key>ErrorChain</key>
	<array>
		<dict>
			<key>ErrorCode</key>
			<integer>2213</integer>
			<key>ErrorDomain</key>
			<string>DeviceManagement.error</string>
			<key>LocalizedDescription</key>
			<string>No update available.</string>
		</dict>
		<dict>
			<key>ErrorCode</key>
			<integer>3</integer>
			<key>ErrorDomain</key>
			<string>com.apple.softwareupdateservices.errors</string>
			<key>LocalizedDescription</key>
			<string>The operation couldn’t be completed. (com.apple.softwareupdateservices.errors error 3.)</string>
		</dict>
	</array>
	<key>Status</key>
	<string>Error</string>
	<key>UDID</key>
	<string>10a84a1b2c7965f07013c89c30bb3c62aabb251e</string>
</dict>
</plist>

Version:
11.3

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!