Does google maps need api key for IOS application (and why) - ios

I saw in this link
http://codewithchris.com/iphone-app-connect-to-mysql-database/#connectiphonetomysql
Mr. Chris uses a google map without a key.[I've tried it and it's working]
but, when i enter google developer
Here: https://developers.google.com/maps/ios/
they say [get a key].
(why should i do it? i got confused)
if it's required to run it in my app, how can Chris did it?
pre-Thanks ^^.

Yes Google map needs API key, without API key your request will be failed.
WHY: Every app is unique with its bundle ID, API key provided by google is used to identify the app uniquely.
There are so many paid services are offered by google to used in our app, App id used to manage your account based on request to API made/ package selected by you.
It also helps you to analyse use of google API through your app, which may may help you plan out your furthuer updates/usage to your App.

Related

How to call WiziQ API from iOS?

I want to integrated WiziQ api with my iOS app. I have created account on it but i do't getting how to call that api using "Access Key" and " Secret Key". I have lots of googling but not getting any idea to how to create User authentication and call list of api.If any one have idea let me know.
Wanted to share that WizIQ API is not open source. You cannot integrate it with your iOS App by yourself. However, you can get it done through WizIQ itself as they provide whitelabelling services for the app.
Hope it helps.
If you simply scratch the surface of the WizIQ developer site, it reveals the following about receiving the keys you speak of, specifically on the Get API Keys page:
To obtain an API key, you need to upgrade your account. Contact our sales team here or call
us at +1-919-647-4727.

Keep receiving REQUEST_DENIED for Google Places for iOS

I keep receiving REQUEST_DENIED when trying to use Google Places Autocomplete for iOS.
The example link is https://maps.googleapis.com/maps/api/place/autocomplete/json?input=londo&location=45.647157,25.628332&key=AIzaSyCHRmOeUQCcI_1JbcWiJ (I have ommited some of the last characters of the key)
Both Google Places API and Google Maps API are enabled from Google Developer Console
I have a valid key in Credentials section, for which I also added my bundle identifier in the list of bundle identifiers
The key is an iOS applications key, in Public API access section. It's valid and is created by me (owner)
Can anyone point me out to the good direction ?
Thanks in advance.
I found the problem: you need to enable the Google Places Web Services as well and use the server key (Funny enough, this thing is not specified in any of their docs)
Directions API require not iOS key, but server key. When you'll create server key, leave text view blank, do not enter your bundle name.
Use Browser key or server key for Google Places Autocomplete API. Keep the referrer field as empty. Make sure you enable Google Places API in the developers console.
I met the same problem last week and struggled for quite a while. The way I solved the problem is to follow the Google Places API for iOS https://developers.google.com/places/ios/start. Use GMSPlacesClient instead of JSON calls.

"accessNotConfigured" error occurred using Youtube API v3

I have been struggled with Youtube API and now I am stuck.
What I did is:
create a project at google developers console(https://console.developers.google.com)
enabled "YouTube Data API v3"
generate api key of iOS.
access to https://www.googleapis.com/youtube/v3/search?key={API KEY}&part=id&q=soccer by web browser and got the error message
Am I missing something?
I have read many questions but I cannot solved yet.
In step 3 "generate API key for IOS", the comment on the Google Developer Console web page says
Use of this key does not require any user action or consent, does not grant access
to any account information, and is not used for authorization.
Clicking on the *Learn More" button, it says:
Use an API key when your application is running on a server and accessing one of the following kinds of data:
•Data that the data owner has identified as public, such as a public calendar or blog.
•Data that is owned by a Google service such as Google Maps or Google Translate. (Access limitations may apply.)
I think you need to use the OAuth process rather than the API Key. Click on Learn More in the OAuth section of the Developer Console web page to learn about using OAuth with Apple iOS.
To create oAuth credentials for iOS:
Create new Client ID / Installed Application / iOS
I know it sounds a bit elementary, but I solved this same problem by going back into Google developer, creating a whole new project, new API key, and then it worked. Google quirk??

iOS apps and Google Geocoding API

I'd like to make use of the Google Geocoding Json api (http://maps.google.com/maps/api/geocode/json?address=%#&sensor=false) in my iOS app, but I don´t find if the use of this URL has any restrictions and/or this may be rejected when submitted to App Store.
Thanks in advance
There are some restrictions, read the documentation in particular the Usage Limits and Maps API Terms of Service License Restrictions.
This would not be a problem for the app store. Apple does not restrict what geocode service you can use.
First thing I noticed is you are using Non-secure URL to access google geocode API, which will give no data from Google side.
Second thing, Apple has rollout some guideline during WWDC 2016 to use always secure URL if you want to access it withing from APP please check out the link so there are chances about maybe they found you are using non-secure link to communicate with web service, and your application will be rejected from Apple.
We are using Google GeoCode and reverse Geocode API within Unity using C# HTTPWebRequest class with the Secure link. our app pass out through Apple Review

Google Places API: iOS key: Request Denied [duplicate]

I'm trying to make an Autocomplete field which should fetch cities as the user types, by using the Google Places API as described in this tutorial:
https://developers.google.com/places/training/autocomplete-android
You've probably found this question around many times before as I did, but none of the answers helped me. Here are the things you should know:
The URL is
https://maps.googleapis.com/maps/api/place/autocomplete/json?sensor=false&key=myKey&components=country:ro&input=whatTheUserTypes
Please don't reply by saying you replaced the API key with your own and it worked - the API key which goes there must be Android specific and won't work from a browser.
So did I make the Android API key using the SHA1 fingerprint obtained from the keystore I signed the app with.
I turned on Maps and Places APIs from the console.
The quota isn't exceeded.
All those and it still gives me REQUEST_DENIED
What I didn't mention is that I have O2Auth activated - does that change anything? Shouldn't it be as simple as putting the API key in the app?
Thanks!
Although this has been answered, I think the community could do better.
I was tearing my hair out about this, it just didn't make sense to me.. I was making an iOS/Android App, so I made an iOS/Android Key...
Wrong.
With Google's Places API, your bundle identifier isn't even considered.
What you really want to do is this:
(I'm using the new User Interface)
1. Log into https://cloud.google.com/console#/project
Select your Project Name, then go into API's & Auth > APIs
Make sure you have Places API Turned on. This is the only thing that needs to be turned on for Places-API to work.
2. Go into Credentials
Click CREATE NEW KEY under Public API Access
3. Select BROWSER KEY
4. Click Create, Nothing Else
Leave the HTTP Refer box empty.
5. Use the Key Generated here
This key will allow ANY user from any device access to the API via your Developer login.
You can try it out here: (Be sure to replace YOUR_KEY_HERE with your generated Key)
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Food%20Sh&sensor=false&radius=500&location=0,0&key=YOUR_KEY_HERE
6. Enjoy
Now you can use that URL above in your Android/iOS device.
The Google Places API does not currently support Android or iOS keys generated from the Google APIs Console. Only Server and Browser keys are currently supported.
If you would like to request this support, please file a Places API - Feature Request.
https://developers.google.com/places/training/autocomplete-android
Storing your API key
Although the above code demonstrates how to communicate directly
between an Android app and the Places Autocomplete service, you should
not store your Places API key with your app.
You should therefore build a web application that stores your API key
and proxies the Places API services. In order to secure communication
between your Android app and the proxy web service, you should require
user authentication to your proxy web service. Your Android app can
securely store user credentials and pass them to your web service, or
the user can log into your web app via an Android WebView.
For the latter approach, your web app should create and return a user
authentication token to your Android app, and your Android app should
subsequently pass this token to your proxy web service.
Go to google cloud platform console>Credentials click on edit by selected your YOUR_API_KEY>Application restrictions > select none option>save thats it.
If you select the android apps option from Application restrictions then google deny the place API with exception REQUEST_DENIED.
In Google dev console, you should be able to find both "Places API" and "Places API for Android"
Make sure to use "Places API for Android"
For some reason, "Places API for Android" is hidden in the API list, but can be accessed using search.
I had the same issue , I fix it by leaving
Accept requests from these HTTP referrers (web sites) (Optional)
in browser key Empty
I am still new, so I cannot comment, but to shed some light on Moe's answer, I resolved some similar Google Maps API issues regarding URL queries (for directions, using Volley) with the following steps:
Get Android API Key (including Google Maps Directions API in my case).
Get "Server" API Key (which seems to be created by using a key restriction of "HTTP referrers" these days - really, it's just used to issue URL queries through HTTP).
Store the Android API key as a meta-data tag in the application tag in AndroidManifest.xml with android:name="com.google.android.maps.v2.API_KEY" and android:value as your key. This is used for direct interaction with the Maps API (minus URL queries).
Use the server API key whenever issuing URL queries.
I am not sure if this also applies to URL queries for the Places API, if you only need the server API key, or if there is a better solution, but this worked for me.
I imagine that it works with just the first key - the one not restricted to Android.
Inside Google Cloud Console type Places and Activate it. Create an API Key and insert it onto your Android Studio App as you would do normally. That`s it.
I had the same problem. For me the key was to enable billing on project. I am still using "Applications for Android" restrictions. After setting up the payment method, Places Api started working.
Prior to using the Places SDK for Android, do the following:
Follow the Get an API Key guide to get, add, and restrict an API key.
Enable billing on each of your projects.
Enable the Places API for each of your projects.
See it there.
Be sure also to check out the billing plans for the Google Places API as it is not free!

Resources