Frequent requests for geographic location authorization in IOS
A Cordova application used the geolocation plug-in. When running IOS, it found that the app requested an authorization, and WebKit also requested an authorization. In addition, the format of WebKit requests is quite ugly./var/mobile/Applications/157EB70D-4AA7-826E-690F0CBE0F/appname.app/www/index.htmlAs a result, many people are talking about this problem and there are different solutions. Cordova is developing rapidly and changing greatly. It cannot be said that each solution is effective, however, it cannot be said that it is wrong. The solution without the version number turns into a rogue. Today (4.0.0), my solution is as follows:
Make sure thatonDeviceReadyBefore usenavigator.geolocation.
In xcode, an error occurred while finding the plug-in.
The error is generally as follows:
ERROR: Plugin ‘Geolocation’ not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
We need to add the. M file corresponding to the plug-in to the project configuration file:
In XCode, goto Build Phases -> open the Compiled Sources dropdown. Click + and add the missing plugin .m file that should be in your Plugins directory (but is missing from the compiled sources).
InBuild Phases / Compile SourcesAdd a plug-in file that is not included in the file. The strange thing is that the plug-in has never been used before and can be used normally...
IOS simulator Error
This is not a problem. Keep Cordova and iOS-Sim to the latest version. The record is to emphasize this principle. Keep update
Notes on cross-platform application development issues in Cordova