Skip to content

Commit

Permalink
👷 Slim apple artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Oct 27, 2023
1 parent 6010ce3 commit 3227490
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 52 deletions.
13 changes: 0 additions & 13 deletions ios/Frameworks/AgentDart.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>libagent_dart.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
Expand Down
Binary file not shown.
27 changes: 0 additions & 27 deletions macos/Frameworks/AgentDart.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,6 @@
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>libagent_dart.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>libagent_dart.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
Expand Down
Binary file not shown.
Binary file not shown.
30 changes: 18 additions & 12 deletions scripts/build_apple.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,39 @@ PLUGIN_NAME="AgentDartPlugin"
FRAMEWORK="AgentDart.xcframework"
LIB_NAME="libagent_dart.a"

mkdir ios-lipo ios-sim-lipo mac-lipo
mkdir ios-lipo ios-sim-lipo
IOS_LIPO="ios-lipo/${LIB_NAME}"
IOS_SIM_LIPO="ios-sim-lipo/${LIB_NAME}"
MAC_LIPO="mac-lipo/${LIB_NAME}"
IOS_FRAMEWORK="ios_${FRAMEWORK}"

lipo -create -output $IOS_LIPO \
"${TARGET_DIR}/aarch64-apple-ios/release/${LIB_NAME}"
lipo -create -output $IOS_SIM_LIPO \
"${TARGET_DIR}/aarch64-apple-ios-sim/release/${LIB_NAME}" \
"${TARGET_DIR}/x86_64-apple-ios/release/${LIB_NAME}"
xcodebuild -create-xcframework \
-library $IOS_LIPO \
-library $IOS_SIM_LIPO \
-output $IOS_FRAMEWORK
zip -r $IOS_FRAMEWORK.zip $IOS_FRAMEWORK
cp -f $IOS_FRAMEWORK.zip "../ios/Frameworks/${RELEASE_ARCHIVE_NAME}.zip"
cp -r -f $IOS_FRAMEWORK ../ios/Frameworks

mkdir mac-lipo
MAC_LIPO="mac-lipo/${LIB_NAME}"
MAC_FRAMEWORK="macos_${FRAMEWORK}"
lipo -create -output $MAC_LIPO \
"${TARGET_DIR}/aarch64-apple-darwin/release/${LIB_NAME}" \
"${TARGET_DIR}/x86_64-apple-darwin/release/${LIB_NAME}"
xcodebuild -create-xcframework \
-library $IOS_LIPO \
-library $IOS_SIM_LIPO \
-library $MAC_LIPO \
-output $FRAMEWORK

zip -r $FRAMEWORK.zip $FRAMEWORK
cp -f $FRAMEWORK.zip "../ios/Frameworks/${RELEASE_ARCHIVE_NAME}.zip"
cp -r -f $FRAMEWORK ../ios/Frameworks
cp -f $FRAMEWORK.zip "../macos/Frameworks/${RELEASE_ARCHIVE_NAME}.zip"
cp -r -f $FRAMEWORK ../macos/Frameworks
-output $MAC_FRAMEWORK
zip -r $MAC_FRAMEWORK.zip $IOS_FRAMEWORK
cp -f $MAC_FRAMEWORK.zip "../macos/Frameworks/${RELEASE_ARCHIVE_NAME}.zip"
cp -r -f $MAC_FRAMEWORK ../macos/Frameworks

# Cleanup
rm -rf ios-lipo ios-sim-lipo mac-lipo $FRAMEWORK
rm -rf ios-lipo ios-sim-lipo mac-lipo $IOS_FRAMEWORK $MAC_FRAMEWORK

# Copy headers
cd -
Expand Down

0 comments on commit 3227490

Please sign in to comment.