Last active
October 18, 2017 20:52
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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