Posted on 05-03-2018 06:56 AM
In preparing for 32 bit apps and iOS 11, I've found a number of helpful posts in finding 32 bit apps I currently have in Jamf. As of this summer all of our devices will be iOS 11 and once I have all 32 bit apps removed, I'd like to my Team to be able to identify 32 bit apps before "purchasing" via VPP and again populating apps in jamf that won't even work. Has anyone found an way to identify this in VPP or other means?
Solved! Go to Solution.
Posted on 05-03-2018 01:24 PM
@TomDay I had an old AppleScript example laying around and hacked together something not so pretty real quick. Works though ¯_(ツ)_/¯
#!/bin/bash
getID() {
osascript <<AppleScript
set the adamID to text returned of ¬
(display dialog "Check to see if an app is 32-bit. Type in an adam ID below. " default answer "")
AppleScript
}
ID="$(getID)"
if [[ "$?" != "0" ]]; then
echo "User selected Cancel. Exiting..."
exit 0
fi
bitstatus=$(curl -s "https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en&id=$ID" | python -mjson.tool | grep is32bitOnly | cut -d ':' -f2 | cut -d ',' -f1 | tr -d '[[:space:]]')
if [[ "$bitstatus" = "true" ]]; then
osascript -e 'tell app "System Events" to display dialog "'$ID' is 32-bit only. Noooooooo." buttons {"OK"} default button "OK"'
else
osascript -e 'tell app "System Events" to display dialog "'$ID' is NOT 32-bit only. Yay!" buttons {"OK"} default button "OK"'
fi
exit 0
Posted on 05-03-2018 07:41 AM
Following.
Posted on 05-03-2018 08:50 AM
The best way is to look up the app on an iPad with iOS 11. At the top will be a gray bar that it won't work, if it is 32 bit. Try it!
Posted on 05-03-2018 09:20 AM
Use the iTunes API!
curl -s "https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en&id=$id" | python -mjson.tool | grep is32bitOnly
Replace $id with the adam ID of the app you want. For Google Drive (https://itunes.apple.com/us/app/google-drive/id507874739?mt=8) that would be 507874739. Outputs...
"is32bitOnly": false,
You can also do this in a loop by referencing a text file with a list of adam IDs.
#!/bin/bash
read file for i in $(cat $file); do
echo "$i is $(curl -s "https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en&id=$i" | python -mjson.tool | grep is32bitOnly)"
done
Posted on 05-03-2018 09:23 AM
If the app has been updated within the last year, you're usually pretty safe.
Otherwise... it's not the greatest thing for a non-technical person, but using (what I assume is called) iTunes' uclient API, you can see it. For example, I know this app Word Magic Lite is 32-bit only.
Let's take a look at the URL:
https://volume.itunes.apple.com/us/app/word-magic-lite/id385491347?mt=8
If you take the app's ID from the URL (the numbers after "/id") and paste it into this URL in a browser:
https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?version=2&id=(!!!PASTE THE ID HERE!!!)&p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en
You'll get back this JSON data:
Apps that are 32-bit only will get a "is32bitOnly" item. If you do a Find/command-f in your browser for "is32bitOnly", it'll point out where it says "is32bitOnly":true. Oddly enough, 64-bit apps don't get "is32bitOnly":false or "is64bitOnly":true. So if you don't see the 32bitOnly item, you should be good to go.
Pretty clunky, but if you use a little javascript in the URL portion of a bookmark like this:
javascript:window.location='https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?version=2&id=' + prompt('Enter App ID') + '&p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en'
And you'll get a nice prompt to paste in the App's ID, which will take you to that result from that API.
If you're a bit scripty, you can use this to do all sorts of things.
(EDIT: dang, @nstrauss beat me to the punch!)
Posted on 05-03-2018 09:47 AM
Thx Everyone, super helpful. Looks like the curl with the iTunes API works the best. I'm only kinda "script LOL, so trying to just edit the script so it will prompt the user in a Self Service policy and then run the curl, output the results.
Posted on 05-03-2018 12:21 PM
@nstrauss I wrote a script for this based on your response but stuck with outputting the result to the user can you help me out with by basic scripting skills?
#!/bin/bash
# Get app ID
id=$(/usr/bin/osascript<<END
tell application "System Events"
activate
set the answer to text returned of (display dialog "Enter the app ID!" default answer "" buttons {"Continue"})
end tell
END)
###Script
curl -s "https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en&id=$id" | python -mjson.tool | grep is32bitOnly
exit 0
Posted on 05-03-2018 01:24 PM
@TomDay I had an old AppleScript example laying around and hacked together something not so pretty real quick. Works though ¯_(ツ)_/¯
#!/bin/bash
getID() {
osascript <<AppleScript
set the adamID to text returned of ¬
(display dialog "Check to see if an app is 32-bit. Type in an adam ID below. " default answer "")
AppleScript
}
ID="$(getID)"
if [[ "$?" != "0" ]]; then
echo "User selected Cancel. Exiting..."
exit 0
fi
bitstatus=$(curl -s "https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en&id=$ID" | python -mjson.tool | grep is32bitOnly | cut -d ':' -f2 | cut -d ',' -f1 | tr -d '[[:space:]]')
if [[ "$bitstatus" = "true" ]]; then
osascript -e 'tell app "System Events" to display dialog "'$ID' is 32-bit only. Noooooooo." buttons {"OK"} default button "OK"'
else
osascript -e 'tell app "System Events" to display dialog "'$ID' is NOT 32-bit only. Yay!" buttons {"OK"} default button "OK"'
fi
exit 0
Posted on 05-04-2018 07:18 AM
@nstrauss so much better than my hack script! TYVM, works flawlessly :-)
Posted on 05-07-2018 10:33 AM
I added to @nstrauss script by adding a portion that grabs the name of the app from the response and displays that in the AppleScript dialogs as a type of confirmation to the end-user that they punched in the right AdamID.
#!/bin/bash
getID() {
osascript <<AppleScript
set the adamID to text returned of ¬
(display dialog "Check to see if an app is 32-bit. Type in an adam ID below. " default answer "")
AppleScript
}
ID="$(getID)"
if [[ "$?" != "0" ]]; then
echo "User selected Cancel. Exiting..."
exit 0
fi
bitstatus=$(curl -s "https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en&id=$ID" | python -mjson.tool | grep is32bitOnly | cut -d ':' -f2 | cut -d ',' -f1 | tr -d '[[:space:]]')
appname=$(curl -s "https://uclient-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup?p=mdm-lockup&caller=MDM&platform=itunes&cc=us&l=en&id=$ID" | python -mjson.tool | grep nameRaw | cut -d ':' -f2 | cut -d ',' -f1 | tr -d '"')
if [[ "$bitstatus" = "true" ]]; then
osascript -e 'Tell application "System Events" to display dialog "'"$appname"' is 32-bit only." buttons {"OK"} default button "OK"'
else
osascript -e 'Tell application "System Events" to display dialog "'"$appname"' is NOT 32-bit only." buttons {"OK"} default button "OK"'
fi
exit 0