Skip to content

Commit 5f2724a

Browse files
authored
Add doc about keeping a strong reference (#231)
* Add doc about keeping a strong reference * Move the message
1 parent 20d8643 commit 5f2724a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ Pusher *pusher = [[Pusher alloc] initWithAppKey:@"YOUR_APP_KEY"];
335335
336336
This returns a client object which can then be used to subscribe to channels and then calling `connect()` triggers the connection process to start.
337337
338+
**Important:** You must keep a strong reference to the `Pusher` client. You could achieve that by making `pusher` a property of your app delegate, for example.
339+
338340
You can also set a `userDataFetcher` on the connection object.
339341
340342
- `userDataFetcher (() -> PusherPresenceChannelMember)` - if you are subscribing to an authenticated channel and wish to provide a function to return user data

0 commit comments

Comments
 (0)