Agora-Unity-Quickstart icon indicating copy to clipboard operation
Agora-Unity-Quickstart copied to clipboard

Unity Cloud Build Failure because of Linked Frameworks

Open mali90 opened this issue 2 years ago • 1 comments

Hi,

I recently updated to version 4.0.0 of Video SDK, and version 1.0.5 of ChatSDK for our Unity app. I'm using Unity Cloud Build for both iOS and Android, and my iOS builds are failing with the following errors:

Building for iOS, but the embedded framework 'HyphenateChat.framework' was built for iOS + iOS Simulator. Building for iOS, but the embedded framework 'AgoraRtcWrapper.framework' was built for iOS + iOS Simulator.

My Unity version: 2021.3.5f1

Can someone please help solve this?

mali90 avatar Oct 18 '22 10:10 mali90

if you have a apple computer. you can find AgoraRtcWrapper.framework file in this path: /Assets/Agora-RTC-Plugin/Agora-Unity-RTC-SDK/Plugins/iOS/AgoraRtcKit.framework. And you can find file AgoraRtcWrapper in this folder 0. open terminal

  1. input int terminal "cd /Assets/Agora-RTC-Plugin/Agora-Unity-RTC-SDK/Plugins/iOS/AgoraRtcKit.framework" and press enter
  2. input int terminal "file AgoraRtcWrapper" and press enter then you can see message like this

"AgoraRtcWrapper: Mach-O universal binary with 3 architectures: [arm_v7:Mach-O dynamically linked shared library arm_v7Mach-O dynamically linked shared library arm_v7] [x86_64] [arm64] AgoraRtcWrapper (for architecture armv7): Mach-O dynamically linked shared library arm_v7 AgoraRtcWrapper (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64 AgoraRtcWrapper (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64 "

there is a "or architecture x86_64" this is iOS Simulator.architecture

  1. input int terminal "lipo -remove x86_64 AgoraRtcWrapper -output AgoraRtcWrapper" and press enter 4.input int terminal "file AgoraRtcWrapper" and press enter again then you can see message like this

"AgoraRtcWrapper: Mach-O universal binary with 2 architectures: [arm_v7:Mach-O dynamically linked shared library arm_v7Mach-O dynamically linked shared library arm_v7] [arm64] AgoraRtcWrapper (for architecture armv7): Mach-O dynamically linked shared library arm_v7 AgoraRtcWrapper (for architecture arm64): Mach-O 64-bit dynamically linked shared library arm64"

5.this is mean we remove iOS Simulator architecture from AgoreRtcWrapper.framework success.

you can do the same thing with HyphenateChat.framework. and I think you can build ios success

xiayangqun avatar Oct 18 '22 11:10 xiayangqun

@xiayangqun "file AgoraRtcWrapper" and press enter after that its show me just ASCII text in output

tusharRule14 avatar Jun 21 '24 07:06 tusharRule14

@tusharRule14 Can you show what show in output?

xiayangqun avatar Jun 21 '24 07:06 xiayangqun

yes pls check attachment Screenshot 2024-06-21 at 1 21 25 PM

tusharRule14 avatar Jun 21 '24 07:06 tusharRule14

actually my error is in xcode is = ld: multiple errors: unknown file type in '/Users/tusharchaudhari/Documents/ios build/Frameworks/Agora-RTC-Plugin/Agora-Unity-RTC-SDK/Plugins/iOS/AgoraRtcWrapper.framework/AgoraRtcWrapper'; unknown file type in '/Users/tusharchaudhari/Documents/ios build/Frameworks/Agora-RTC-Plugin/Agora-Unity-RTC-SDK/Plugins/iOS/AgoraRtcKit.framework/AgoraRtcKit'; unknown file type in '/Users/tusharchaudhari/Documents/ios build/Frameworks/Agora-RTC-Plugin/Agora-Unity-RTC-SDK/Plugins/iOS/Agoraffmpeg.framework/Agoraffmpeg'; unknown file type in '/Users/tusharchaudhari/Documents/ios build/Frameworks/TRTCSDK/SDK/Plugins/iOS/TXLiteAVSDK_TRTC.framework/TXLiteAVSDK_TRTC' clang: error: linker command failed with exit code 1 (use -v to see invocation)

tusharRule14 avatar Jun 21 '24 07:06 tusharRule14

It seems that your file is damaged. Can you use the same method to check if the files in your Unity Editor are working properly? They are generally stored in the Assets/Agora RTC Plugin/Agora Unity RTC-SDK/Plugins/iOS folder.

If they are damaged, we suggest that you re import the SDK

xiayangqun avatar Jun 21 '24 08:06 xiayangqun