[Interest] Qt Positioning on iOS?

ekke ekke at ekkes-corner.org
Fri Mar 6 19:30:04 CET 2020


you should add something like this into your info.plist:

<key>NSLocationWhenInUseUsageDescription</key>

<string>$(PRODUCT_NAME)usesLocationtogetWeatherDataforcurrentLocation</string>

<key>“NSLocationAlwaysAndWhenInUseUsageDescription”</key>

<string>$(PRODUCT_NAME)usesLocationtogetWeatherDataforcurrentLocation</string>


Am 06.03.20 um 19:08 schrieb Israel Brewster:
> Simple question: how do I get Qt Positioning (C++) to work on iOS 
> (current versions of everything)? I tried the code on the Qt 
> Positioning page, and apparently the various createDefaultSource() 
> calls all worked (I tried both QGeoPositionInfoSource and 
> QGeoAreaMonitorSource), in that they returned non-zero pointers, but 
> from what I can tell nothing happens after calling startUpdates(), 
> requestUpdate(), or startMonitoring(), as appropriate for the source 
> in question - no callbacks are ever called, including the error 
> callback. Checking the result of error() on the source after I create 
> it returns 3, which appears to be NoError. So there is no error, but I 
> never seem to get any data either.
>
> I would note that iOS never asks me if I want to allow the program to 
> use location data, which could account for the issue, but nothing in 
> the documentation that I can find tells me how to get the OS to 
> request this permission. Some googling finds an old thread on the 
> subject, that refers to several keys in the Info.plist, but I tried 
> adding those keys (and deleting the app from the phone/re-installing), 
> and that didn’t seem to make any difference. What am I missing?
>
> ---
> Israel Brewster
> Software Engineer
> Alaska Volcano Observatory
> Geophysical Institute - UAF
> 2156 Koyukuk Drive
> Fairbanks AK 99775-7320
> Work: 907-474-5172
> cell:  907-328-9145
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200306/95ef6cee/attachment.html>


More information about the Interest mailing list