Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PTChannel.bindToEventNamed not visible by default in Swift #168

Closed
mackuba opened this issue Feb 2, 2015 · 2 comments
Closed

PTChannel.bindToEventNamed not visible by default in Swift #168

mackuba opened this issue Feb 2, 2015 · 2 comments

Comments

@mackuba
Copy link
Contributor

mackuba commented Feb 2, 2015

Hi,

I'm trying to set up Pusher in an iOS app written in Swift, and I've noticed that the method bindToEventNamed:handleWithBlock: is not visible in PTPrivateChannel. I've managed to solve it by additionally importing PTPusherEventDispatcher.h apart from <Pusher/Pusher.h>.

Is this a Swift bug or something that should be done differently in libPusher? I think the issue is that it doesn't see those methods because they return PTPusherEventBinding, and that class is only included there via @class.

@lukeredpath
Copy link
Contributor

Interesting, I think your suspicion might be correct.

PTPusherEventDispatcher is not part of the public API so I should probably break out the PTPusherEventBinding class into a separate header if I want to make it public - but I don't think I ever intended it to be.

I should change the binding methods to return id instead (similar to how NSNotificationCenter does) as the binding objects are mostly opaque however they do have two methods, eventName and isValid; I need to decide if these methods are useful enough to make them public.

@mackuba
Copy link
Contributor Author

mackuba commented Apr 1, 2015

Fixed in 1.6, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants