forked from AgoraIO-Extensions/react-native-agora
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·26 lines (19 loc) · 774 Bytes
/
install.sh
File metadata and controls
executable file
·26 lines (19 loc) · 774 Bytes
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
zipName="AgoraRtcSDK"
temp="/var/tmp"
libs="ios/RCTAgora/Libs"
mkdir -p $temp
version=$(grep "AgoraRtcEngine_iOS" react-native-agora.podspec | grep -o '\d.\d.\d' | sed 's/\./_/g')
echo $zipName "$version"
if [ ! -f $temp/$zipName"$version".zip ]; then
echo "the zip file not exists, start downloading..."
curl -o $temp/$zipName"$version".zip "https://download.agora.io/sdk/release/Agora_Native_SDK_for_iOS_v${version}_FULL.zip"
fi
echo "start unzip SDK..."
unzip -o -q $temp/$zipName"$version".zip "**/libs/*" -d $temp/$zipName"$version"
echo "start transfer dynamic framework to $libs..."
rm -rf $libs
mkdir -p $libs
for framework in $(find $temp/$zipName"$version" -maxdepth 5 -iname '*.xcframework'); do
mv -f "$framework" $libs
done
echo "install finished"