Skip to content

Commit 830382d

Browse files
authored
Clarify Carthage frameworks in README (#268)
1 parent 22eec52 commit 830382d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ To integrate PusherSwift into your Xcode project using Carthage, specify it in y
117117
github "pusher/pusher-websocket-swift"
118118
```
119119

120+
Carthage will produce a number of frameworks. Which of those you need to include in you project depends on which features you are using:
121+
122+
- If you **are not** using the end-to-end encryption features, you need to include the following framework binaries from the `Carthage/Build` directory: `PusherSwift`, `Starscream` and `Reachability`
123+
- If you **are** using the end-to-end encryption features, you need to include the following framework binaries from the `Carthage/Build` directory: `PusherSwiftWithEncryption`, `Sodium`, `Starscream` and `Reachability`
124+
120125
### Swift Package Manager
121126

122127
> Please note that if you are looking to use encrypted channels, this is not currently possible with Swift Package Manager.
@@ -622,15 +627,17 @@ Like with private channels, you must provide an authentication endpoint. That en
622627
623628
The shared secret used to decrypt events is loaded from the same auth endpoint request that is used to authorize your subscription. There is also a mechanism for reloading the shared secret if your encryption master key changes. If an event is encountered that cannot be decrypted, a request is made to your auth endpoint to attempt to load the new shared secret. If that request fails or if the returned secret still cannot decrypt the event then that event will be skipped, the `failedToDecryptEvent` connection delegate function will be called, and the next received event will be processed.
624629
625-
Because of the requirement to reload the shared secret on demand, you can only use the following [auth method](#configuration): `endpoint`, `authRequestBuilder`, `authorizer`. It is not possible to pass an instance of `PusherAuth` to the `subscribe` function if you are subscribing to an encrypted channel.
630+
Because of the requirement to reload the shared secret on demand, you can only use the following [auth methods](#configuration): `endpoint`, `authRequestBuilder`, `authorizer`. It is not possible to pass an instance of `PusherAuth` to the `subscribe` function if you are subscribing to an encrypted channel.
626631
627632
### Installation
628633
634+
In your Swift files, you will need to import `PusherSwiftWithEncryption` rather than `PusherSwift`. In Objective-C files, you will need to import `PusherSwiftWithEncryption/PusherSwiftWithEncryption-Swift.h` rather than `PusherSwift/PusherSwift-Swift.h`.
635+
629636
#### CocoaPods
630-
Update your podfile to include `PusherSwiftWithEncryption` instead of `PusherSwift`.
637+
Update your Podfile to include `PusherSwiftWithEncryption` instead of `PusherSwift`.
631638
632639
#### Carthage
633-
You do not need to change your Cartfile. However, you will need to import the `PusherSwiftWithEncryption` framework into your project, instead of `PusherSwift`. You will also need to import the `Sodium` framework into your project.
640+
You do not need to change your Cartfile. However, you will need to import the `PusherSwiftWithEncryption` framework into your project, instead of `PusherSwift`. You will also need to import the `Sodium` framework into your project (in addition to `Starscream` and `Reachability`).
634641
635642
#### Swift Package Manager
636643
PusherSwiftWithEncryption is not yet compatible with the Swift Package Manager.
@@ -653,8 +660,6 @@ let privateEncryptedChannel = pusher.subscribe(channelName: "private-encrypted-m
653660
PusherChannel *privateEncryptedChannel = [pusher subscribeWithChannelName:@"private-encrypted-my-channel"];
654661
```
655662
656-
You must use one of the following [auth methods](#configuration): `endpoint`, `authRequestBuilder`, `authorizer`
657-
658663
There is also an optional callback in the connection delegate when you can listen for
659664
any failed decryption events:
660665

0 commit comments

Comments
 (0)