Is cordova.file not compatible on ionic 2 iOS?

try this,

  1. ionic start new_project --v2
  2. in new_project dir, ionic plugin add cordova-plugin-file
  3. declare let cordova:any; below import in your home.ts
  4. then add this in your HomePage class constructor:

console.log(cordova.file.dataDirectory); //make app stuck in white screen forever.

  1. ionic run ios (in my case iOS simulator runs) (‘ionic platform add ios’ if not there)

I did nothing special. I have no problem on android. but why is it crashing ionic app?