{"id":16886649,"url":"https://github.com/alisoftware/pprof","last_synced_at":"2025-04-05T23:10:44.678Z","repository":{"id":56888614,"uuid":"67864029","full_name":"AliSoftware/pprof","owner":"AliSoftware","description":"Ruby Gem to list, filter, search and print Provisioning Profiles files","archived":false,"fork":false,"pushed_at":"2025-01-10T12:58:06.000Z","size":71,"stargazers_count":39,"open_issues_count":4,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T22:09:01.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AliSoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-10T10:02:50.000Z","updated_at":"2025-01-10T12:58:10.000Z","dependencies_parsed_at":"2025-01-18T22:40:34.633Z","dependency_job_id":"4bb56640-b7b0-450c-8f00-c119f117bf23","html_url":"https://github.com/AliSoftware/pprof","commit_stats":{"total_commits":54,"total_committers":4,"mean_commits":13.5,"dds":0.5,"last_synced_commit":"6a27fabbdadb16813d2578744830f7e7c028f6b9"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2Fpprof","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2Fpprof/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2Fpprof/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliSoftware%2Fpprof/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliSoftware","download_url":"https://codeload.github.com/AliSoftware/pprof/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411235,"owners_count":20934653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T16:40:32.003Z","updated_at":"2025-04-05T23:10:44.658Z","avatar_url":"https://github.com/AliSoftware.png","language":"Ruby","readme":"# pprof\n\n[![Twitter: @aligatr](https://img.shields.io/badge/contact-@aligatr-blue.svg?style=flat)](https://twitter.com/aligatr)\n[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/AliSoftware/pprof/blob/master/LICENSE)\n[![Gem Version](https://badge.fury.io/rb/pprof.svg)](https://badge.fury.io/rb/pprof)\n\n`pprof` is a ruby library and binary to manipulate Provisioning Profiles.\n\nIt can help you manage the Provisioning Profiles installed on your Mac (find the profiles UUIDs from the app names or bundle IDs, find detailed information on a given profile, clean up expired profiles from your Mac…) directly from the command line.\n\nIt also supports printing the output in JSON format so you can pipe the result of printing provisioning profiles info into `jq` or similar tools.\n\n## Installation\n\n### Rubygems\n\n```sh\n$ gem install pprof\n```\n\n_(You might need to run this command with `sudo` if your gem home is a system directory)_\n\n### Build from source\n\n* Clone the repository\n* Build it using `gem build pprof.gemspec`\n* Install it using `gem install pprof-*.gem` (replace `*` with the current version number)\n\n## Example usages\n\n* Find all the Provisioning Profiles that are attached to a given Team, or with a given AppID, or that will expire after a given date.\n\n* List all your Provisioning Profiles and their inner information, like the provisioned device UDIDs, the list of certificates (with their associated subject/name), etc.\n\n### Using it from the command line\n\n#### Listing (and filtering) provisioning profiles\n\n```sh\n# List all provisioning profiles\n$ pprof \n\n# Filter provisioning profiles by name\n$ pprof --name foo         # only ones containing 'foo', case sensitive\n$ pprof --name /foo/i      # only ones containing 'foo', case insensitive\n$ pprof --name '/foo|bar/' # only ones containing 'foo' or 'bar'\n$ pprof --name /^foo$/     # only the ones exactly matching 'foo'\n\n# Filter by AppID\n$ pprof --appid com.foo             # only ones containing 'com.foo'\n$ pprof --appid '/com\\.(foo|bar)/'  # only ones containing 'com.foo' or 'com.bar'\n\n# List only provisioning profiles having push notifications\n$ pprof --aps\n$ pprof --aps development\n$ pprof --aps production\n\n# List only provisioning profiles being expired or not\n$ pprof --exp\n$ pprof --no-exp\n\n# List only provisioning profiles containing provisioned devices\n$ pprof --has-devices\n\n# Combine filters\n$ pprof --has-devices --aps --appid com.foo\n\n# List only the expired profiles, and pipe the resulting list to xargs to remove them all\n$ pprof --exp -0 | xargs -0 rm\n```\n\n#### Printing info for a given Provisioning Profile\n\n```sh\n# Print info for a given Provisioning Profile\n$ pprof '12345678-ABCD-EF90-1234-567890ABCDEF'\n\n# Print certificates in a given PP\n$ pprof --certs '12345678-ABCD-EF90-1234-567890ABCDEF'\n\n# Print devices in a given PP\n$ pprof --devices '12345678-ABCD-EF90-1234-567890ABCDEF'\n\n# Print all info on a given PP\n$ pprof --certs --devices --info '12345678-ABCD-EF90-1234-567890ABCDEF'\n$ pprof -cdi '12345678-ABCD-EF90-1234-567890ABCDEF'\n```\n\n#### Printing output in JSON\n\n```sh\n# Print info about all your provisioning profiles as a JSON array\n$ pprof --json\n# Print info about all your provisioning profiles whose name contains \"Foo\", as a JSON array\n$ pprof --name \"Foo\" --json\n# Print info about all your provisioning profiles as a JSON array, including list of devices and certificates in each profile\n$ pprof --json --devices --certs\n\n# Print info about a specific provisioning profile as JSON object\n$ pprof --json '12345678-ABCD-EF90-1234-567890ABCDEF'\n# Print info about a specific provisioning profile as JSON object, including list of devices and certificates\n$ pprof --json -c -d '12345678-ABCD-EF90-1234-567890ABCDEF'\n\n# Use `jq` (https://stedolan.github.io/jq/) to post-process the JSON output and generate some custom JSON array of objects from it\n$ pprof --name 'My App' --json --devices | jq '.[] | {uuid:.UUID, name:.AppIDName, nb_profiles: .ProvisionedDevices|length}'\n```\n\n### Using it in Ruby\n\n```ruby\nrequire 'pprof'\n# Load the Provisioning Profile\np = PProf::ProvisioningProfile.new('12345678-ABCD-EF90-1234-567890ABCDEF')\n\n# Print various informations\nputs p.name\nputs p.team_name\nputs p.entitlements.aps_environment\nputs p.provisioned_devices.count\n\n# Use an OutputFormatter to pretty-print the info\no = PProf::OutputFormatter.new\no.print_info(p)\n\n# You can also print into any IO other than $stdout, like a File\nFile.open('certs.txt', 'w') do |file|\n  o2 = PProf::OutputFormatter.new(file)\n  o2.print_info(p, :certs =\u003e true)\nend\n\n# And you can easily loop on all provisioning profiles and manipulate each\ndir = PProf::ProvisioningProfile::DEFAULT_DIR\n# `*.mobileprovision` are typically for iOS profiles, `*.provisionprofile` for Mac profiles\nDir[\"#{dir}/*.{mobileprovision,provisionprofile}\"].each do |file|\n  p = PProf::ProvisioningProfile.new(file)\n  puts p.name\nend\n```\n\n\n## Anatomy of a Provisioning Profile\n\nProvisioning Profiles are in fact PKCS7 files which contain a plist payload. \n\nThat plist payload itself contains various data, including some textual information (Team Name, AppID, …), dates (expiration date, etc) but also X509 Certificates (`OpenSSL::X509::Certificate`).\n\n\u003cdetails\u003e\n\u003csummary\u003eOutline of the two main classes `ProvisioningProfile` and `Entitlements`\u003c/summary\u003e\n\n```ruby\nPProf::ProvisioningProfile\n    ::DEFAULT_DIR\n    new(file) =\u003e PProf::ProvisioningProfile\n    to_hash =\u003e Hash\u003cString, Any\u003e\n    \n    name =\u003e String\n    uuid =\u003e String\n    app_id_name =\u003e String\n    app_id_prefix =\u003e String\n    creation_date =\u003e DateTime\n    expiration_date =\u003e DateTime\n    ttl =\u003e Int\n    team_ids =\u003e Array\u003cString\u003e\n    team_name =\u003e String\n    developer_certificates =\u003e Array\u003cOpenSSL::X509::Certificate\u003e\n    entitlements =\u003e PProf::Entitlements\n    provisioned_devices =\u003e Array\u003cString\u003e\n    provisions_all_devices =\u003e Bool\n\nPProf::Entitlements\n    new(dict) =\u003e PProf::Entitlements\n    to_hash =\u003e Hash\u003cString, Any\u003e\n    [](key) =\u003e Any\n    has_key?(key) =\u003e Bool\n    keys =\u003e Array\u003cString\u003e\n    \n    keychain_access_groups =\u003e Array\u003cString\u003e\n    get_task_allow =\u003e Bool\n    app_id =\u003e String\n    team_id =\u003e String\n    aps_environment =\u003e String\n    app_groups =\u003e Array\u003cString\u003e\n    beta_reports_active =\u003e Bool\n    healthkit =\u003e Bool\n    ubiquity_container_identifiers =\u003e Array\u003cString\u003e\n    ubiquity_kvstore_identifier =\u003e String\n```\n\u003c/details\u003e\n\n## Contributing\n\nThere's plenty of room for improvement, including:\n\n* Additional filters\n* Parsing of additional entitlement keys\n\nDon't hesitate to contribute, either with an Issue to give ideas or additional keys that aren't parsed yet, or via a Pull Request to provide new features yourself!\n\n## License\n\nThis project is under the MIT license. See `LICENSE` file for more details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisoftware%2Fpprof","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falisoftware%2Fpprof","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falisoftware%2Fpprof/lists"}