Questions tagged [didfailwitherror]

18 questions
22
votes
3 answers

Swift: Corelocation handling NSError in didFailWithError

I'm using CoreLocation to successfully determine the user's location. However when i try to use the CLLocationManagerDelegate method: func locationManager(_ manager: CLLocationManager!, didFailWithError error: NSError!) I run into problems with the…
Magnas
  • 3,832
  • 5
  • 33
  • 48
17
votes
1 answer

How to handle "Don't Allow" for location manager?

I haven't think of this yet now . Till now whenever device was asking me use location update I was allowing it . But when now I am not allowing then it the location manager gives me kclErrorDenied and the location manager can not start again until…
harshalb
  • 6,012
  • 13
  • 56
  • 92
12
votes
1 answer

locationManager didFailWithError

from 1 week if my gps app fail to retrieve signal (eg: testing in my home) i don't receive any aler. i've setup my error notification in this way - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error { NSString…
3
votes
1 answer

Delegate must respond to locationManager:didFailWithError: even though implemented didFailWithError method

For some reason Xcode thinks I'm not implementing didFailWithError method of the CLLocationManagerDelegate protocol I fail to see what I'm doing wrong, as I literally copied from another SO post that said this didFailWithErrormethod was updated…
14wml
  • 4,048
  • 11
  • 49
  • 97
2
votes
2 answers

Bad URL on iPhone, when i type it in browser it works

I am making an jsonstring. When i execute it, it works when i do it in my browser. I do this by logging the exact url and copy it in the browser. Than i get the HTTP Get that i want, but in the iPhone i only get a Bad Login. -…
David Raijmakers
  • 1,369
  • 1
  • 16
  • 40
1
vote
1 answer

Call "didFailLoadWithError" when no internet connection?

I already googled but didn't find a clear answer. When is "didFailLoadWithError" called? I want to use it to show an alert when there's no internet connection. Is that the right way? It's for my iOS app made with Xcode and Swift.
user6465101
1
vote
2 answers

"Don't Allow" in LocationManager keeps logging errors

I have an app that checked for location. It asks the user to use location and if the user says no on the menu there is an issue when i load the mapview. Once i select the mapView it asks for the user location again. If the user says no again my…
Steph Moreau
  • 170
  • 2
  • 14
1
vote
0 answers

few times get error code for didFailWithError as 0 in locationmanager delegate method

- (void)locationManager: (CLLocationManager *)manager didFailWithError: (NSError *)error Few times on running on iPad (3rd gen - wifi only) perfect condition (good internet) I get 'error code' as 0 in the above method. Error code from here -…
1
vote
2 answers

CLLocationManager didFailWithError: what error stops location updates

The iOS CLLocationManager reports various errors in its didFailWithError method: https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CoreLocationConstantsRef/Reference/reference.html#//apple_ref/c/econst/kCLErrorDenied In…
Hyndrix
  • 4,282
  • 7
  • 41
  • 82
1
vote
1 answer

Loading FaceBook in UIWebView gives NSURLErrorDomain error -999 when

all... When loading http://m.facebook.com in my UIWebView, sometimes it loads fine and sometimes it fails with the error NSURLErrorDomain error -999. It always fails if the Facebook page prompts you to log in and then you do so. Some folks on…
0
votes
2 answers

iPhone - UIWebView not calling didFailLoadWithError without data connection

I've searched and haven't found a solution to this, so hopefully someone can help. I have a UIWebView that is called when a user presses a button. Everything works great, unless you account for behavior when the phone is without a data…
user737753
0
votes
1 answer

Why do I receive a wrong GPS position after didFailWithError?

I have developed an app for Apple Watch 2-3 that use the internal GPS to save the track and get speed, distance etc. The app is written in Swift, XCODE 9 and using CLLocation. Sometime CLLocation sends didFailWithError, the next 3-5 GPS locations…
Max Picchi
  • 13
  • 2
0
votes
0 answers

CLLocationManagerDelegate's (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error not called when in App is in BG

My locationManager is setup to work in BG (allowsBackgroundLocationUpdates + in capability Background Modes: location updates is checked). My CLLocationManagerDelegate's - (void)locationManager:(CLLocationManager *)manager…
dardi
  • 39
  • 4
0
votes
1 answer

how to implement ads on 2 view controllers

I want the iAd/AdMob mediation banner to NOT be affected by what ViewController I'm in. Currently. When I change View Controllers didFailToReceiveAdWithError is called and the AdMob banner in that method appears when I change ViewControllers. I use…
user4411251
0
votes
0 answers

Connection didfailwitherror method called when testing in device

In my app I am sending my data into a database by calling a web service. I am able to send my data into the database when i tested my app in the simulator. When I deployed same code in my device(iPhone- connected to a wifi(working)), the app is not…
1
2