Skip to content

Instantly share code, notes, and snippets.

@girliemac
Last active October 18, 2017 20:52
Show Gist options
  • Save girliemac/3ae18a6a95359cbe0152 to your computer and use it in GitHub Desktop.
Save girliemac/3ae18a6a95359cbe0152 to your computer and use it in GitHub Desktop.
[Blog] Turning Your JavaScript Chat App Into Android and iOS App with PhoneGap
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.pubnub.com" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>SimpleChat</name>
...
<platform name="ios">
<icon src="app-icon-ios.png" />
...
</platform>
<platform name="android">
...
</platform>
</widget>
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.pubnub.com" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>SimpleChat</name>
...
<icon src="app-icon.png" />
</widget>
var app = {
initialize: function() ...
bindEvents: function() ...
onDeviceReady: function() {
// Your awesome chat app here ---
var channel = 'chat';
var p = PUBNUB.init({
subscribe_key: 'sub-c-f762fb78-2724-...',
publish_key: 'pub-c-156a6d5f-22bd-...'
...
});
}
};
app.initialize();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment