GMSMapView doesn't show the map - swift

We're trying to add a GMSMapView to a view controller in our app and the map only shows Google logo but the map itself is not visible
And here's what we've checked so far:
1- We made sure GMSServices.provideAPIKey(apiKey) is called
2- Maps SDK for iOS is enabled on console.cloud.google.com
3- The API Key is not restricted to any bundle id (we even tried it on a separate project and it worked)
4- We tried to add GMSMapView programmatically to an empty ViewController using the code here (still didn't work)
https://developers.google.com/maps/documentation/ios-sdk/config#add-map
So any ideas what else we can do?

Have you try to call GMSPlacesClient.provideAPIKey(apiKey) too ?

Related

Xcode Swift 5 MacOs app empty window when archived but works when running it from Xcode

I am building an app for Mac which logs into a website based on login and password collected from textfield and secure text field, then app opens an url which is created in my app based on date range selection with use of two date picker cell calendars. Next app displays html data in webWiev (using WKWebView), converts html to string using extension NSAttributedString and then saves retrieved data as txt file. Everything works as expected as long as app is run from Xcode "play" button. Problem is if I archive this app and launch it, it will bring up an empty window without any button, calendar or textfield. There are no errors, no crash logs on organizer, nothing.
I decided to perform a little test. I build another view controller with only one button which upon clicking will show my app main view controller. After archiving this modified app and running it outside of Xcode a window shows view controller with one button which is correct. But after clicking it nothing happens. App works great if running "inside" Xcode, a pushbutton shows main ViewController correctly. Do You have any clue what can be wrong? thank You!
Edit 1. So I found a discussion on apple which mention this problem. It is associated with IB WKWebView and problem is already known since some time. Now I have to get around the problem. Apple forum link: https://forums.developer.apple.com/thread/116047
Did you embed WebKit.framework to your app?
After comment that I wrote, I founded a solution and solved with this method.
Please check it out.

Xcode Storyboard not updating custom class Designables

I have had many problems after closing Xcode which one of them is that Xcode Storyboard is not updating Custom Class Designables anymore and do not show the content. For example I use "SkyFloatingLabelTextField" which worked perfeclty before so I can't blame the library. Is there some way so I can force it to update it?
What I mean illustration:
As you can see, in the first picture I have assigned the custom class and there is actually textField inside my viewController which for some reason doesn't show up anymore in Storyboard but works on real device or simulator.
So can I force it somehow?
I tried removing the class and all runtime values, clean, build close Xcode but nothing is working.
Huhh... Enabling "Automatically refresh views" did the trick. For some reason it was turned off in my case. If you do not know what I mean, then it is the setting in Editor -> Automatically refresh views

Xcode 7 - Launch Screen localization doesn't work

I've created a splash screen in Swift using Xcode 7. I've generated localizations as in the photo for different languages, but it doesn't work:
Can anybody help?
Ok I fix it after i create InfoPlist.strings and create splash screen for each language and add below in each file
"UILaunchStoryboardName" = "LaunchScreen";
"UILaunchStoryboardName" = "LaunchScreenSP";
Add two Launch Screen storyboards
You can find your info.plist added a key named "UILaunchStoryboardName"
Add an infoPlist.string file
Change the UILaunchStoryboardName = "ENLaunchScreen"; in your infoPlist.string to the name of storyboard you wanted
Another solution, you can set some basic image at the launch screen, then create a view in app delegate and add in to window's subviews, also bring to front pretend that this is Launch screen.
now you can configure this view by code.
last use DispatchQueue asyncAfter to remove this view.

Is title of 'My Map View' automatically used in mapKit?

When coding an app I found for a tutorial on using the MapKit facility on iphone, when running the app simulator, I find the title of the app called 'My Map View'.
I did a search on the words and it came up with nothing in the code workspace. Is this because the title is automatically shown as this from the Mapkit framework? Can I change it? How would I get to the code piece?
Also, I had a look at the nib file, and because the app has been fully programatically coded in the map, there is no nav bars etc. Everything has been hardcoded in, which doesn't help me at this point.
Okay, I found that if I go into the 'MainWindow.xib' and double click on navigation controller option, the Root View Controller nib pops up which has what i am looking for - the title bar!
Cheers

Modify the AdMob's SDK?

I have a simple question, I have add in my project the AdMob's SDK with all the header and the "libGoogleAdMobAds.a" and I want to know if it's possible to have access to this file to change some line of code.
You have to create the GADBannerView in the code.
If you try to use an UIView on Interface Builder and choose GADBannerView as the class of the object, the class wont link and you get that error.