0
votes

Following the How To Get Started section for SignalR-ObjC repo, I'm getting the following error when I build the SignalR.Samples.iOS project:

Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SRWebSocket", referenced from: objc-class-ref in libSignalR.Client.iOS.a(SRWebSocketTransport.o) (maybe you meant: _OBJC_CLASS_$_SRWebSocketConnectionInfo, _OBJC_CLASS_$_SRWebSocketTransport ) "_OBJC_METACLASS_$_AFHTTPRequestOperation", referenced from: _OBJC_METACLASS_$_SRHTTPRequestOperation in libSignalR.Client.iOS.a(SRServerSentEventsTransport.o) "_OBJC_CLASS_$_AFJSONResponseSerializer", referenced from: objc-class-ref in libSignalR.Client.iOS.a(SRHttpBasedTransport.o) objc-class-ref in libSignalR.Client.iOS.a(SRServerSentEventsTransport.o) objc-class-ref in libSignalR.Client.iOS.a(SRLongPollingTransport.o) "_OBJC_CLASS_$_AFHTTPRequestOperation", referenced from: objc-class-ref in libSignalR.Client.iOS.a(SRHttpBasedTransport.o) _OBJC_CLASS_$_SRHTTPRequestOperation in libSignalR.Client.iOS.a(SRServerSentEventsTransport.o) objc-class-ref in libSignalR.Client.iOS.a(SRLongPollingTransport.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

To resolve this issue I have also checked this links :

But still the issue persists. How can I correct the following issue? (I am using XCode 6.1)

2
u check with device or simulatorSuhail kalathil
the message clearly says the simulator is the non-supported architecture in your case.holex
Suhail & holex -- I am using device iPhone5Guru

2 Answers

1
votes

The readme and sample are out of date with latest (as of this writing) Cocoapods/XCode (XCode 6.1/Yosemite). There are bunch of steps to clean all this up:

  • comment (or fix) _cancelled in AFURLConnectionOperation.m to fix the semantic issue error
  • Following this answer, do not override "Other Linker Flags". If it is bold, select it and press backspace, it should be back to its normal state. For me, it was -ObjC which I cleared.
  • Clear out OTHER_LD_FLAGS: take out -l"icucore" from Pods.SignalR.Client.iOS.debug.xcconfig (and/or ...release.xcconfig depending on what mode you're building against)
  • Clean > Build
1
votes

In my case I update pods File as below

platform :ios, '7.0' pod 'AFNetworking', '~> 2.4'

then I installed the dependencies in my project:

$ pod install

And at last follow the step suggested by @ Mrchief and it's work for me.