Skip to content

Commit c3033d9

Browse files
tmolitor-stud-tustasel
authored andcommitted
Fix catalyst builds, fixes webrtc-sdk#44
Using WebRTC with catalyst results in this error: "codesign failed: bundle format is ambiguous (could be app or framework)" It turns out this is because of a missing symlink in "ios-x86_64_arm64-maccatalyst/WebRTC.framework": WebRTC should be symlinked to point to "Versions/Current/WebRTC". The binary at "Versions/Current/WebRTC" on the other hand is the wrong one (no multi arch) and should be removed in favor of "ios-x86_64_arm64-maccatalyst/WebRTC.framework/WebRTC" This PR executes this whole shell game.
1 parent e774976 commit c3033d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,11 @@ if [ "$MAC_CATALYST" = true ]; then
180180
plist_add_architecture $LIB_COUNT "arm64"
181181

182182
cp -RP out/catalyst-x64/WebRTC.framework "${XCFRAMEWORK_DIR}/${CATALYST_LIB_IDENTIFIER}"
183-
lipo -create -output "${XCFRAMEWORK_DIR}/${CATALYST_LIB_IDENTIFIER}/WebRTC.framework/WebRTC" out/catalyst-x64/WebRTC.framework/WebRTC out/catalyst-arm64/WebRTC.framework/WebRTC
183+
# the next line is just to be sure (this could not be needed)
184+
rm "${XCFRAMEWORK_DIR}/${CATALYST_LIB_IDENTIFIER}/WebRTC.framework/Versions/A/WebRTC"
185+
lipo -create -output "${XCFRAMEWORK_DIR}/${CATALYST_LIB_IDENTIFIER}/WebRTC.framework/Versions/A/WebRTC" out/catalyst-x64/WebRTC.framework/WebRTC out/catalyst-arm64/WebRTC.framework/WebRTC
186+
# symlink the file to make xcode happy (error: codesign failed: bundle format is ambiguous (could be app or framework))
187+
ln -s "Versions/Current/WebRTC" "${XCFRAMEWORK_DIR}/${CATALYST_LIB_IDENTIFIER}/WebRTC.framework/WebRTC"
184188
LIB_COUNT=$((LIB_COUNT+1))
185189
fi
186190

0 commit comments

Comments
 (0)