CocoaPods / Xcodeproj

Create and modify Xcode projects from Ruby.
http://rubygems.org/gems/xcodeproj
MIT License
2.36k stars 458 forks source link

Feature Request: entitlements #562

Open getaaron opened 6 years ago

getaaron commented 6 years ago

An Xcode target can have certain 'capabilities' like iCloud, Wallet, Apple Pay, etc. Would love the ability to easily get programmatic access to a target's entitlements, e.g.:

project.targets.first.enabled_entitlements
=> ["com.apple.developer.pass-type-identifiers"]

project.targets.first.enabled_entitlements.pretty_print
=> ["Wallet"]

project.targets.first.entitlements_files
=> ["SomeProject/SomeProject.entitlement"]
keith commented 6 years ago

FWIW the source of truth for these settings is the entitlements files for the targets. We don’t set this eve in our generates project yet they appear correctly

getaaron commented 6 years ago

@keith Yeah I mostly am interested for now in Xcodeproj parsing the entitlements files for me for reading purposes (see the linked fastlane issue). Although eventually it might be nice to manipulate them with Xcodeproj, for now I'm just looking for help parsing it.