Skip to content

Commit ff5a345

Browse files
committed
Added pod prep
1 parent 0a33d52 commit ff5a345

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

bin/cocoapods.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/sh
2+
3+
## https://github.com/auth0/react-native-lock/blob/master/bin/cocoapods.sh
4+
5+
ios_dir=`pwd`/ios
6+
if [ -d ios_dir ]
7+
then
8+
exit 0
9+
fi
10+
11+
podfile="$ios_dir/Podfile"
12+
template=`pwd`/node_modules/react-native-oauth/ios/Podfile.template
13+
14+
echo "Checking Podfile in iOS project ($podfile)"
15+
16+
if [ -f $podfile ]
17+
then
18+
echo ""
19+
echo "Found an existing Podfile, Do you want to override it? [N/y]"
20+
read generate_env_file
21+
22+
if [ "$generate_env_file" != "y" ]
23+
then
24+
25+
echo "Add the following pods":
26+
echo ""
27+
echo ""
28+
cat $template
29+
echo ""
30+
echo ""
31+
echo "and run 'pod install' to install OAuth for iOS"
32+
exit 0
33+
fi
34+
35+
rm -f $podfile
36+
rm -f "$podfile.lock"
37+
fi
38+
39+
echo "Adding Podfile to iOS project"
40+
41+
cd ios
42+
pod init >/dev/null 2>&1
43+
cat $template >> $podfile
44+
cd ..
45+
46+
echo "Installing Pods"
47+
48+
pod install --project-directory=ios

bin/prepare.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
## https://github.com/auth0/react-native-lock/blob/master/bin/prepare.sh
4+
5+
echo "Preparing to link react-native-firestack for iOS"
6+
7+
echo "Checking CocoaPods..."
8+
has_cocoapods=`which pod >/dev/null 2>&1`
9+
if [ -z "$has_cocoapods" ]
10+
then
11+
echo "CocoaPods already installed"
12+
else
13+
echo "Installing CocoaPods..."
14+
gem install cocoapods
15+
fi

ios/Podfile.template

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source 'https://github.com/CocoaPods/Specs.git'
2+
platform :ios, '8.0'
3+
use_frameworks!
4+
5+
pod 'OAuthSwift'

0 commit comments

Comments
 (0)