Google Maps not working on iPhone simulator - iphone

I've implemented the "Getting the Google Maps SDK for iOS" step by step
finally the simulator running ok no errors found but the map has no details except the marker.
As showing in the picture:
Also the output on the bottom has this message:
2012-12-23 01:06:59.869 GogleMap[3680:c07] GMSZoomTableQuadTree lacks root zoom table for >tile type (mapType: 10)
2012-12-23 01:07:00.042 GogleMap[3680:1b03] Google Maps SDK for iOS version: 1.0.1.1154
2012-12-23 01:07:00.375 GogleMap[3680:c07] ClientParametersRequest failed, 3 attempts >remaining. Error Domain=DASHConnectionError Code=100 "The operation couldn’t be completed.
(DASHConnectionError error 100.)"
Help please and thanks in advance.

Solved: I think we've all skipped a small but very important step in the process.
To get started, enable the Google Maps SDK for iOS service in the Google APIs Console alongside other Google APIs.
Once you enable GoogleMap SDK for iOS in the Google APIs Console, your app will correctly load the tiles on the next run.

#user1924208 I am having the same issue. I have searched the internet tirelessly for the answer and unfortunately I think we are out of luck. The Google API Console is probably showing you the API key for Google Maps v.3 which is NOT the Google Maps iOS API key. Therefore when you use that as your API key, the validation request will always fail.
It seems as if they haven't issued many API keys for the iOS version for whatever reason. As frustrating as it is, you will just need to wait until you receive an email from them (not really sure when that will be...).
You can confirm this because replacing the current API key with any random string will produce the same results. By the way, this also produces the same results both on simulator and on a real device, which I have tested.
Update
I just got an email from Google Maps that my API key is now available. I switched out the MKMapKit with GMSServices and things are working. It seems like they are a little more comfortable with releasing API keys now so hopefully you will get yours very soon.

Heads up, make sure you've also enabled "Google Maps SDK for iOS" in the Services tab.
I was getting a similar error till I realized I had only generated an API key but forgot to enable the service. Solved my issue.
SDKDemos[160:907] ClientParametersRequest failed, 0 attempts remaining (0 vs 5).
Error Domain=com.google.Maps.GMSDASHConnection Code=100
"The operation couldn’t be completed. (com.google.Maps.GMSDASHConnection error 100.)"

I had a similar problem, but I was sure that the API key was good because the example project from the SDK package worked with that key - bundle ID pair I used in the actual app. The latest (1.2) version of the sdk actually logs out a warning if your API key does not seem to be valid.
The reason it failed to display the map was that I did not fill in a build number in target summary tab of the project settings. Turns out you absolutely need to have CFBundleVersion set in your Info.plist for the google map to work, otherwise the map just stays blank with no errors or warnings shown or even web requests being made.

I had same problem. I think the problem is my "bundle indentifier" of my project is different from one of bundle identifiers in my Google APIs Console.
So I add more bundle indentifer for my Google APIs Console: select your project itself from the Project Navigator, and choose your application's target. In tab Summary, remember your string in Bundle Identifier.
Go to Google APIs Console page, select API Access pane in the console, locate the section Key for iOS apps, select Edit allowed iOS apps...and add your bundle indentifer that you remember above. Rerun your project and done!

Just make sure Location is enable from
Simulator options Features->Location->Apple

I was having the same problem, then i went to the google console and clicked on "Generate new key" and the the new key Worked!

Make sure you havn't changed your
[bundle identifier]
for the app. It should match with the one you used when generating API keys.

Following up on this from a different angle:
There was a bug in later versions of the Google Maps framework that prevented maps from being able to be instantiated/created/added to superview if the app was in the background.
When you did that, the resulting map would show up as completely blank other than the Google logo in the bottom left. The reason for this is because OpenGL rendering is not allowable by the OS while backgrounded; they just needed to restart the renderer once it was foregrounded.
Google has finally fixed this (after about a year) so please upgrade to the latest and greatest.
If you use Google for Business:
pod 'Google-Maps-iOS-SDK-for-Business', '~> 1.11.1'
A repro of this issue is here for older versions.
Visual repro:

Important: If you want to practice on google maps from iOS devices then just download the GoogleMaps.framework.
Unknowingly I have downloaded GoogleMapsM4B.framework and faced issues like 'your key may be invalid for your bundle id: com.company.example'
If you want to use GoogleMapsM4B.framework in your project then
1.You should request support on the Enterprise Support portal(Google's website)
2.You must enable Google Maps Mobile SDK for Work not Google Maps SDK for iOS in Google’s console website.
Incase if you want to use GoogleMaps.framework not GoogleMapsM4B(Maps for Business) then you need not request support center, you just need to enable Google Maps SDK for iOS in Google's console website.
You can find the key differences between the Google Maps SDK for iOS and the Google Maps Mobile SDK for Work(M4B).
and import GoogleMaps/GoogleMaps.h to your file and pass your api key to below method:
[GMSServices provideAPIKey:#“Your API Key“];
(or)
If you have valid license then download GoogleMapsM4B.framework and import GoogleMapsM4B/GoogleMaps.h to your file and pass api to same method [GMSServices provideAPIKey:#“Your API Key“]
but I guess you may get this key only after purchasing license.
So the main issue I have faced is... instead of downloading GoogleMaps.framework I have downloaded GoogleMapsM4B.framework and added to my project. Every time I run my project it gave me an error saying "Your key may be invalid for your bundle ID: com.example.sampleapp"
Now my project is working properly.

Looks like you haven't specified a valid API key. Do you have one?

This error is indicative of an invalid key used to initialize the Google Maps:
[GMSServices provideAPIKey:#"YOUR_API_KEY"];
The key is issued by Google specifically for the iOS SDK (apparently only to a few chosen ones); the keys for Google Maps SDK v2 and v3 would not work on Apple.
A way to confirm that the error is indeed caused by an invalid key is via displaying a pushpin. Pushpin does not require a valid key, so it will be visible on an empty map view object. Coding the example from the Getting Started page https://developers.google.com/maps/documentation/ios/start#add_a_map should result in the app displaying an empty map view (with yellowish background and a pushpin at the center).
The best way to guarantee the pin is visible is to use exactly the same coordinates for both the camera and the marker, see the snippet:
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:43.65
longitude:-79.45
zoom:6];
mapView_ = [GMSMapView mapWithFrame:CGRectZero camera:camera];
mapView_.myLocationEnabled = YES;
self.view = mapView_;
GMSMarkerOptions *markerOptions = [[GMSMarkerOptions alloc] init];
markerOptions.position = CLLocationCoordinate2DMake(43.65, -79.45);
markerOptions.title = #"Greater Toronto Area";
[mapView_ addMarkerWithOptions:markerOptions];

Another heads up!
Ensure that your app's bundle identifier matches the bundle id defined in the "iOS apps" field in Google APIs Console.

Got the same issue. For sure did everything right.
And the thing was that your API key needs some time to get working (maybe information about it propagates through google servers, meaning your closest server could not yet know about the new API key).
So in some 5 minutes after API key creation errors stopped and I have fully working API key. (note, I didn't receive any e-mails from google).

This helped me out: (Misspelt API key because XCode originally returned an error unless API was surrounded by {} IOS - ObjC Google Maps Api Key

I solved this problem as follows.
Go To Google Maps API Console(Old).
Enabled Service was Google Maps SDK for iOS and Google Street View Image API.
I have disabled Google Street View Image API.
And Then, error is no longer output.

for me it was due to that my app's bundle identifier has been changed. After taking new API key for the new bundle identifier it start to work again.

First thing is make your keys are right. Than check if you have enabled Google Maps SDK for iOS. Than run app on device, rather than a simulator.

try not to save API Key on any constants. Directly pass the value. If it is not working try regenerating the API Key Map will work for sure
MapServices.ProvideAPIKey ("AIzaSyAnxfhuAwEqdVhQpoUkGFZpsBukOSXVFr0");
happy coding :)

Now Apple remove the Google map and Add Apple map,.
Check the Following things:
Decrease Zooming in Map View.
What version iOS Used? if you used iOS 6 the google map not work Apple map must work.
Some times the Simulator not support some core functionalists kindly check the functionality to device.
Make sure the delegate and datasource must set.
Thanks.

Related

Google Developer Different Licence Key

I have been working on the internal testing mode on Google Play Console.
I have updated Unity to the version 2021.3.15f1 from a previous version. I used the same key and password I had used on the previous version.
When I uploaded the new release on Google Console it told me the my app bandle is signed to the wrong key. It gives me the expected fingerprint that it should have and the one the app has (the wrong one).
I have looked on what to do - the only solution that is being suggested is to delete the app and make a new one. The only problem is that as it is not published yet and I can't find a way to delete it.
I am very new in this so any advice idea will be very much appreciated.
Thank you very much

After application uses the same package name in AppGallery and GooglePlaystore, it is removed due to Google Play protection

Application is removed playstore by Google Protect.
Every release the version code from Huawei App Gallery is always higher than the version code in Play Store.
The new release version code in the Play Store will higher than the previous release version code in both Play Store and App Gallery.
But the rolling out percentage between the two stores is different. Not sure it would affect
Please help with another quick question. What will happen to App Gallery auto-update if we release the app in Huawei App Store with a different Keystore than the release in Google Play Store?
For the overwriting of each other from AppGallery and Google Play store problem, the root cause is the apps are using the same package name and the same signing key in conjunction with auto-update from both stores. When there is a higher version available from either store, the Android system would recognize it, download and update the app, which would cause overwrite.
The answer is actually in the second question. Using a new keystore for AppGallery would make the app different from the app from GPS from Android system point of view. Please use a new keystore for AG release, there will not be any overwritten problem once this update. Remember to update the SHA256 signature in AG for the new release.
This is a message displayed on Google Protect. We could not restrict the play protect. You can disable Google Protect on your phone manually.
In addition, Google Protect is a black-box detection, which is claimed to be an intelligent detection and may display a message for all apps that are not downloaded by Google Play.
Based on the warning message, this message comes in "Backdoor" category(refer below link).
https://developers.google.com/android/play-protect/warning-strings
Also you can refer the below link
https://developers.google.com/android/play-protect/client-protections#developer-appeal
So you can contact google support team regarding this.

Deep link issue on iOS (Universal Link)

I have created several Uber deep links via the Uber deep link generator and the links work fine on my Android device. However, when I access the links on my iOS, the Uber app comes on but the dropoff address doesn't come up. Instead, it shows me an empty search bar and I have to type in the address again. I proceeded to re-arrange my client_id to the front as shown but it still yield the same results.
https://m.uber.com/ul/?client_id=jZywlUAYPjYl3uRcFPquz0e_wJqLSmPZ&dropoff[formatted_address]=No.%2047%2C%20Beian%20Road%2C%20Zhongshan%20District%2C%20Taipei%20City%2C%2010491&action=setPickup&pickup=my_location
Does anyone know what I did wrong or what else should I do for this to work on both Android and iOS?
There are two things that you can check :
A minimum OS level of iOS 9 is required for Universal Links support. So please make sure your iOS version is up to date.
Can you try to add to your Universal Link : &d‌ropoff[latitude]=xx.xxx&dropoff[longi‌tude]=yy.yyy
UPDATE:
I have tested following Universal Link on my iPhone and it is working:
https://m.uber.com/ul/?action=setPickup&client_id=Rd3a2B9JITPWPLPzmvXXXXXXX&pickup[latitude]=25.0791848&pickup[longitude]=121.5265924&dropoff[latitude]=25.0777658&dropoff[longitude]=121.5283466&dropoff[nickname]=No.%2047%2C%20Beian%20Road%2C%20Zhongshan%20District%2C%20Taipei%20City%2C%2010491
Or
https://m.uber.com/ul/?action=setPickup&client_id=Rd3a2B9JITPWPLPzmvXXXXXXX&pickup[latitude]=25.0791848&pickup[longitude]=121.5265924&dropoff[latitude]=25.0777658&dropoff[longitude]=121.5283466&dropoff[formatted_address]=No.%2047%2C%20Beian%20Road%2C%20Zhongshan%20District%2C%20Taipei%20City%2C%2010491
I have added pick up location because my real location is not the location you specified - but pickup=my_loc‌ation is also fine if it is not against Uber terms related to pickup and destination distance. Also instead of "dropoff[formatted_address]" try to use "dropoff[nickname]"

Can i hook into significant location change service so that i can track a Phone latest location?

i would love to build a auto-start with OS app which runs in IOS background(like a daemon) and when the phone changed its location the app send some information(userid,GPS,time......)to a web server immediately, in addition to,i want my app has no icon and users can not easily find it is on running or easily delete it. so i just wondering if these is some location-change notification i can hook into so that i can perform my code? anyone give me a good idea? i dont want put my app on appstore instead of i packaged it in deb,so i can use any private api or other non-official methods....
You can use CoreLocation native framework.we can access the current location of the user/device dynamically. follow the link for instructions coreLocation tutorials
According to Apple's Documents and guidelines, I don't think an app can exist without icon. The SDK doesn't have this feature as well. And no private API will be accepted into App Store. However, you can post your project on unofficial AppStores for jailbroken phones.

Deploy to iPhone, no network access

I've managed to get both an iPad and iPhone hooked up to xcode, and can successfully deploy to the device. For some reason I'm getting network errors every time I try an access a feature that requires the internet, so I think there must be some setting in XCode I'm missing.
Do I need to specifically tell xcode that I permit the device to access the network?
Turns out it was an issue with PhoneGap (used to create cross-platform apps by using HTML5).
The error I was getting was similar to this:
SampleApp[549:17803] ERROR whitelist rejection: url='http://code.jquery.com/jquery-1.6.4.min.js'
And the solution can be found here:
http://www.anujgakhar.com/2011/11/22/phonegap-gotcha-error-whitelist-rejection/
"In your PhoneGap.plist file, you need to add the allowed URLs to the ExternalHosts array. I added “*” as I did not want to add each individual URL separately to the list but that’s your choice."