title: Google Maps strange behavior swift 4 ios
body: <p><strong>Update</strong>: Dose it have to do anything with language? as my app is sporting English and Arabic.</p>
  
  <p>Hi everyone I am struggling with this since days and I have tried everything but can not find any solution, the problem is when I run the app through xCode it all works fine like in the following screenshot. 
  <a href="https://i.stack.imgur.com/jTndt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jTndt.jpg" alt="working maps"></a></p>
  
  <p>Then when i unplug the device and reopen the app it stops working, the app is running fine but i dont see any map but just the markers like the following screenshot.
  <a href="https://i.stack.imgur.com/C74P9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C74P9.png" alt="not working map"></a></p>
  
  <p>Any help will be appreciated.</p>
  
  <p>AppDelegate</p>
  
  <pre><code> func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {
      GMSServices.provideAPIKey(googleApiKey)
      GMSPlacesClient.provideAPIKey(googleApiKey)       
      return true
  
  }
  </code></pre>
  
  <p>ViewController</p>
  
  <pre class="lang-swift prettyprint-override"><code>     //Step 1
       @IBOutlet weak var mapview: GMSMapView!
  
        //Step 2
       override func viewDidAppear(_ animated: Bool) {
              super.viewDidAppear(animated)
              self.mapview.settings.scrollGestures = true
              self.mapview.settings.zoomGestures = true
              self.mapview.isMyLocationEnabled = true
              self.mapview.settings.myLocationButton = true
              self.mapview.delegate = self
              self.mapview.layoutIfNeeded()
  
          }
  
      }
  
      //Step 3 After we have the current location items are loaded from server by user location and the markers are added in GetBusinesses function
      extension ItemsList: CLLocationManagerDelegate {
          func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) {
              guard status == .authorizedWhenInUse else {
                  return
              }
                  self.locationManager.startUpdatingLocation()
  
                  self.mapview.camera = GMSCameraPosition(target:  (self.locationManager.location?.coordinate)!, zoom: 14, bearing: 0, viewingAngle: 0)
                  self.GetBusinesses(data: "&amp;isOpen=2&amp;cat=\(Prefrences.getSelectedCategoryId())")
          }
      }
  </code></pre>