Last active
January 5, 2016 07:59
-
-
Save jtomaszewski/3229031e352730b0bab0 to your computer and use it in GitHub Desktop.
hooks/after_platform_add/015-disable_bitcode_on_ios.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Exit, if there's no ios here. | |
[[ $CORDOVA_PLATFORMS == *"ios"* ]] || exit 0 | |
# This is needed until https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1116 gets fixed. | |
XCCONFIG_FILE="platforms/ios/cordova/build.xcconfig" | |
if ! cat $XCCONFIG_FILE | grep -q "ENABLE_BITCODE"; then | |
echo "\nENABLE_BITCODE = NO" >> $XCCONFIG_FILE | |
fi | |
PBXPROJ_FILE=$(ls platforms/ios/*.xcodeproj/project.pbxproj) | |
if ! cat $PBXPROJ_FILE | grep -q "ENABLE_BITCODE"; then | |
sed -i '' 's/\(GCC_VERSION = "";\)/\1\ ENABLE_BITCODE = NO;/g' $PBXPROJ_FILE | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the sed command script to miraculixx at http://stackoverflow.com/questions/30848208/new-warnings-in-ios9 .