Identifying 32 bit apps for iOS before VPP Purchase

TomDay
Release Candidate Programs Tester

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?

1 ACCEPTED SOLUTION

nstrauss
Contributor II

@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

View solution in original post

9 REPLIES 9

cmakinsi
New Contributor II

Following.

cdenesha
Valued Contributor II

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!

nstrauss
Contributor II

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

bumbletech
Contributor III

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:

552ea5744b434be68420e93009e2a554

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.
f2695ac0c69f42ed904482a841b582ba

If you're a bit scripty, you can use this to do all sorts of things.

(EDIT: dang, @nstrauss beat me to the punch!)

TomDay
Release Candidate Programs Tester

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.

TomDay
Release Candidate Programs Tester

@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

nstrauss
Contributor II

@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

TomDay
Release Candidate Programs Tester

@nstrauss so much better than my hack script! TYVM, works flawlessly :-)

russeller
Contributor III

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

02241c71cda6448eba727d9ebf314410