HeimgardTechnologiesAS / cordova-plugin-advanced-websocket

MIT License
27 stars 18 forks source link

library not found for -lSocketRocket #6

Closed FernandoSoldera closed 6 years ago

FernandoSoldera commented 6 years ago

I installed the cocoaPod and the cordova-plugin-advanced-websocket following the instructions, after I try build the app I got this error:

ld: warning: directory not found for option '-L/Users/Library/Developer/Xcode/DerivedData/WEBRTC-bvcpjkekfmmeqvgsnyxadxpdmjwy/Build/Products/Debug-iphoneos/SocketRocket' ld: library not found for -lSocketRocket clang: error: linker command failed with exit code 1 (use -v to see invocation)

chax commented 6 years ago

SocketRocket is included as CocoaPod library as you can see here in plugin.xml: https://github.com/HomeControlAS/cordova-plugin-advanced-websocket/blob/a235415d5a149ed832e5e76d6d60effda2ed641c/plugin.xml#L52

When you open the project in xCode, you need to add that CocoaPod to your project as this is not done automatically by cordova/ionic scripts. Why it's not added directly to project but rather to the workspace is beyond me. That's why most cordova plugin developers avoid this issue by copying the whole source of some library to their plugin and don't use CocoaPods at all.