Archive

Archive for July, 2013

Getting started with Parse

July 22, 2013 Leave a comment

tumblr_inline_mmh9ug8Nil1qz4rgpParse.com is a backend-service for mobile apps, or web apps. It allows you to create simple back ends for mobile apps, without requiring developing your own data-layer. I wanted to try it out, to see if I could get a simple “Hello World” app working, which stores a value in Parse, and then retrieves it via an ID later.

<html>
<head>
<script src=”http://www.parsecdn.com/js/parse-1.2.8.min.js”></script&gt;
<script src=”http://code.jquery.com/jquery-1.10.1.min.js”></script&gt;
<script language=”javascript”>
Parse.initialize(“…..”, “…..”);
var TestObject = Parse.Object.extend(“TestObject”);
$(init);
function init()
{
$(“#save”).bind(“click”,save_click);
$(“#load”).bind(“click”,load_click);
}
function save_click()
{
var testObject = new TestObject();
testObject.save({data: $(“#data”).val()}, {
success: function(object) {
alert(“stored as ” + object.id);
$(“#reference”).val(object.id);
}
});
}
function load_click()
{
$(“#data”).val(“”);
var reference = $(“#reference”).val();
var query = new Parse.Query(TestObject);
query.get(reference, {
success: function(obj) {
$(“#data”).val(obj.attributes.data);
},
error: function(object, error) {
// The object was not retrieved successfully.
// error is a Parse.Error with an error code and description.
alert(error);
}
});
}
</script>
</head>
<body>
<input type=”text” name=”data” id=”data” Value=”hello world”><br>
<input type=”button” value=”save” id=”save”><br>
<input type=”text” name=”reference” id=”reference” Value=””><br>
<input type=”button” value=”load” id=”load”><br>
</body>
</html>

Here, I initialise the Parse Library, then tie up events via JQuery, the Save and Load buttons to functions save_click and load_click. Save_click then stores a JSON object with property “data” and value as typed into the data text box, and sends this to Parse, all going well, an id is returned and displayed in the “reference” box. Load_click then requests this object again from Parse, using the ID previously provided, and displays the data property into the data text box.

 

Categories: Uncategorized

The package version in your .bar manifest file for New Bundle must be greater than the previous version

July 17, 2013 Leave a comment

When updating an App for BlackBerry 10 on the ISV portal, a new error appeared when trying to submit my updated BAR file,

The package version in your .bar manifest file for New Bundle must be greater than the previous version, but lower than any the next release version added to the vendor portal. . Your .bar manifest file package version must be greater than 4.0. Correct your .bar manifest file and try again to continue.

After a bit of research, I realised that the version number is composed of two values:

The version number in the Widget tag of the Config.xml;

<widget xmlns=”http://www.w3.org/ns/widgets&#8221; xmlns:rim=”http://www.blackberry.com/ns/widgets&#8221; version=”4.0.0.0″>

Combined with the buildId that is passed into the BBWP tool.

The combined version number must be unique, and as per this new requirement greater than the app version as published in the ISV portal.

 

Categories: Uncategorized