• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless


  • Subject: Re: XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless
  • From: Saagar Jha <email@hidden>
  • Date: Tue, 07 Feb 2017 10:06:49 -0800

After having a similar issue, I got a bit of help from Ken Thomases, who referred me to this document:
https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-TNTAG201

In particular,

The system expects these locations to contain only code. When evaluating an app bundle’s code signature, the system will reject arbitrary data files found in these locations because they’re unsigned. Conversely, the code signing machinery considers anything not in one of these directories, including code, to be a resource. Any code not in one of these directories is therefore sealed twice: once as code, and once as a resource in the outer signature. This wastes both signing and verification time and storage space. Also, this can break the outer signature of apps that use their own update mechanisms to replace nested code. If this nested code is being treated as a resource, the outer signature doesn’t know that this nested content is actually code.

Do not use custom subdirectories inside the code nesting directories shown in Table 3-1. For example, place all your XPC services directly in the Contents/XPCServices directory. Do not organize them into subdirectories like Contents/XPCServices/Net and Contents/XPCServices/Math. Creating a custom directory hierarchy in one of these locations can break the code signing machinery, depending on the names of the subdirectories, and while it may appear to work in some cases, it is not a supported practice.

Store Python, Perl, shell, and other script files, and other non-Mach-O executables in your app’s Contents/Resources directory. While it’s possible to sign such executables and store them in Contents/MacOS, this is not recommended. This is because code signing uses extended attributes to store signatures in non-Mach-O executables such as script files. If the extended attributes are lost, the program’s signature will be broken. Many file transfer techniques do not preserve extended attributes, nor are they preserved when uploading to the Mac App Store. When you put the script in the Contents/Resources directory, codesign stores the associated signature in the Contents/_CodeSignature/CodeResources file, which is preserved. Thus, in practice, a properly signed app that has all of its files in the correct places does not contain any signatures stored as extended attributes.

Essentially, put the files where they should be. Mach-O executables shouldn’t be in Contents/Resources; that’s where your shell script goes.

Saagar Jha
Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless
      • From: Filhol Alain <email@hidden>
References: 
 >XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless (From: Filhol Alain <email@hidden>)

  • Prev by Date: Detailed info on link-time optimization (LTO) behavior
  • Next by Date: Re: Installable Command Line Tool
  • Previous by thread: XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless
  • Next by thread: Re: XCode codesigns my App but Gatekeeper says "unidentified developer" nonetheless
  • Index(es):
    • Date
    • Thread