IOS – How to tell which Apple ID has signed/purchased specific apps on iOS

code-signingfamily-sharingiosios-appstore

I have an iPhone I'm trying to restore and the restore keeps failing. Specifically, I'm asked to enter the password for family members. I must decline that for secret reasons. Also, family sharing doesn't make me enter my family member's password, so why does that happen when restoring a backup?

In order to pick this apart, I'd like to inspect the apps on my iPhone 6 with iOS 9.1 so I can determine which ones are not purchased from my Apple ID.

I have Xcode, libimobiledevice from homebrew on OS X 10.11, iTunes can back up the phone and I can inspect the files on the Mac if there's no way to access this data from iOS – which I'd prefer. Basically, how can I enumerate all apps and determine which ones will prevent me from using an iCloud backup to restore that app using solely my Apple ID and not need the password of a family member.

How can I identify the signing identity used for each app on the iPhone by hook or by crook?

Best Answer

I had found a script that can list iTunes apps by purchase here (author: Walt Stoneburner). The link is now broken, but I had archived that page 3 years ago. This is the script:

for f in ~/Music/iTunes/iTunes\ Media/Mobile\ Applications/*.ipa; \
 do (echo "$f" ; unzip -p "$f" "iTunesMetadata.plist" | \
 plutil -p - | egrep -i "\"(itemName|artistName|AppleID)\"" ) | \
 perl -e 'while (<>) { if (m!^/!) { chop; $fqn=$_; } if (m/"(.+)" => (".+")/) { $e{lc($1)}=$2; } } print "\"${fqn}\",$e{\"itemname\"},$e{\"artistname\"},$e{\"appleid\"}\n";'; \
done

The script shoud be run in the terminal and the output will be printed into the standard output. If you want to redirect it to a file, add these parameters at the end of script (after done):

1>~/Desktop/purchase_export_output.csv 2>~/Desktop/purchase_export_error.log

Now you can open purchase_export_output.csv from your desktop. Its schema is like this:

"file.ipa","Name","Seller","purchased_by"

If any error occurs one line will be added to the purchase_export_error.log.