phoneGap startup - do we need all those files?

后端 未结 4 1375
日久生厌
日久生厌 2020-12-28 16:37

Alright, I am just getting started with phoneGap for iOS and I am noticing in the www directory that there are plenty of files, such as

spec/helper.js
spec/i         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 17:16

    Even if the cordova js the only js file needed, you will probably not use some functions that it contains.

    In fact, somewhere in your project you have a config xml file that contains all plugins used by your application (the location of this file dépends on your project Platform). Check this file and remove all unused plugins if you want to have a more performant application. After that, you can remove related functions in the cordova js file (this file interfaces plugins in native code with javascript).

    For example, if you don't want to use compass features of your device, remove the corresponding plugin from the config xml file and also all functions related to the compass in the cordova js file (to perform this operation often save your file and test your project to check if you don't insert some syntax errors).

    I send you a french blog post that gives some other good advices about phonegap performance. Maybe you can use Google translation to read this article...

    http://blog.workinday.com/application_smartphone/184-comment-ameliorer-les-performances-de-son-application-phonegap.html

    Hope this helps ! Bye !

提交回复
热议问题