diff --git a/src/mavsdk_server/tools/package_mavsdk_server_framework.bash b/src/mavsdk_server/tools/package_mavsdk_server_framework.bash index 8a687c99a..b31c71e81 100644 --- a/src/mavsdk_server/tools/package_mavsdk_server_framework.bash +++ b/src/mavsdk_server/tools/package_mavsdk_server_framework.bash @@ -9,6 +9,7 @@ IOS_SIM_X64_BACKEND_DIR=${BUILD_DIR}/ios_simulator_x64/src/mavsdk_server/src IOS_SIM_ARM64_BACKEND_DIR=${BUILD_DIR}/ios_simulator_arm64/src/mavsdk_server/src MACOS_X64_BACKEND_DIR=${BUILD_DIR}/macos_x64/src/mavsdk_server/src MACOS_ARM64_BACKEND_DIR=${BUILD_DIR}/macos_arm64/src/mavsdk_server/src +MACOS_FAT_BACKEND_DIR=${BUILD_DIR}/macos/src/mavsdk_server/src if [ -d ${BUILD_DIR}/mavsdk_server.xcframework ]; then echo "${BUILD_DIR}/mavsdk_server.xcframework already exists! Aborting..." @@ -21,13 +22,18 @@ ln -sf Versions/Current/Modules ${MACOS_X64_BACKEND_DIR}/mavsdk_server.framework # REMOVEME again tree . +xcrun lipo -create -output ${MACOS_FAT_BACKEND_DIR}/mavsdk_server.framework \ + ${MACOS_X64_BACKEND_DIR}/mavsdk_server.framework \ + ${MACOS_ARM64_BACKEND_DIR}/mavsdk_server.framework + +xcrun codesign --sign - ${MACOS_FAT_BACKEND_DIR}/mavsdk_server.framework + echo "Creating xcframework..." xcodebuild -create-xcframework \ -framework ${IOS_BACKEND_DIR}/mavsdk_server.framework \ -framework ${IOS_SIM_X64_BACKEND_DIR}/mavsdk_server.framework \ -framework ${IOS_SIM_ARM64_BACKEND_DIR}/mavsdk_server.framework \ - -framework ${MACOS_X64_BACKEND_DIR}/mavsdk_server.framework \ - -framework ${MACOS_ARM64_BACKEND_DIR}/mavsdk_server.framework \ + -framework ${MACOS_FAT_BACKEND_DIR}/mavsdk_server.framework \ -output ${BUILD_DIR}/mavsdk_server.xcframework # REMOVEME again