Notes on cross-platform application development issues in Cordova

Source: Internet
Author: User
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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.