Skip to content

Commit

Permalink
update images
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonard van Driel committed Jan 31, 2014
1 parent afad1e3 commit c2dae37
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 10 deletions.
Binary file modified Docs/ios.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/keychain1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/keychain2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Docs/osx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 79 additions & 5 deletions Mac/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -263,19 +263,21 @@
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{335, 390}, {640, 360}}</string>
<int key="NSWTFlags">1954021376</int>
<string key="NSWindowTitle">NWPusher</string>
<string key="NSWindowTitle">Pusher</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="439893737">
<nil key="NSNextResponder"/>
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<array class="NSMutableArray" key="NSSubviews">
<object class="NSButton" id="60450325">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{520, 16}, {106, 32}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="847175189">
Expand Down Expand Up @@ -303,6 +305,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{520, 312}, {106, 32}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="767764764"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
Expand All @@ -327,6 +330,7 @@
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 23}, {502, 14}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="60450325"/>
<string key="NSReuseIdentifierKey">_NS:1535</string>
<bool key="NSEnabled">YES</bool>
Expand Down Expand Up @@ -374,9 +378,29 @@
<object class="NSTextView" id="240085821">
<reference key="NSNextResponder" ref="558981323"/>
<int key="NSvFlags">2322</int>
<set class="NSMutableSet" key="NSDragTypes">
<string>Apple HTML pasteboard type</string>
<string>Apple PDF pasteboard type</string>
<string>Apple PICT pasteboard type</string>
<string>Apple PNG pasteboard type</string>
<string>Apple URL pasteboard type</string>
<string>CorePasteboardFlavorType 0x6D6F6F76</string>
<string>NSColor pasteboard type</string>
<string>NSFilenamesPboardType</string>
<string>NSStringPboardType</string>
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
<string>NeXT RTFD pasteboard type</string>
<string>NeXT Rich Text Format v1.0 pasteboard type</string>
<string>NeXT TIFF v4.0 pasteboard type</string>
<string>NeXT font pasteboard type</string>
<string>NeXT ruler pasteboard type</string>
<string>WebURLsWithTitlesPboardType</string>
<string>public.url</string>
</set>
<string key="NSFrameSize">{613, 238}</string>
<reference key="NSSuperview" ref="558981323"/>
<reference key="NSNextKeyView" ref="453367436"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="856601317"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
<object class="NSTextContainer" key="NSTextContainer" id="196319723">
<object class="NSLayoutManager" key="NSLayoutManager">
Expand Down Expand Up @@ -443,6 +467,7 @@
<string key="NSFrame">{{1, 1}, {598, 238}}</string>
<string key="NSBounds">{{5, 0}, {598, 238}}</string>
<reference key="NSSuperview" ref="767764764"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="240085821"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
<reference key="NSDocView" ref="240085821"/>
Expand Down Expand Up @@ -659,6 +684,7 @@ wGw</bytes>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{583, 1}, {16, 238}}</string>
<reference key="NSSuperview" ref="767764764"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="82256587"/>
<string key="NSReuseIdentifierKey">_NS:83</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
Expand All @@ -672,6 +698,7 @@ wGw</bytes>
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {87, 18}}</string>
<reference key="NSSuperview" ref="767764764"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="558981323"/>
<string key="NSReuseIdentifierKey">_NS:33</string>
<bool key="NSEnabled">YES</bool>
Expand All @@ -685,7 +712,8 @@ wGw</bytes>
</array>
<string key="NSFrame">{{20, 45}, {600, 240}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSNextKeyView" ref="558981323"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="453367436"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">133266</int>
<reference key="NSVScroller" ref="856601317"/>
Expand All @@ -700,6 +728,7 @@ wGw</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{20, 289}, {603, 26}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="390300893"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
Expand Down Expand Up @@ -809,6 +838,7 @@ wGw</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 316}, {503, 26}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="41874657"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
Expand Down Expand Up @@ -844,6 +874,7 @@ wGw</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{524, 45}, {92, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="2074787"/>
<string key="NSReuseIdentifierKey">_NS:1535</string>
<bool key="NSEnabled">YES</bool>
Expand All @@ -867,6 +898,8 @@ wGw</bytes>
</object>
</array>
<string key="NSFrameSize">{640, 360}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="792220552"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
Expand Down Expand Up @@ -2116,7 +2149,48 @@ wGw</bytes>
<nil key="sourceID"/>
<int key="maxID">764</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
<object class="IBPartialClassDescription">
<string key="className">NWAppDelegate</string>
<string key="superclassName">NSObject</string>
<dictionary class="NSMutableDictionary" key="actions">
<string key="certificateSelected:">NSPopUpButton</string>
<string key="push:">NSButton</string>
<string key="reconnect:">NSButton</string>
</dictionary>
<dictionary class="NSMutableDictionary" key="actionInfosByName">
<object class="IBActionInfo" key="certificateSelected:">
<string key="name">certificateSelected:</string>
<string key="candidateClassName">NSPopUpButton</string>
</object>
<object class="IBActionInfo" key="push:">
<string key="name">push:</string>
<string key="candidateClassName">NSButton</string>
</object>
<object class="IBActionInfo" key="reconnect:">
<string key="name">reconnect:</string>
<string key="candidateClassName">NSButton</string>
</object>
</dictionary>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">window</string>
<string key="NS.object.0">UIWindow</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">window</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">window</string>
<string key="candidateClassName">UIWindow</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/NWAppDelegate.h</string>
</object>
</object>
</array>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<bool key="IBDocument.previouslyAttemptedUpgradeToXcode5">YES</bool>
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Enter *Pusher*, a Mac and iPhone app for sending push notifications *directly* t

Pusher comes with a small library for both OS X and iOS, that provides various tools to send notifications programmatically. On OS X it can use the keychain to retrieve push certificates and keys. Pusher can also be used without keychain, using a PKCS12 file, e.g. when pushing from iOS.

![Pusher OS X](Docs/osx.png)
<img src="Docs/osx.png" alt="Pusher OS X" width="591"/>


Getting started
Expand All @@ -33,11 +33,11 @@ Let's start with the SSL certificate. The goal is to get both the certificate *a

Keep in mind that you will eventually be downloading a certificate, which you will need to install in your keychain together with the private key. This should look something like this:

![Keychain export](Docs/keychain1.png)
<img src="Docs/keychain1.png" alt="Keychain export" width="681"/>

Both can be exported into a PKCS12 file, which allows you to share these with fellow developers:

![PKCS12 file](Docs/keychain2.png)
<img src="Docs/keychain2.png" alt="PKCS12 file" width="679"/>

### Device token
Now you need to obtain a device token, which is a 64 character hex string. This should be done from within the iOS app you're going to push to. Add the following lines to your application delegate:
Expand Down Expand Up @@ -73,7 +73,7 @@ Now, when you run the application, the 64 character push string will be logged t
### Push from OS X
With the SSL certificate and private key in the keychain and the device token on the pasteboard, you're finally ready to send some push notifications. Let's start by sending a notification using the Pusher OS X app. Open the Pusher Xcode project and run the PusherMac target:

![Pusher OS X](Docs/osx.png)
<img src="Docs/osx.png" alt="Pusher OS X" width="591"/>

The combo box at the top lists the available SSL certificates in the keychain. Select the certificate you want to use and paste the device token of the device you're pushing to. The text field below shows the JSON formatted payload text that you're sending. Read more about this format in the Apple documentation under *Apple Push Notification Service*.

Expand All @@ -84,7 +84,7 @@ If things are not working as expected, send me a message on GitHub or post an is
### Push from iOS
The ultimate experience is of course pushing from an iPhone to an iPhone, directly. This can be done with the Pusher iOS app. Before you run the PusherTouch target, make sure to include the *certificate, private key, and device token* inside the app. Take the PKCS12 file that you exported earlier and include it in the PusherTouch bundle. Then go to `NWAppDelegate.m` in the `Touch` folder and configure `pkcs12FileName`, `pkcs12Password`, and `deviceToken`. Now run the PusherTouch target:

![Pusher iOS](Docs/ios.png)
<img src="Docs/ios.png" alt="Pusher iOS" width="414"/>

If everything is set up correctly, you only need to *Connect* and *Push*. Then you should receive the *You did it!* push message on the device.

Expand Down

0 comments on commit c2dae37

Please sign in to comment.