Skip to content

Commit

Permalink
Create sign-examples.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
wtholliday committed May 27, 2023
1 parent 55a8506 commit 5761c2f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions sign-examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/zsh

# This re-signs the examples so they can be profiled with Instruments on macOS.
# See https://developer.apple.com/forums/thread/681687

# Make sure to set the shell to zsh, not bash
#
# For Instruments, re-sign binary with get-task-allow entitlement
codesign -s - -v -f --entitlements =(echo -n '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"\>
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>') target/debug/examples/*

0 comments on commit 5761c2f

Please sign in to comment.