location

Issues with “Allow always” location in iOS 13

[亡魂溺海] 提交于 2020-06-25 03:39:23
问题 I've an app which depends on the user's location. Until iOS 13 the app worked correctly but now it doesn' send the user's location. I've tried to choose the option "While using app" and wait to the next prompt in order to choose "Allow always" but it doesn't work. Choosing "While using app" and going to settings for changing the option to "Allow always" doesn't work. (Both cases are the "official" answer of Apple in the documentation) Any idea? Thanks 回答1: From iOS 13 onwards, Apple replace

How to create a custom chain in Swift Combine?

自作多情 提交于 2020-06-17 15:56:05
问题 I'm trying to create a LocationManager wrapper for Combine. I have a publisher and some functions that trigger the publisher. However, I'd like to combine them in one with a custom command. Here's what I got so far: @available(OSX 10.15, iOS 13, tvOS 13, watchOS 6, *) public class LocationProxy: NSObject { private lazy var manager = CLLocationManager() private static let authorizationSubject = PassthroughSubject<Bool, Never>() public private(set) lazy var authorizationPublisher: AnyPublisher

Simulate fake location on real iOS device

て烟熏妆下的殇ゞ 提交于 2020-05-24 21:58:09
问题 I want to simulate fake location on my iPhone 5S device using specific longitude and latitude. Is there a way to do this in XCode. I tried using the simulate location feature by adding a GPX file in XCode but it's not working. Thank you in advance. 回答1: It is possible. You only have to: 1) plug your device to the computer. 2) run an app in the real device (it is the same which application). It is only to have the menu enabled. 3) in Xcode (not in the simulator) Go to menu: Debug -> Simulate

Simulate fake location on real iOS device

守給你的承諾、 提交于 2020-05-24 21:57:57
问题 I want to simulate fake location on my iPhone 5S device using specific longitude and latitude. Is there a way to do this in XCode. I tried using the simulate location feature by adding a GPX file in XCode but it's not working. Thank you in advance. 回答1: It is possible. You only have to: 1) plug your device to the computer. 2) run an app in the real device (it is the same which application). It is only to have the menu enabled. 3) in Xcode (not in the simulator) Go to menu: Debug -> Simulate

Android Quick Settings notifications?

陌路散爱 提交于 2020-05-18 14:38:07
问题 In gms.location.FusedLocationProviderApi, the way to check if location settings are enabled is to call checkLocationSettings. That's great for polling, but it's possible for the user to turn location on/off using the new Quick Settings menu (swipe down from top), which does not necessarily trigger onResume in the top activity (if location is turned on, there's a dialog, but if it's turned off, there isn't one). What's the right way to get notified when a Quick Setting toggles Location? 回答1:

Android Quick Settings notifications?

╄→гoц情女王★ 提交于 2020-05-18 14:37:01
问题 In gms.location.FusedLocationProviderApi, the way to check if location settings are enabled is to call checkLocationSettings. That's great for polling, but it's possible for the user to turn location on/off using the new Quick Settings menu (swipe down from top), which does not necessarily trigger onResume in the top activity (if location is turned on, there's a dialog, but if it's turned off, there isn't one). What's the right way to get notified when a Quick Setting toggles Location? 回答1:

how to handling app that get sudden close in flutter

房东的猫 提交于 2020-05-17 06:06:45
问题 I am using location and google maps flutter in my apps... but my apps always get close unexpectedly...when accessing StreamSubscription here is the message the problem appears in only some android devices..is there something that I can do to prevent this problem.. ? 来源: https://stackoverflow.com/questions/61788319/how-to-handling-app-that-get-sudden-close-in-flutter

how to handling app that get sudden close in flutter

此生再无相见时 提交于 2020-05-17 06:06:34
问题 I am using location and google maps flutter in my apps... but my apps always get close unexpectedly...when accessing StreamSubscription here is the message the problem appears in only some android devices..is there something that I can do to prevent this problem.. ? 来源: https://stackoverflow.com/questions/61788319/how-to-handling-app-that-get-sudden-close-in-flutter

FusedLocationProviderClient getLastLocation elapsedRealtimeNanos mostly current system time

ε祈祈猫儿з 提交于 2020-05-14 19:50:14
问题 Update 2 I had a talk with a google engineer on Google I/O '18. He told me that I can trust the fusedLocationProvider. If he marks the last known location with a new timestamp the user is probably still at the same location. I'd like to do a few tests with a "moving" device in the future to prove this statement. Original Question I'm requesting the last known location from the FusedLocationProviderClient with getLastLocation() and want to check if the last known location is older than 5

Geolocation by iPhone's IP address

流过昼夜 提交于 2020-05-10 18:50:38
问题 I like to track the users " location " by using the device's IP address. I've already looked for some API services like: freegeoip.net api.petabyet.com ip-api.com But I have no idea how to use this services to get the location of the users device. Actually I've already looked for some Swift code snippets to get achieve the wanted result (to get the Location) but I couldn't find any code matching to the current version of Swift. let url = NSURL(string: "http://freegeoip.net") let task =