Skip to content

Instantly share code, notes, and snippets.

@jtomaszewski
Last active January 5, 2016 07:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtomaszewski/3229031e352730b0bab0 to your computer and use it in GitHub Desktop.
Save jtomaszewski/3229031e352730b0bab0 to your computer and use it in GitHub Desktop.
hooks/after_platform_add/015-disable_bitcode_on_ios.sh
#!/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
@jtomaszewski
Copy link
Author

Thanks for the sed command script to miraculixx at http://stackoverflow.com/questions/30848208/new-warnings-in-ios9 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment