@@ -33,15 +33,31 @@ type ProvisioningProfileInfoModel struct {
3333 Type ProfileType
3434}
3535
36+ func collectCapabilitesPrintableInfo (entitlements plistutil.PlistData ) map [string ]interface {} {
37+ capabilities := map [string ]interface {}{}
38+
39+ for key , value := range entitlements {
40+ if KnownProfileCapabilitiesMap [ProfileTypeIos ][key ] ||
41+ KnownProfileCapabilitiesMap [ProfileTypeMacOs ][key ] {
42+ capabilities [key ] = value
43+ }
44+ }
45+
46+ return capabilities
47+ }
48+
3649// PrintableProvisioningProfileInfo ...
3750func (info ProvisioningProfileInfoModel ) String (installedCertificates ... certificateutil.CertificateInfoModel ) string {
3851 printable := map [string ]interface {}{}
3952 printable ["name" ] = fmt .Sprintf ("%s (%s)" , info .Name , info .UUID )
4053 printable ["export_type" ] = string (info .ExportType )
4154 printable ["team" ] = fmt .Sprintf ("%s (%s)" , info .TeamName , info .TeamID )
4255 printable ["bundle_id" ] = info .BundleID
43- printable ["expire " ] = info .ExpirationDate .String ()
56+ printable ["expiry " ] = info .ExpirationDate .String ()
4457 printable ["is_xcode_managed" ] = info .IsXcodeManaged ()
58+
59+ printable ["capabilities" ] = collectCapabilitesPrintableInfo (info .Entitlements )
60+
4561 if info .ProvisionedDevices != nil {
4662 printable ["devices" ] = info .ProvisionedDevices
4763 }
@@ -60,6 +76,7 @@ func (info ProvisioningProfileInfoModel) String(installedCertificates ...certifi
6076 if installedCertificates != nil && ! info .HasInstalledCertificate (installedCertificates ) {
6177 errors = append (errors , "none of the profile's certificates are installed" )
6278 }
79+
6380 if err := info .CheckValidity (); err != nil {
6481 errors = append (errors , err .Error ())
6582 }
0 commit comments