Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use iosrtc plugin on Mac M1 arm64 #697

Open
3 tasks done
rsjunior opened this issue Jul 13, 2021 · 12 comments
Open
3 tasks done

Unable to use iosrtc plugin on Mac M1 arm64 #697

rsjunior opened this issue Jul 13, 2021 · 12 comments

Comments

@rsjunior
Copy link

rsjunior commented Jul 13, 2021

YOU MUST read first!

Please use Community Forum for general technical discussions and questions.

  • I have used Google with the error message or bug in association with the library and Cordova words to make sure the issue I'm reporting is only related to iOSRTC.
  • I have provided steps to reproduce (e.g. using sample app code https://github.com/cordova-rtc/cordova-plugin-iosrtc-sample or updated extra/renderer-and-libwebrtc-tests.js file).
  • I have provided versions of third party library name, ios, Xcode and plugin version and adapter.js version if used.

Note: If the checkboxes above are not checked (which you do after the issue is posted), the issue will be closed, removing this checkbox will result in automatic closed issue.

Versions affected

  • Cordova version (e.g 7.1.0): 10.0.0
  • Cordova iOS version (e.g 5.1.0): 6.2.0
  • Plugin version (e.g 6.0.12): 6.0.21
  • iOS version (e.g 10.2): 14.5
  • Xcode version (e.g 11.1 - 11A1027): 12.5.1
  • WebRTC-adapter version (e.g. 7.4.0): latest
  • WebRTC Framework version (e.g. JSSip 3.1.2):

Description

Build fail on Mac M1

Steps to reproduce

Create blank Ionic project
ionic cordova plugin add cordova-plugin-iosrtc
ionic cordova platform add ios
ionic cordova build ios (for emulators)
ionic cordova build ios --prod --release (for production)
Both build commands generate same error
Same steps works without adding iosrtc plugin

Expected results

Build successfull

Actual results

ld: warning: Could not find or use auto-linked framework 'WebRTC' Undefined symbols for architecture arm64: "_OBJC_CLASS_$_RTCCameraVideoCapturer", referenced from: objc-class-ref in PluginRTCVideoCaptureController.o "_OBJC_CLASS_$_RTCEAGLVideoView", referenced from: objc-class-ref in PluginMediaStreamRenderer.o "_OBJC_CLASS_$_RTCMediaStreamTrack", referenced from: objc-class-ref in PluginMediaStream.o "_OBJC_CLASS_$_RTCDataChannelConfiguration", referenced from: objc-class-ref in PluginRTCDataChannel.o "_OBJC_CLASS_$_RTCDataBuffer", referenced from: objc-class-ref in PluginRTCDataChannel.o "_OBJC_CLASS_$_RTCMediaConstraints", referenced from: objc-class-ref in PluginRTCPeerConnectionConstraints.o "_OBJC_CLASS_$_RTCMediaStream", referenced from: objc-class-ref in PluginRTCPeerConnection.o "_OBJC_CLASS_$_RTCIceServer", referenced from: objc-class-ref in PluginRTCPeerConnectionConfig.o "_OBJC_CLASS_$_RTCConfiguration", referenced from: objc-class-ref in PluginRTCPeerConnectionConfig.o "_OBJC_CLASS_$_RTCIceCandidate", referenced from: objc-class-ref in PluginRTCPeerConnection.o "_OBJC_CLASS_$_RTCSessionDescription", referenced from: objc-class-ref in PluginRTCPeerConnection.o "_kRTCVp8CodecName", referenced from: CondHouse_Gestão_de_Condomínios.iosrtcPlugin.(initPeerConnectionFactory in _AC323BD484FEC511553C8A2ECB08B1FB)() -> () in iosrtcPlugin.o "_OBJC_CLASS_$_RTCVideoCodecInfo", referenced from: objc-class-ref in iosrtcPlugin.o "_OBJC_CLASS_$_RTCDefaultVideoDecoderFactory", referenced from: objc-class-ref in iosrtcPlugin.o "_OBJC_CLASS_$_RTCDefaultVideoEncoderFactory", referenced from: objc-class-ref in iosrtcPlugin.o "_OBJC_CLASS_$_RTCPeerConnectionFactory", referenced from: objc-class-ref in iosrtcPlugin.o "_OBJC_CLASS_$_RTCVideoTrack", referenced from: objc-class-ref in iosrtcPlugin.o objc-class-ref in PluginMediaStream.o objc-class-ref in PluginMediaStreamRenderer.o "_OBJC_CLASS_$_RTCLegacyStatsReport", referenced from: objc-class-ref in PluginRTCPeerConnection.o "_OBJC_CLASS_$_RTCAudioTrack", referenced from: objc-class-ref in iosrtcPlugin.o objc-class-ref in PluginMediaStream.o objc-class-ref in PluginMediaStreamRenderer.o "_kRTCH264CodecName", referenced from: CondHouse_Gestão_de_Condomínios.iosrtcPlugin.(initPeerConnectionFactory in _AC323BD484FEC511553C8A2ECB08B1FB)() -> () in iosrtcPlugin.o "_kRTCVp9CodecName", referenced from: CondHouse_Gestão_de_Condomínios.iosrtcPlugin.(initPeerConnectionFactory in _AC323BD484FEC511553C8A2ECB08B1FB)() -> () in iosrtcPlugin.o "_OBJC_CLASS_$_RTCRtpSender", referenced from: objc-class-ref in PluginRTCPeerConnection.o objc-class-ref in PluginRTCDTMFSender.o "_RTCInitializeSSL", referenced from: CondHouse_Gestão_de_Condomínios.iosrtcPlugin.pluginInitialize() -> () in iosrtcPlugin.o ld: symbol(s) not found for architecture arm64

@rsjunior
Copy link
Author

I got this error on extract command

image

@hthetiot
Copy link
Contributor

hthetiot commented Jul 22, 2021

arm64 is here : https://github.com/cordova-rtc/cordova-plugin-iosrtc/tree/master/lib/WebRTC.xcframework/ios-arm64_armv7/WebRTC.framework

if you script crash like that because this is for version prior iosrtc moved to "WebRTC.xcframework" (.xcframework) that is multi-architecture now since couple of versions, your issue most-likely lies into your Xcode settings.

@hthetiot hthetiot changed the title This plugin works on Mac M1? Unable to use iosrtc plugin on Mac M1 arm64 Jul 22, 2021
@hthetiot hthetiot added this to the triage milestone Jul 22, 2021
@hthetiot
Copy link
Contributor

Did you try to use rosetta emulation?

@khalid-valed
Copy link

@hthetiot

Did you try to use rosetta emulation?

yes still no luck via rosetta xcode (i am having the same issue with same stack cordova etc yara yara with M1 chip )

@khalid-valed
Copy link

Got the command from console log & here is the result
Screen Shot 2021-08-06 at 21 32 50

@hthetiot
Copy link
Contributor

hthetiot commented Aug 8, 2021

@khalid-valed i said earlier that we use .xcframework lipo or extract script is only used on old versions.

https://medium.com/trueengineering/xcode-and-xcframeworks-new-format-of-packing-frameworks-ca15db2381d3

@khalid-valed
Copy link

Did you try to use rosetta emulation?

@hthetiot sorry my bad. Running via rosette actually did the trick. Previously i guess i had issue with caching or something. I started clean project and got successfully built with rosette emulator. Thanks for the great project. I definitely owe you coffee )

@webbpage
Copy link

For Mac Catalyst I'm receiving "GLKit is deprecated and is not available when building for Mac" and "OpenGLES is deprecated and is not available when building for Mac" Errors. Any chance either of you could provide more insight on what you're doing to get around these errors for mac? Everything works great for iOS.

@hthetiot
Copy link
Contributor

For Mac Catalyst I'm receiving "GLKit is deprecated and is not available when building for Mac" and "OpenGLES is deprecated and is not available when building for Mac" Errors. Any chance either of you could provide more insight on what you're doing to get around these errors for mac? Everything works great for iOS.

There is no plan for macOs support.

@webbpage
Copy link

@hthetiot how many hours do you estimate for MacOS Capacitor support? I'd like to make a contribution to this effort. Also, please reach out to me via gbwebb at outlook dot com i have a feeling a paid hour webex with you would get me past my ios headache.

@hthetiot hthetiot reopened this Feb 11, 2023
@hthetiot
Copy link
Contributor

@webbpage

how many hours do you estimate for MacOS Capacitor support?

I have no idea, ideally I would need to continue #748 and #427 to use the latest webrtc lib to facilitate the support for MacOS and Metal.

Also, please reach out to me via gbwebb at outlook dot com i have a feeling a paid hour webex with you would get me past my ios headache.

Email sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants