Skip to content

Instantly share code, notes, and snippets.

@htpc-helper
Last active February 6, 2025 10:18
Show Gist options
  • Save htpc-helper/f211a6da5b320cd35852e8ef0b22f350 to your computer and use it in GitHub Desktop.
Save htpc-helper/f211a6da5b320cd35852e8ef0b22f350 to your computer and use it in GitHub Desktop.
A Python script that when run using Pythonista for iOS prints and copies to the clipboard a list of apps installed on the device
from objc_util import ObjCClass
import clipboard
LSApplicationWorkspace = ObjCClass('LSApplicationWorkspace')
workspace = LSApplicationWorkspace.defaultWorkspace()
appInfo = workspace.allApplications()
appTxt = ''
for app in appInfo:
if str(app.applicationType()) == 'User':
if len(appTxt) != 0:
appTxt += '\n'
appTxt += str(app.localizedName())
print(appTxt)
clipboard.set(appTxt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment