diff --git a/.npmignore b/.npmignore index 62609afc..8d5f96d6 100644 --- a/.npmignore +++ b/.npmignore @@ -56,6 +56,7 @@ android/gradlew android/build android/gradlew.bat android/gradle/ +docs .idea coverage yarn.lock diff --git a/bin/cocoapods.sh b/bin/cocoapods.sh index e929140d..07e9a26f 100755 --- a/bin/cocoapods.sh +++ b/bin/cocoapods.sh @@ -1,7 +1,5 @@ #!/bin/sh -## https://github.com/auth0/react-native-lock/blob/master/bin/cocoapods.sh - ios_dir=`pwd`/ios if [ -d ios_dir ] then @@ -9,9 +7,11 @@ if [ -d ios_dir ] fi podfile="$ios_dir/Podfile" -template=`pwd`/node_modules/react-native-firebase/ios/Podfile.template +template=`pwd`/node_modules/react-native-firebase/Podfile.template -echo "Checking Podfile in iOS project ($podfile)" +project_name=$(node -pe "require('./package.json').name") + +echo "Checking Podfile in iOS project $project_name ($podfile)" if [ -f $podfile ] then @@ -21,22 +21,6 @@ if [ -f $podfile ] if [ "$generate_env_file" != "y" ] then - - # pod outdated | grep "The following pod updates are available:" - # status=$? - # if [ $status -eq 0 ]; then - # echo "From what I can tell, there look to be updates available..." - # echo "Do you want to update your cocoapods? [N/y]" - # read update_pods - # if [ "$update_pods" != "y" ] - # then - # pod update --project-directory=ios - # exit 0 - # else - # exit 0 - # fi - # fi - echo "Add the following pods": echo "" echo "" @@ -53,10 +37,26 @@ fi echo "Adding Podfile to iOS project" -cd ios -pod init >/dev/null 2>&1 -cat $template >> $podfile -cd .. +touch ios/Podfile +cat >ios/Podfile <