-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec8bd0a
commit b685c14
Showing
1 changed file
with
6 additions
and
35 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,10 @@ | ||
// This is a test harness for your module | ||
// You should do something interesting in this harness | ||
// to test out the module and to provide instructions | ||
// to users on how to use it by example. | ||
|
||
|
||
// open a single window | ||
var win = Ti.UI.createWindow({ | ||
backgroundColor:'white' | ||
}); | ||
var label = Ti.UI.createLabel(); | ||
win.add(label); | ||
win.open(); | ||
|
||
// TODO: write your module tests here | ||
var Parse = require('eu.rebelcorp.parse'); | ||
Ti.API.info("module is => " + Parse); | ||
|
||
label.text = Parse.example(); | ||
|
||
Ti.API.info("module exampleProp is => " + Parse.exampleProp); | ||
Parse.exampleProp = "This is a test value"; | ||
Parse.start('<PARSE-APPLICATION-ID>', '<PARSE-CLIENT-ID>'); | ||
|
||
if (Ti.Platform.name == "android") { | ||
var proxy = Parse.createExample({ | ||
message: "Creating an example Proxy", | ||
backgroundColor: "red", | ||
width: 100, | ||
height: 100, | ||
top: 100, | ||
left: 150 | ||
}); | ||
// To enable Android Push Notifications | ||
Parse.enablePush(); | ||
|
||
proxy.printMessage("Hello world!"); | ||
proxy.message = "Hi world!. It's me again."; | ||
proxy.printMessage("Hello world!"); | ||
win.add(proxy); | ||
} | ||
// Subscribe of unsubscribe to Parse Channels | ||
Parse.subscribeChannel('user_123'); | ||
|
||
Parse.unsubscribeChannel('user_123'); |