File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change 2121 " src" ,
2222 " lib" ,
2323 " android" ,
24+ " ios" ,
2425 " cpp" ,
2526 " *.podspec" ,
2627 " react-native.config.js" ,
28+ " ios/**.xcframework" ,
29+ " !ios/build" ,
2730 " !android/build" ,
2831 " !android/gradle" ,
2932 " !android/gradlew" ,
5154 "bare:ios:device" : " yarn install && yarn prepare && yarn bare:example ios:device" ,
5255 "bare:android" : " yarn install && yarn prepare && yarn bare:example android" ,
5356 "bare:android:device" : " yarn install && yarn prepare && yarn bare:example android:device" ,
54- "prepare" : " bob build" ,
57+ "prepare" : " ./setup.sh && bob build" ,
5558 "typecheck" : " tsc" ,
5659 "lint" : " eslint \" **/*.{js,ts,tsx}\" " ,
5760 "release" : " release-it --only-version" ,
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Download CloudSync.xcframework for iOS if it doesn't exist
4+ # This script is run during `yarn prepare`
5+
6+ set -e
7+
8+ ROOT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
9+ IOS_DIR=" $ROOT_DIR /ios"
10+ XCFRAMEWORK_DIR=" $IOS_DIR /CloudSync.xcframework"
11+
12+ # Read version from package.json
13+ VERSION=$( node -p " require('$ROOT_DIR /package.json').version" )
14+
15+ if [ -d " $XCFRAMEWORK_DIR " ]; then
16+ echo " [sqlite-sync] CloudSync.xcframework already exists, skipping download"
17+ exit 0
18+ fi
19+
20+ echo " [sqlite-sync] Downloading CloudSync.xcframework v${VERSION} ..."
21+
22+ # Create ios directory if it doesn't exist
23+ mkdir -p " $IOS_DIR "
24+
25+ # Download and extract
26+ DOWNLOAD_URL=" https://github.com/sqliteai/sqlite-sync-dev/releases/download/${VERSION} /cloudsync-apple-xcframework-${VERSION} .zip"
27+ TEMP_ZIP=" $IOS_DIR /cloudsync.zip"
28+
29+ curl -L -o " $TEMP_ZIP " " $DOWNLOAD_URL "
30+ unzip -o " $TEMP_ZIP " -d " $IOS_DIR "
31+ rm " $TEMP_ZIP "
32+
33+ echo " [sqlite-sync] CloudSync.xcframework downloaded successfully"
You can’t perform that action at this time.
0 commit comments