How to work around geoCoder error:503 - iphone

I have tried so many solutions but nothing seems to work for me. Approximately one out of every 4 times i get
/SourceCache/ProtocolBuffer_Sim/ProtocolBuffer-51.2/Runtime/PBRequester.m:684 server returned error: 503
I have declared the geocoder at the class level and added a retain property (just like in apple's CurrentAddress sample code) and released in dealloc method.
During instantiation i have added it to the autorelease pool as shown below
self.reverseGeocoder =[[[MKReverseGeocoder alloc] initWithCoordinate:newLocation.coordinate]autorelease];
reverseGeocoder.delegate=self;
[reverseGeocoder start];
This was the suggestions i got from other solutions. Apparently nothing seems to work for me.
Am i doing something wrong? I am beginning to wonder if there a solution at all? :(
Thanks in advance

I think you need to go through google map api
this may help you
http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true

I think you need to go for google api for map.
You need to run java/Script on UiWebView by your custom function...

Related

I'm using the https://pub.dev/packages/flutter_callkit_incoming. Nothing happens when I use the start call function. Is it something I'm doing wrong?

I have never used flutter_callkit_incoming dependency before and I seem to have problems.
Can I get help from anyone
This is the code that calls
I want to link it with fcm.
Try adding a seState({}); inside your function.

trying to use coredata with an object class ** unsuccessfully**

I am completely lost trying to set up core data to be used inside my nsobject class. I am adding coredata to my existing project so its quite hard to figure this all out. Because of this I have started a new project with coredata to get the sample code I need to implement coredata in my current app.. however I am wondering what alterations do I need to make in order to use this coredata sample code with an object class instead of a view controller/tableview which is what the template code is doing?
To help answer my question I will explain what I am doing with my project at the moment.
I have several viewcontrollers that display different sets of data, because I have a custom database engine I am having to communicate with I have two classes that I have made. One is a request class which creates a packet with all sorts of data that gets sent off to the DBEngine using NSURLRequest/NSURLConnection.
I am using NSURLRequest/NSURLConnection delegates in my custom request class, so when send my request off to the DBEngine i wait until I get a response inside connectionDidFinishLoading delegate method, which I then pass the response data over to my responses class like so....
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
// depending on what sorta request is made will depend on how the data shuld be handled.
if ([methodName isEqualToString:#"GetDBVersion"]) {
//tbc
}
else if ([methodName isEqualToString:#"GetManuf"])
{
[engineResponses GetManuf:receivedData];
}
else if ([methodName isEqualToString:#"GetNonM"])
{
[engineResponses GetNonM:receivedData RestrictionID:RestrictionID];
}
}
By doing this I am creating a new instance of my engineResponses class, which Is okay untill I try to pass the context from the application delegate over to this same class thus creating another instance which equals to things not working....
So as stated above I am wondering how I can edit the template code to work in my favor... I hope I have been clear in my explination I have just spent the last hour on trying to get this question perfect as I have spent the last two days chasing my tail trying to figure this stuff out.. its the first time I have worked with coredata and im just finding it hard to come to grips with it because I seem to be using it in an unconventional manner....
any help would be HUGELY appreciated.. if you need any more code example or better explanations please ask.. I will do anything I can to get help..
Okay So I found out the problem was with declaring multiple instances of the same object.. So all I had to do was use a singleton design patter to get it working perfectly.
Alot of people dislike singletons but I am not sure how else to get around this issue???? any suggestions would be greatly appreciated.
Also I know this worked because I have since checked the DB by logging the storeURL in the appdelegate, then copying pasting that dir, into the goto file - then opening up the sqlite db in xcode.. all the values are in there perfectly.

Auto Redial using iphone app

Two questions actually.
First : I know iPhone is missing auto-redialing functionality but is there any other way to achieve it by iPhone application, as I can call by my application but facing problem cannot auto redial.
Second : Before calling I want to implement functionality of loud-speaker on a button action.
Is there any way to achieve the above 2 functionalities?
I spent 4-5 hours on googgling about it and the result is only this
I go through to apples doc and found some code hereand also tried this but cant get the right way to implement above functions ...
Any help would be greatly appreciated!
Thanks!!!
Neither of those actions are possible with the SDK.
For the Second case it's definitely NO.
But for the First case, I have no sure about this, but can be tried:
Subscribe with the CTCallCenter for call states notifications and use some background application type (voip, location or audio) or use some waiting block, that will allow to prevent going to suspended state as long as possible
Open URL using tel://
If the call notification about call failure comes in, try to repeat opening an URL
Once again, just an idea, may not work at all :/

Location or Alternatives for Zends getRequest()->isPost()

i was wondering about where Zends functionality comes from when inside of a controller i call
$this->getRequest()->isPost()
It works, but i do not find where this "isPost()" function comes from.
I just noticed it because i don't have intellisense for that.
Question is:
Is this merely some fallback function that "newbie users" use apart from a better alternative?
Or is it perfectly valid using it?
Thanks :)
It is the official way to go, you can use it. Check the source code of Zend_Controller_Request_Http::isPost() to see what it really is doing, if you'd like :)

What causes (and how can I fix) this odd Core Location error?

ERROR,Generic,Time,320195751.128,Function,"void
CLClientHandleRegistrationTimerExpiry(__CFRunLoopTimer*,
void*)",Registration timer expired,
but client is still registering!
There are only a few mentions of this problem that I was able to dig up in the wider Internet, and nobody has useful info. Here's the context:
I have an app that monitors the device's location via CLLocationManager's startUpdatingLocation method. It starts monitoring, runs for a little while, then this message pops up in the debug output. From that point forward, no more location updates are delivered.
This error is killing the location functionality of the app, and I'm at a loss as to what may be causing it. It even has an exclamation point at the end, which means it's clearly an exciting error.
Update:
Though I never found a solution to the problem, or figured out why it happens in the first place, I've also lost the ability to reproduce it. This seems to have happened during some period of time in which I did many things, including a general change in code structure followed by update to the iOS 5 beta. Something there seems to have silenced the issue for me.
Have you implemented
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
and does this catch it?
You need to check for kCLErrorNetwork, kCLErrorDenied, kCLErrorHeadingFailure and kCLErrorLocationUnknown in the normal run of things but I'm wondering if there are other errors that the delegate can still catch?
This could give you the opportunity to stop and then restart location services.
Going off of what #schillace had to share, is it possible that you're attempting to force location updates without heeding the user's authorization status?
Try to hold off on calling -startUpdatingLocation until you know that [CLLocationManager authorizationStatus] == kCLAuthorizationStatusAuthorized.
I don't know if this is the answer or not, but here's a hint...I'm working with assetFromURL and I'm getting intermittent failures to load images from the asset library. So I wrote a bit of code to test a theory, that loads every url in the library very quickly. I started seeing this error with this bit of code.
So...my theory is that if you make a call that causes the location manager to show the "app wants your location" dialog, and then you continue to make calls while that dialog is up, you'll get this error. Once I acknowledged the dialog and re-ran the program, I didn't see this error any more.
Hope that helps, it's just a guess.
Are you sure this is a problem? It looks to me like you are debugging to a breakpoint (effectively suspending the application) before the registration to the location manager is completed. Meanwhile, the timer expires and you haven't finished your registration. If you take out the breakpoints, does the message ever appear?
Are you doing location stuff on the main thread? I had all sorts of bizarro issues with CLLocation API calls from a background thread. I moved a couple of key setup calls into the main thread, then everything worked fine.
I got the same error and figured out that it was because I had forgotten to mention that the class implements the CLLocationManagerDelegate in the .h file.
Adding the CLLocationManagerDelegate to the header file, and the following line to point to the delegate solved the error for me.
locationManager.delegate = self;
[locationManager startUpdatingHeading];
I got this when implementing the timeout (perform selector after delay) in LocateMe, my previous code used another method. I don't know if this is a clue.
I had forgotten to add
Privacy - Location When In Use Usage Description
I did that and the error went away for me.