Ionic build ios v/s cordova build ios

#1

Hi,

I’m trying to debug a strange issue with ‘ionic build ios’. My Ionic version is 1.7.11 and Cordova is 5.4.1.

I’m using the following Cordova plugins -
“cordova-plugin-device”,
“cordova-plugin-console”,
“cordova-plugin-whitelist”,
“cordova-plugin-splashscreen”,
“cordova-plugin-statusbar”,
“ionic-plugin-keyboard”,
“cordova-plugin-crosswalk-webview”,
“cordova-plugin-disable-nsapptransportsecurity”,
{
“locator”: “https://github.com/litehelpers/Cordova-sqlite-storage.git”,
“id”: “cordova-sqlite-storage”
}

I clean up the workspace using ‘ionic state reset’ and then kick off a build using ‘ionic build ios’, however the build stops after the ‘CompileC’ stage where it reports 6 warnings from ‘sqlite3.c’ (the SQLite Cordova plugin). It never proceeds to the ‘Ld’ stage.

However, if I use ‘ionic state reset’ followed by ‘cordova build ios’ instead, the build succeeds despite the 6 warnings, i.e. it finishes ‘CompileC’, shows 6 warnings, but proceeds to ‘Ld’, 'GenerateDSYMFile and ‘Touch’.

Similarly, if I perform ‘ionic state reset’ and open the XCode project and run it, it works fine.

I can easily switch my Gulp task to use ‘cordova build ios’, but before I blindly do so, I thought it would be a good idea to understand why this is happening.

Any ideas?

Thanks,
Ranjit

#2

Yes, I also would like to understand the difference between ionic build ios and cordova build ios