blob: a57c9ac78b90e9c3aa16337e894313dad8728700 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# Add your paths into these arrays
KNOWN_IOS_SDK_PATHS=( \
/Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/
)
KNOWN_IOS_SDK_SIMULATOR_PATHS=( \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk \
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
)
# Prints path to directory with iOS SDK
# Pameter is configuration name: <debug|release|production|simulator>
# Returns 1 in case of not found and 0 in case of success
PrintIOSSDKPath() {
PATHS_ARRAY="${KNOWN_IOS_SDK_PATHS[@]}"
if [[ $1 == "simulator" ]]; then
for path in "${KNOWN_IOS_SDK_SIMULATOR_PATHS[@]}"; do
if [ -d "${path}" ]; then
echo "${path}"
return 0
fi
done
else
for path in "${KNOWN_IOS_SDK_PATHS[@]}"; do
if [ -d "${path}" ]; then
echo "${path}"
return 0
fi
done
fi
# Not found
return 1
}
|