Search code examples
iosobjective-cwatchkitapple-watchwatchos-2

WatchConnectivity sendMessage:replyHandler: don't work when linker have flag -ObjC


I have project with some external libraries, this project use -ObjC linker flag for these libraries. Without -ObjC project will crash. And now i want to add support for Watch OS 2. But I have problem: until linker has flag -ObjC method -sendMessage:replyHandler: return error like

Error Domain=WCErrorDomain Code=7014 "Payload could not be delivered." UserInfo={NSLocalizedDescription=Payload could not be delivered.}

I can't delete this flag (-ObjC), but with it my watch doesn't work. If user tap at button I will need send some info to my iPhone. And with another ways sending info I have problems too. System add messages into queue and keep them forever. Anybody have ideas ?


Solution

  • I found reason ! It was Appodeal framework v0.10.2, I attached Applodeal v0.10.3 and now my watch code worked fine.