Comments (5)
Hi Tim. I'll take a look into this. FWIW, if you compile the ARC version of the library as a static library (there are precompiled downloads available) you can use it in your non ARC project without any problems.
from libpusher.
I tried to destroy unsubscribed channels by removing them from the 'channels' dictionary in the PTPusher class. This did not seem to work since the PTPusher 'dispatcher' object still held a reference to all channels. This reference was established when each channel was bound to the 'pusher_internal:subscription_succeeded' and 'subscription_error' events. Since these events are never unbound, channel objects are never released - event after they are unsubscribed.
I would like to be able to subscribed and unsubscribe from channels, and then clear the unsubscribed channels from memory. In order to do this, it seems that channels need to be able to cleanly unbind from all internal and external events. It seems that this would be pretty standard functionality for most apps that use push messaging.
Please let me know if I am thinking about this incorrectly or doing something wrong. I would be grateful for any guidance.
Thanks,
Tim
from libpusher.
I think I found a bug related to this issue. In PTPusherChannel.m method initWithName:pusher:
These lines:
[pusher bindToEventNamed:@"pusher_internal:subscription_succeeded"
target:self action:@selector(handleSubscribeEvent:)];
[pusher bindToEventNamed:@"subscription_error"
target:self action:@selector(handleSubscribeErrorEvent:)];
Should be.
[self bindToEventNamed:@"pusher_internal:subscription_succeeded"
target:self action:@selector(handleSubscribeEvent:)];
[self bindToEventNamed:@"subscription_error"
target:self action:@selector(handleSubscribeErrorEvent:)];
This fixes some problems with reconnecting to multiple channels on reconnection.
from libpusher.
@tim17x6 could you please try the use-socketrocket-backend branch and see if this fixes the problem for you?
from libpusher.
This should be fixed in 1.2, which I released today.
from libpusher.
Related Issues (20)
- 'PTEventListener.h' file not found HOT 2
- No auth data sent in subscription event HOT 4
- Crash with PTNSJSONParser objectFromJSONString HOT 2
- [push notifications] Error callbacks? HOT 3
- Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_PTPusher" HOT 1
- [Critical] Version Preprocessor Macro Crashes Cocoapods HOT 1
- Push lib crashes HOT 3
- Retain cycle in PTURLRequestOperation HOT 2
- ReactiveCocoa => ReactiveObjC for swift3
- Undefined symbols for architecture arm64 HOT 2
- Dynamic Channels HOT 4
- New release? HOT 4
- No current subscription to channel myChannel, or subscription in progress HOT 7
- Unable to read your certificate: failed to parse PKCS1 private key HOT 12
- Xcode 9 - PTPusherErrorDomain error while subscribing to private channel HOT 2
- Getting this error. "Value of type 'PTPusherPrivateChannel' has no member 'bind'" HOT 2
- 'WebSocketClient' is ambiguous for type lookup in this context
- Private channel not receiving pusher events. HOT 9
- add objective c documentation for Beam integration HOT 1
- WebSocket Compression HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libpusher.