Xcode 8 and iOS 10
Closed this issue ยท 10 comments
Just downloaded Xcode 8 GM and when running the app (besides any other errors) the pusher gives much more log, and one of these indicate the PTPusherErrorDomain like this:
Did fail to subscribe to channel: private-notifications-22024 error: Error Domain=PTPusherErrorDomain Code=1 "(null)"
Pusher was working like a charm in Xcode 7 and with iOS < 10. I guess it might be a problem coming from there.
My question is if there is a release coming to give support for iOS 10, or if there is something else to configure in our project for iOS 10.
Thank you very much. Great library indeed, by the way.
P.S. I'm having this error with both 1.6.1 and 1.6.2 versions of the library.
I'll make sure to take a look at this today - thanks for raising the issue!
Found the solution. It was a problem with another library.
You can close this issue.
Thank you very much, anyway!
@ManuelOrtega what was the issue? I'm seeing this too (pusher 1.6.2, xcode 8A218a, iOS 10.0.2)
My problem was not with LibPusher but with what was being pushed. In my case what was being pushed was stored in a keychain. With iOS 10 they really took care about privacy, so I had to enable the use of a keychain from the entitlements of the project.
If this is your case, this may help you:
@ManuelOrtega thanks! Turns out my issue was that I had also upgraded Pusher and the signature of one of the delegate methods changed (willAuthorizeChannel) which meant it was just silently not calling that method anymore :/
@edenman thanks! for this. had the same problem and using the NEW delegate method for willAuthorizeChannel solved it
@edenman Thanks!
- (void)pusher:(PTPusher *)pusher willAuthorizeChannel:(PTPusherChannel *)channel withRequest:(NSMutableURLRequest *)request
is now
- (void)pusher:(PTPusher *)pusher willAuthorizeChannel:(PTPusherChannel *)channel withAuthOperation:(PTPusherChannelAuthorizationOperation *)operation
How do you set header fields of the request with this new delegate method for willAuthorizeChannel? I can't find this documented anywhere.
@SimpleDS look at the header for PTPusherChannelAuthorizationOperation
- there's a few things you can set there but it also exposes the mutable request (mutableURLRequest
).
https://github.com/pusher/libPusher/blob/master/Library/PTPusherChannelServerBasedAuthorization.h