Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Info.plist in a signed package?

The team needs to change Info.plist to test certain features. But sometimes the app (very) silently crashes.

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_CRASH (Code Signature Invalid)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x1

Now, if we test the signature as recommended here:

codesign --verify -vvvv -R='anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.1] exists and (certificate leaf[field.1.2.840.113635.100.6.1.2] exists or certificate leaf[field.1.2.840.113635.100.6.1.4] exists)' < path to app >
or
spctl --verbose --assess < path to app >

< path to app >: invalid Info.plist (plist or signature have been modified)

Ok, but I really want to modify it:

  • changing SIP is not an option
  • re-sign only Info.plist is acceptable, but how ?

So two questions:

  1. How can we change Info.plist ?
  2. (optional) When the system validates it ? After restart maybe ?

The question has an answer, in the brotherhood: https://superuser.com/questions/961797/how-to-change-info-plist-in-a-signed-package .

like image 370
Liviu Avatar asked Sep 01 '25 22:09

Liviu


1 Answers

Re-signing the application can be very fast:

codesign --force --verbose=4 --sign "Developer ID Application: <your name> (<team ID>)" <application>

The trick is to avoid the --deep option. On my High Sierra it takes about 20 seconds.

like image 181
Liviu Avatar answered Sep 03 '25 17:09

Liviu