Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

Commit

Permalink
Cleanup bash hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
imhoffd committed Nov 13, 2015
1 parent 4e5dc38 commit 58530be
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
7 changes: 5 additions & 2 deletions ios9_allow_http.sh
@@ -1,14 +1,17 @@
#!/bin/bash

if [[ ! -f /usr/libexec/PlistBuddy ]]; then
exit 0
fi

PLIST=platforms/ios/*/*-Info.plist

cat << EOF |
Delete :NSAppTransportSecurity
Add :NSAppTransportSecurity dict
Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool YES
EOF
while read line
do
/usr/libexec/PlistBuddy -c "$line" $PLIST
done

true
33 changes: 18 additions & 15 deletions ios9_allow_native_fb.sh
@@ -1,26 +1,29 @@
#!/bin/bash

if [[ ! -f /usr/libexec/PlistBuddy ]]; then
exit 0
fi

PLIST=platforms/ios/*/*-Info.plist

# Bypass ATS for test servers
cat << EOF |
Delete :LSApplicationQueriesSchemes
Add :LSApplicationQueriesSchemes array
Add :LSApplicationQueriesSchemes:0 string 'fbapi'
Add :LSApplicationQueriesSchemes:1 string 'fbapi20130214'
Add :LSApplicationQueriesSchemes:2 string 'fbapi20130410'
Add :LSApplicationQueriesSchemes:3 string 'fbapi20130702'
Add :LSApplicationQueriesSchemes:0 string 'fbapi'
Add :LSApplicationQueriesSchemes:1 string 'fbapi20130214'
Add :LSApplicationQueriesSchemes:2 string 'fbapi20130410'
Add :LSApplicationQueriesSchemes:3 string 'fbapi20130702'
Add :LSApplicationQueriesSchemes:4 string 'fbapi20131010'
Add :LSApplicationQueriesSchemes:5 string 'fbapi20131219'
Add :LSApplicationQueriesSchemes:6 string 'fbapi20140410'
Add :LSApplicationQueriesSchemes:7 string 'fbapi20140116'
Add :LSApplicationQueriesSchemes:8 string 'fbapi20150313'
Add :LSApplicationQueriesSchemes:9 string 'fbapi20150629'
Add :LSApplicationQueriesSchemes:10 string 'fbauth'
Add :LSApplicationQueriesSchemes:11 string 'fbauth2'
Add :LSApplicationQueriesSchemes:5 string 'fbapi20131219'
Add :LSApplicationQueriesSchemes:6 string 'fbapi20140410'
Add :LSApplicationQueriesSchemes:7 string 'fbapi20140116'
Add :LSApplicationQueriesSchemes:8 string 'fbapi20150313'
Add :LSApplicationQueriesSchemes:9 string 'fbapi20150629'
Add :LSApplicationQueriesSchemes:10 string 'fbauth'
Add :LSApplicationQueriesSchemes:11 string 'fbauth2'
EOF
while read line
do
/usr/libexec/PlistBuddy -c "$line" $PLIST
/usr/libexec/PlistBuddy -c "$line" $PLIST
done

true

0 comments on commit 58530be

Please sign in to comment.