pristineio / webrtc-build-scripts

A set of build scripts useful for building WebRTC libraries for Android and iOS.
BSD 3-Clause "New" or "Revised" License
1.13k stars 447 forks source link

Build error when using Cocoapods frameworks #90

Open josipbernat opened 9 years ago

josipbernat commented 9 years ago

Hi,

I've been using libjingle_peerconnection for some time using Cocoapods (pod 'libjingle_peerconnection', '~> 9024.2') and it worked fine. Now I'm having build error after I added pod which is written in Swift. That pod required using framework instead of static libraries (use_frameworks! command in Podfile). Now when I want to import files I'm getting "Could not build module 'libjingle_peerconnection'" build error.

Problem is that compiler wants to build RTCNSGLVideoView class which, of course, shouldn't be built. Do you know how can I remove that class for building? I've tried removing it from libjingle_peerconnection.framework pod target but it didn't help.

Please see attached screenshots for more details. Hope this helps and great job overall!

untitled1 untitled2

Ewg777 commented 9 years ago

I faced same issue. @josipbernat have you found any solution?

josipbernat commented 9 years ago

Unfortunately I didn't find solution. Previously I built library using this shell script https://github.com/lunastorm/webrtc-ios and I'm using that .framework until this problem isn't fixed.

evermeer commented 9 years ago

I'm having the same problem. I noticed that when using use_frameworks! that there will not be a dynamic link library for libjingle_peerconnection. could it be that it only has header files? maybe adding a fwdummy.m class can help?

wlaurance commented 9 years ago

Any update on this one? Thanks!

ridvank commented 9 years ago

Is there any solution for this issue?

robertcrabtree commented 9 years ago

Same issue here. Objective-c-based pods depending on static libraries can't be used in conjunction with swift based pods.

As fast as Swift is growing in popularity this is going to have to be looked at.

Ewg777 commented 9 years ago

https://github.com/otalk/iOS-demo/issues/10#issuecomment-107152292 helped me

thebehera commented 8 years ago

Working on this ASAP. Do we just need to publish a pod using a framework?

thebehera commented 8 years ago

it looks like frameworks cannot include static libraries. i think cocoapods has a bug but you can add webrtc to the root level. look at http://stackoverflow.com/questions/34553684/import-objective-c-framework-cocoapod-into-swift