windows phone 8 - Parse detect ParseClient is not initialized -


i using parse.com in app. see if parse.parseclient.initialize() method fails, parseanalytics.trackappopens still run , crash app.

so how can detect if parseclient failed initialize?

in app constructor:

this.startup += async (sender, args) =>         {               //crash if parseclient not initialized               //parse.parseanalytics.trackappopens(rootframe);          }; 

one way make test call parse db , wrap around try catch block before use parseanalytics.

something like..

parseclient.initialize();  try {     client.getobject("sometestordummyobject"); } catch(exception ex) {    //indicates initialize failed.. }  parseanalytics.trackappopens(rootframe); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -