Skip to content

Instantly share code, notes, and snippets.

@stephenlb
Created July 24, 2012 02:16
Show Gist options
  • Save stephenlb/3167593 to your computer and use it in GitHub Desktop.
Save stephenlb/3167593 to your computer and use it in GitHub Desktop.
Use PubNub Objective-C iOS API with Two API Keys
// Use PubNub Objective-C iOS API with Two API Keys
// Combination of PubNub Pulse an Galaxy
// JOIN PUBNUB PULSE WITH GALAXY
// PUBNUB PULSE
pubnub_pulse = [[CEPubnub alloc]
publishKey: @"PULSE_PUBLISH_KEY"
subscribeKey: @"PULSE_SUBSCRIBE_KEY"
secretKey: @"PULSE_SECRET_KEY"
sslOn: NO
origin: @"ps1.pubnub.com"
];
// PUBNUB GALAXY
pubnub_galaxy = [[CEPubnub alloc]
publishKey: @"GALAXY_PUBLISH_KEY"
subscribeKey: @"GALAXY_SUBSCRIBE_KEY"
secretKey: @"GALAXY_SECRET_KEY"
sslOn: NO
origin: @"ps2.pubnub.com"
];
// Now use both pubnub_galaxy and pubnub_pulse objects as needed.
// PubNub Galaxy will be used for Mass Broadcast.
// PubNub Pulse will be used for One-to-One.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment