06-28-2013 06:58 AM
I have a problem with an app that is already in the app world.
When i download the app from the app world i get a black screen on the html parts that are loading via Ajax,
But when i build the app locally i have no problems at all. I tried to edit the config file to support the url where the phone gets the data. Als i added the subdomain attribute but still no luck.
I really hope someone can help me with this problem.
06-28-2013 11:11 AM
How old is the app in the store? If the version of the WebWorks SDK, used to build the app deployed to BlackBerry World, is different than the current version you are using, it could be a change in behavior that is broken. There was a change in how whitelisting of AJAX urls occurred. If you used * wildcard in your access element, there may be permission errors since this became more restrictive with recent versions of the SDK .
06-28-2013 01:22 PM
Ooh - fun techie time
Build with the -d (debug) switch so you can use Web Inspector
Now trap the return from your AJAX and see what it says
Anything other than 200 as a result code sounds like it could potentially lead to the issue you descibe
There are other things you need to try once you've identified this (going on experience - not saying its definite) after this stage
As Adam mentions - you need to fully whitelist the URL - be specific - *.fred,com is no good - it's gotta be myapp.fred.com
Next - nice to have - pass back a CORS header (google it for your server). Whilst not strictly required its a good idea to be polite to the server and client
Generally these steps fix things
You should also try trapping the return (if you get one) and see what that says
Many a time I've seen poorly designed JSON that parser can handle - I now religiously wrap such likely problem areas in try ... catch