How to get address and phone numbers using MKReverseGeocoder in iPhone - iphone

Is this posible to get the users current location with address and contact information(phone number).
I have used CLLocationManager to get the current location of the user and the tried to get the address and other detail using google API, in the response I am getting current location's detail. But there is no contact information.
Like if user is currently visiting walmart or any other famous location then we can get their store's phone numbers or not?
Please tell me that, Can we get the phone numbers using google API or not?
Thanks

If you can, it would be passed to you in the MKPlacemark that is sent to the MKReverseGeocoder delegate you have specified.
There is an "addressDictionary" property, which contains dictionary entries that conform to the "Address Book". If a phone number is available it would be in there.
If not, it either isn't available for your location or Google doesn't return that data to the reverse geocoded API.
Based on Google's JSON/REST based docs (http://code.google.com/apis/maps/documentation/geocoding/) I'd assume this data won't be returned, as it doesn't seem to be returned by the native API either.

Related

Can I get street address, phone, gender from Google ID token?

I am working on Google Action for Google Assistant. Our custom Action relies on user's phone number to get additional information from external server.
According to the official guide you can use Account linking with Google Sign-In to get some user information from Google ID token:
name
given_name
family_name
profile_picture
email
locale
I know that you can fill out optional contact fields in Google account like address and phone number.
Does anyone know if Google ID token contains this optional information or no?
The answer depends.
Some basic personal metadata is available through Google Sign-In. With regards to the other fields:
Address
This information is not easily accessible. You can use an in-dialog permission to access the current location, but not the home address necessarily.
If your Action uses physical transactions, then you can get their address in order to ship items. But you shouldn't use this as a way to get the address if you're not shipping items, and such an attempt would be detected during review.
Phone Number
No, this is not something you can readily access. For general things like notifications, Google Sign-In gives you an email address. You also shouldn't ask it in your Action. The review team won't be happy with that, and the voice transcription doesn't work very well for long numerical sequences.
Gender
No, this is not something that is part of the Google Sign-In, and there's no helpers. With regards to asking it yourself, I don't think the review team would have a problem, although you may want to consider whether it's necessary for a good voice design.
No. Address, phone, and gender are not available fields/claims in Google's ID Token (JWT).
See: https://developers.google.com/identity/protocols/oauth2/openid-connect#an-id-tokens-payload

search specific number in iphone contacts

I am developing a Voip application. My application has its own call logs and screen is same as native call logs. Application also has its own contacts received from server and also has iphone contacts option which display iphone's contacts like Skype.
Problem :
If any contact suppose "9999999999" is stored in native contacts i.e. in iphone contacts. It will be stored as "99-99-999999" in iphone. Now suppose incoming call in my application comes from "+919999999999" number (means with country code).
My app should find name for that number and display it. And call log detail screen should display all information which is stored in iphone's contacts (like photo, multiple number, etc.)
To search name for number I have used This. But given method in like compares exact number (not compare number with or without country code).
Is there any API available ?
I don't know how it is possible because "Bria" and "Viber" application does this.
Any help....
Thanks in advance.

How to Share GPS Location iOS

I have seen some apps that offer functionality to share location via email or SMS. I have done a good amount of searching and haven't found much regarding this. Is it because all that is shared are the longitude, latitude information (thus being very simple)?
You need to grab location information and use a transportation medium (email, TCP/IP, HTTP) to send it to a remote site. There is no automatic way of sharing that.
For this you have to fetch Current location of user with the help of core location and with the help of this latitude longitude you can share a google map link to other user via facebook, gmail or any social media.
You need to use CLLocationManager to subscribe for location updates. They are happening asynchronously and every second. You may control precision and some other parameters. Once you get it, you need to push a notification to another device thru your service or something like Urban Airship. I build my app like that https://itunes.apple.com/us/app/citrus-location/id777381230?ls=1&mt=8.
Here is more info from Apple: https://developer.apple.com/library/ios/documentation/userexperience/Conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html

is there an API call that gives you an iPhone user's "My Info" contact DB record?

So in the latest iOS (not sure about prior) there is a "My Info" setting that let's the user pick a ContactDB record on his device that is "his".
Is there an API call to get this value? I can query the user's entire ContactDB, but figuring out which contact DB is his isn't trivial.
There’s no public API that I know of to retrieve the user’s “me” card. Your best option is probably to present an ABPeoplePickerNavigationController asking the user to select it.
Also, I believe Bump had a setup step that asked for your contact info, and the moment you gave it your phone number (or email?) it looked up the contact card with the matching info and autofilled the rest of the form. A bit of a workaround, but it did the trick.

Need to verify address of a user in iphone

I need to verify the address entered by user in my app .What basically i need is how to veriry the address entered by the user suppose user enters the address like 7 Breezeland Road, Carpentersville, IL - 60110 now this is the correct address for which i can get lat lon from the following google api http://maps.google.com/maps/api/geocode/json?sensor=false&address=7 Breezeland Road, Carpentersville, IL - 60110 .
But suppose say user enters 7 asdfasdf Breezeland Road, Carpentersville, IL - 60110 then i need to verify this type of address, means is there any api for the same which i can prompt user that this is probably wrong address and ask him was he looking for this 7 Breezeland Road, Carpentersville, IL - 60110.
If someone can add their inputs or suggestions or any related API it would be a great help .
You're probably going to be excited about the Google Geocoding API: http://code.google.com/apis/maps/documentation/geocoding/
Jordan's on the right track with the Google API, but note that Google does address approximation, not address verification. For actual (USA) address validation, you'll need to access a CASS-Certified vendor (one who has been approved by the USPS) to supply official information.
I used to work in the address verification field, at SmartyStreets. For example, they have a service called LiveAddress - it's free like the Google API, but will only return correct results and suggestions, among many other things. So look into that... remember, you probably are wanting to determine if an address is actually deliverable. That comes from official USPS data. Google will show you a pretty map and make a best guess, but often the addresses don't actually exist.