Skip to content

Instantly share code, notes, and snippets.

@sryze
Created December 16, 2018 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sryze/fd5968fe4e130b73a6fd7585f0bc36a5 to your computer and use it in GitHub Desktop.
Save sryze/fd5968fe4e130b73a6fd7585f0bc36a5 to your computer and use it in GitHub Desktop.
Suppress "Update to recommended settings" warnings in Xcode projects of third-party React Native packages
#!/bin/sh
# Add this to your postinstall script in package.json:
# "scripts": {
# "postinstall": "path/to/patch-xcode-projects.sh"
# }
if [[ "$(uname -a)" = *"Darwin"* ]]; then
echo "Patching Xcode projects"
for project in $(find node_modules -name '*.pbxproj'); do
sed -i '' -e 's/LastUpgradeCheck = .*;/LastUpgradeCheck = 9999;/g' "$project"
sed -i '' -e 's/RUN_CLANG_STATIC_ANALYZER = YES;/RUN_CLANG_STATIC_ANALYZER = NO;/g' "$project"
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment