Comments (5)
According to the Pusher docs it should always be a dictionary. I think libPusher should treat a non-dictioanry value the same as 401 from the server. An assertion would be good to help debug this in development.
from libpusher.
The reference implementation for server-side auth is the Ruby gem provided by Pusher, which provides the following mechanism for authentication, given the params
posted from the client app:
Pusher['channel-name'].authenticate(params)
This returns a Ruby Hash which should be returned in JSON format.
Therefore it is correct for libPusher to expect an NSDictionary
.
from libpusher.
Right. It appears to be a routing error or something. Still investigating that in my server code, but I think libPusher should handle it better than just crashing.
from libpusher.
It's hard to imagine how libPusher should handle this other than crashing with an assertion and a helpful error message. If the server is not returning the correct data structure, then it's impossible to handle this with any certainty. The only other option is some kind of delegate method an an NSError
but whilst this is technically a server-side issue, it still seems like a programmer error that the developer is going to be wanted to be alerted to early, long before they ship.
from libpusher.
I think an assertion is sufficient.
from libpusher.
Related Issues (20)
- Xcode 8 and iOS 10 HOT 10
- '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
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.