Podfile
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
source 'https://github.com/CocoaPods/Specs.git'
target 'YH_Vendor' do
pod 'React', :subspecs => [
'Core',
'RCTActionSheet',
'RCTImage',
'RCTNetwork',
'RCTText',
'RCTWebSocket',
'RCTPushNotification',
'RCTLinkingIOS',
'RCTVibration',
], :path => '../node_modules/react-native'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
end
# Start the React Native JS packager server when running the project in Xcode.
start_packager = %q(
if nc -w 5 -z localhost 8081 ; then
if ! curl -s "http://localhost:8081/status" | grep -q "packager-status:running" ; then
echo "Port 8081 already in use, packager is either not running or not running correctly"
exit 2
fi
else
open $SRCROOT/../../node_modules/react-native/packager/launchPackager.command || echo "Can't start packager automatically"
fi
)
post_install do |installer|
target = installer.pods_project.targets.select{|t| 'React' == t.name}.first
phase = target.new_shell_script_build_phase('Run Script')
phase.shell_script = start_packager
end