Skip to content

Latest commit

 

History

History
executable file
·
36 lines (29 loc) · 828 Bytes

codesign-frameworks.sh

File metadata and controls

executable file
·
36 lines (29 loc) · 828 Bytes
 
1
2
#!/bin/sh
Jul 8, 2014
Jul 8, 2014
3
# WARNING: You may have to run Clean in Xcode after changing CODE_SIGN_IDENTITY!
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Verify that $CODE_SIGN_IDENTITY is set
if [ -z "$CODE_SIGN_IDENTITY" ] ; then
echo "CODE_SIGN_IDENTITY needs to be non-empty for codesigning frameworks!"
if [ "$CONFIGURATION" = "Release" ] ; then
exit 1
else
# Codesigning is optional for non-release builds.
exit 0
fi
fi
FRAMEWORK_DIR="${TARGET_BUILD_DIR}"
# Loop through all frameworks
Jul 8, 2014
Jul 8, 2014
20
FRAMEWORKS=`find "${FRAMEWORK_DIR}" -type d -name "*.framework"`
21
22
23
24
25
RESULT=$?
if [[ $RESULT != 0 ]] ; then
exit 1
fi
Jul 8, 2014
Jul 8, 2014
26
echo "Found: ${FRAMEWORKS}"
27
28
29
30
31
32
33
34
35
36
for FRAMEWORK in $FRAMEWORKS;
do
echo "Signing '${FRAMEWORK}'"
`codesign -f -v -s "${CODE_SIGN_IDENTITY}" "${FRAMEWORK}"`
RESULT=$?
if [[ $RESULT != 0 ]] ; then
exit 1
fi
done