简体   繁体   中英

How to properly add iOS framework with location and create plugin from it in Cordova?

I am writing Cordova plugin which wrap iOS framework which use location in background. I have added necessary permissions and I have wrapped iOS framework successfully, but the location did not updates to me while I am moving. I got message from Cordova, please take a look at image. 在此处输入图片说明

It start receiving updates when I moved the code which enables location manager into AppDelegate class. If that code is at some other class, the prompt window for location permission will appear but the monitoring of location changes will not work. I am not totally sure why is that, but it works now :D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM