Open Kerugal opened 2 years ago
@Kerugal I have never tried to built UaaS with the webrtc library. I would like to know the more detailed that you determined the cause of issue is a name conflict?
Whether it's a name conflict, I don't know for sure - that was just a guess. However, since all components run individually, this was my first suspicion. WebRTC in a UaaL project also runs without errors. Only when I include "iosRTC" in the existing iOS project or visa versa does this error occur as soon as I switch to Unity - hence the assumption that there may be a name conflict.
As soon as I get back to the office, I'll send you some screenshots of my XCode project setup.
memo: WRS-156
In case it helps with reproduction - here are my findings so far:
iOS does not allow frameworks that call other frameworks, as is the case with Unity WebRTC + Uaal. See: https://developer.apple.com/library/archive/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-PROJ_CONFIG-APPS_WITH_DEPENDENCIES_BETWEEN_FRAMEWORKS
If the library is moved from the Unity directory to the Cordova project and called from there, the existing Cordova WebRTC.framework file is overwritten with the Unity webrtc.framework file and leads to a name conflict.
The next step is to run the build_plugin_ios script and change the naming there, but this is not executable due to an ARM64 error.
Regards Patrick
@Kerugal Thanks for sharing helpful information. Could you tell me more about "ARM64 error"?
At the moment we do not own an arm64 macOS. We think that this will cause errors in the script. At least that's what the script says. Next week we will build it on an arm64 Mac and hope that this will solve the problem. Cross-compiling, between x86 and arm64 has not worked so far
Small update: With the rebuilt and renamed WebRTC library, it now runs workaorund moderately.
@Kerugal I can't think of any good ideas for avoiding name conflict. Do you have any ideas?
I changed the output files in build_plugin_ios.sh to webrtcUnity.framework. Then executed each build process individually. Before building the archieve in Xcode I also changed the generated cmake files. In one file there was also a comment with the hint to rename. Afterwards the framework was mounted locally from the disk with changed names.
Certainly not a model solution, but as a workaround it worked, so that the two frameworks no longer get in each other's way.
@Kerugal Thank you for trying the workaround. Let us investigate if XCode offers a workaround other.
Setup: Unity as a library on iOS device. The existing code is compiled by Cordova. A plugin is used in Cordova https://github.com/cordova-rtc/cordova-plugin-iosrtc On Unity side Unity-Webrtc is used. All components build correctly as stand-alone and also as UaaL if WebRTC is not included in Unity. The following error message is thrown:
For the report production, a Corodva project with iosRTC + Unity as a Library with Unity WebRTC had to be set up.
Does the application have a name conflict with the iosRTC library? Should I integrate the library differently?
Environment
Many many Thanks Patrick