Sign an application bundle with debug symbols in a .dSYM directory.
```
$ rcodesign debug-create-info-plist --bundle-name MyApp MyApp.app/Contents/Info.plist
writing MyApp.app/Contents/Info.plist
$ rcodesign debug-create-macho MyApp.app/Contents/MacOS/MyApp
assuming default minimum version 11.0.0
writing Mach-O to MyApp.app/Contents/MacOS/MyApp
$ mkdir -p MyApp.app/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/DWARF
$ mkdir -p MyApp.app/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/Relocations/aarch64
$ rcodesign debug-create-info-plist --bundle-name MyApp.app.dSYM --package-type dSYM MyApp.app/Contents/MacOS/MyApp.app.dSYM/Contents/Info.plist
writing MyApp.app/Contents/MacOS/MyApp.app.dSYM/Contents/Info.plist
$ touch MyApp.app/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp
$ touch MyApp.app/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/Relocations/aarch64/MyApp.yml
$ rcodesign sign MyApp.app MyApp.app.signed
signing MyApp.app to MyApp.app.signed
signing bundle at MyApp.app
signing bundle at MyApp.app into MyApp.app.signed
signing main executable Contents/MacOS/MyApp
$ rcodesign debug-file-tree MyApp.app.signed
d MyApp.app.signed/
d MyApp.app.signed/Contents
f 0a5902dc8e47f490d038 MyApp.app.signed/Contents/Info.plist
d MyApp.app.signed/Contents/MacOS
f 5ae6736f434bcc89d779 MyApp.app.signed/Contents/MacOS/MyApp
d MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM
d MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents
f 6708b8b2252c5817e214 MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents/Info.plist
d MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents/Resources
d MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/DWARF
f e3b0c44298fc1c149afb MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp
d MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/Relocations
d MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/Relocations/aarch64
f e3b0c44298fc1c149afb MyApp.app.signed/Contents/MacOS/MyApp.app.dSYM/Contents/Resources/Relocations/aarch64/MyApp.yml
d MyApp.app.signed/Contents/_CodeSignature
f cc2d27446655d0b25e58 MyApp.app.signed/Contents/_CodeSignature/CodeResources
$ rcodesign print-signature-info MyApp.app.signed
- path: Contents/Info.plist
file_size: 576
file_sha256: 0a5902dc8e47f490d03889d3593d17bddbf79e6c1f79494e20dd28f9459effa5
entity: other
- path: Contents/MacOS/MyApp
file_size: 22544
file_sha256: 5ae6736f434bcc89d7797606854610aec1618993e858fc5f8ba2a487ea5af576
entity:
mach_o:
macho_linkedit_start_offset: 16384 / 0x4000
macho_signature_start_offset: 16400 / 0x4010
macho_signature_end_offset: 16821 / 0x41b5
macho_linkedit_end_offset: 22544 / 0x5810
macho_end_offset: 22544 / 0x5810
linkedit_signature_start_offset: 16 / 0x10
linkedit_signature_end_offset: 437 / 0x1b5
linkedit_bytes_after_signature: 5723 / 0x165b
signature:
superblob_length: 421 / 0x1a5
blob_count: 3
blobs:
- slot: CodeDirectory (0)
magic: fade0c02
length: 365
sha1: c75393bcf61044e0d10cb03c81bc74c82966b595
sha256: daa2ade41cf51bf9664f9a81e37d8b07f14af6eb62d2d649667ac65c3f80235f
- slot: RequirementSet (2)
magic: fade0c01
length: 12
sha1: 3a75f6db058529148e14dd7ea1b4729cc09ec973
sha256: 987920904eab650e75788c054aa0b0524e6a80bfc71aa32df8d237a61743f986
- slot: CMS Signature (65536)
magic: fade0b01
length: 8
sha1: 2a7254313aa41796079bb0e9d0f044345f69f98b
sha256: e6c83bc98a10348492c7d4d2378a54572ef29e1a5692ccd02b5e29f4b762d6a0
code_directory:
version: '0x20400'
flags: CodeSignatureFlags(ADHOC)
identifier: com.example.mybundle
digest_type: sha256
platform: 0
signed_entity_size: 16400
executable_segment_flags: ExecutableSegmentFlags(MAIN_BINARY)
code_digests_count: 5
slot_digests:
- 'Info (1): 0a5902dc8e47f490d03889d3593d17bddbf79e6c1f79494e20dd28f9459effa5'
- 'RequirementSet (2): 987920904eab650e75788c054aa0b0524e6a80bfc71aa32df8d237a61743f986'
- 'Resources (3): cc2d27446655d0b25e58aa5da3dc69320fa09d259e0215f17e6bdee93b354043'
cms: null
- path: Contents/MacOS/MyApp.app.dSYM/Contents/Info.plist
file_size: 603
file_sha256: 6708b8b2252c5817e2142a8c4a818b4463b822fd891e436583686c1b29cc061a
entity: other
- path: Contents/MacOS/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp
file_size: 0
file_sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
entity: other
- path: Contents/MacOS/MyApp.app.dSYM/Contents/Resources/Relocations/aarch64/MyApp.yml
file_size: 0
file_sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
entity: other
- path: Contents/_CodeSignature/CodeResources
file_size: 2734
file_sha256: cc2d27446655d0b25e58aa5da3dc69320fa09d259e0215f17e6bdee93b354043
entity:
bundle_code_signature_file: !ResourcesXml
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- ' <key>files</key>'
- ' <dict/>'
- ' <key>files2</key>'
- ' <dict>'
- ' <key>MacOS/MyApp.app.dSYM/Contents/Info.plist</key>'
- ' <dict>'
- ' <key>hash2</key>'
- ' <data>'
- ' Zwi4siUsWBfiFCqMSoGLRGO4Iv2JHkNlg2hsGynMBho='
- ' </data>'
- ' </dict>'
- ' <key>MacOS/MyApp.app.dSYM/Contents/Resources/DWARF/MyApp</key>'
- ' <dict>'
- ' <key>hash2</key>'
- ' <data>'
- ' 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
- ' </data>'
- ' </dict>'
- ' <key>MacOS/MyApp.app.dSYM/Contents/Resources/Relocations/aarch64/MyApp.yml</key>'
- ' <dict>'
- ' <key>hash2</key>'
- ' <data>'
- ' 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='
- ' </data>'
- ' </dict>'
- ' </dict>'
- ' <key>rules</key>'
- ' <dict>'
- ' <key>^Resources/</key>'
- ' <true/>'
- ' <key>^Resources/.*/.lproj/</key>'
- ' <dict>'
- ' <key>optional</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>1000</real>'
- ' </dict>'
- ' <key>^Resources/.*/.lproj/locversion.plist$</key>'
- ' <dict>'
- ' <key>omit</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>1100</real>'
- ' </dict>'
- ' <key>^Resources/Base/.lproj/</key>'
- ' <dict>'
- ' <key>weight</key>'
- ' <real>1010</real>'
- ' </dict>'
- ' <key>^version.plist$</key>'
- ' <true/>'
- ' </dict>'
- ' <key>rules2</key>'
- ' <dict>'
- ' <key>.*/.dSYM($|/)</key>'
- ' <dict>'
- ' <key>weight</key>'
- ' <real>11</real>'
- ' </dict>'
- ' <key>^(.*/)?/.DS_Store$</key>'
- ' <dict>'
- ' <key>omit</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>2000</real>'
- ' </dict>'
- ' <key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>'
- ' <dict>'
- ' <key>nested</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>10</real>'
- ' </dict>'
- ' <key>^.*</key>'
- ' <true/>'
- ' <key>^Info/.plist$</key>'
- ' <dict>'
- ' <key>omit</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>20</real>'
- ' </dict>'
- ' <key>^PkgInfo$</key>'
- ' <dict>'
- ' <key>omit</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>20</real>'
- ' </dict>'
- ' <key>^Resources/</key>'
- ' <dict>'
- ' <key>weight</key>'
- ' <real>20</real>'
- ' </dict>'
- ' <key>^Resources/.*/.lproj/</key>'
- ' <dict>'
- ' <key>optional</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>1000</real>'
- ' </dict>'
- ' <key>^Resources/.*/.lproj/locversion.plist$</key>'
- ' <dict>'
- ' <key>omit</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>1100</real>'
- ' </dict>'
- ' <key>^Resources/Base/.lproj/</key>'
- ' <dict>'
- ' <key>weight</key>'
- ' <real>1010</real>'
- ' </dict>'
- ' <key>^[^/]+$</key>'
- ' <dict>'
- ' <key>nested</key>'
- ' <true/>'
- ' <key>weight</key>'
- ' <real>10</real>'
- ' </dict>'
- ' <key>^embedded/.provisionprofile$</key>'
- ' <dict>'
- ' <key>weight</key>'
- ' <real>20</real>'
- ' </dict>'
- ' <key>^version/.plist$</key>'
- ' <dict>'
- ' <key>weight</key>'
- ' <real>20</real>'
- ' </dict>'
- ' </dict>'
- </dict>
- </plist>
- ''
```