mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(ios): Embed XCFrameworks to zip
NPM doesn't support symlinks and as a workaround we're embedding all XCFrameworks in a zip archive and extracting them with a postinstall script
This commit is contained in:
@@ -14,9 +14,12 @@ echo "Build iOS"
|
||||
cd ios
|
||||
./build.sh
|
||||
cd ..
|
||||
echo "Copy ios/TNSWidgets/build/*.framework dist/package/platforms/ios"
|
||||
|
||||
cp -R ios/TNSWidgets/build/TNSWidgets.xcframework dist/package/platforms/ios
|
||||
echo "Zip ios/TNSWidgets/build/*.xcframework to dist/package/platforms/ios"
|
||||
(
|
||||
XCFRAMEWORKS_ZIPFILENAME="$PWD/dist/package/platforms/ios/XCFrameworks.zip"
|
||||
cd ios/TNSWidgets/build
|
||||
zip -q -r --symlinks $XCFRAMEWORKS_ZIPFILENAME *.xcframework
|
||||
)
|
||||
|
||||
cp ios/TNSWidgets/build/*.framework.dSYM.zip dist/package/platforms/ios
|
||||
|
||||
@@ -38,4 +41,4 @@ else
|
||||
cd ../..
|
||||
mv dist/package/$PACKAGE dist/$PACKAGE
|
||||
echo "Output: dist/$PACKAGE"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
"version": "6.1.0",
|
||||
"description": "Native widgets used in the NativeScript framework.",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"postinstall": "(set -e; cd platforms/ios; unzip -q XCFrameworks.zip; rm XCFrameworks.zip)"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user