pusher/libPusher

Push lib crashes

Closed this issue · 3 comments

Sometimes lib crashes the whole app when you trying to send 2 commands like this:

[[_client nativePusher] registerWithDeviceToken:deviceToken];
[[_client nativePusher] subscribe:@"all"];

Crash is on this line in PTNativePusher.m:
[outbox removeObjectAtIndex:0];

I imagine it's related to this: #230

You can use pusher-websocket-swift with either Swift or Objective-C and that has support for native push notifications (and no thread safety problems!)

I made a small fix, it works for me. Please check my pull request #244 :)

Merged #244