Please follow the below steps to integrate this control in your next project.
- Easy & Fast to get customer location picker.
- You can select a location from Google Place API or User’s current location.
- Allow getting location for easy block implementation.
- Fully customized design layout.
To use this component in your project you need to perform below steps:
- Configure Google Firebase and Google Console Application to get API Key & Plist file from below URL.
- Install below list of CocoaPods in your application.
pod 'GoogleMaps'
pod 'GooglePlaces'
pod 'SVProgressHUD'
- Configure Google API Key & setup SVProgressHUD appearance in
didFinishLaunchingWithOptions
method.
// Setup SVProgressHUD Appearnce.
LocationUtility.sharedUtility.initOnce()
// Google Setup.
GMSPlacesClient.provideAPIKey(GoogleAPIKey)
GMSServices.provideAPIKey(GoogleAPIKey)
Note: replace ‘’ with your google api key.
- Add ‘GoogleService-Info.plist’ in your project and you will get this file from Google Firebase Console.
Note: If you not add ‘GoogleService-Info.plist’ file in your application then application will crash.
- Configure URL Types with 'REVERSED_CLIENT_ID' value from ‘GoogleService-Info.plist’. To configure URL Types please follow below steps.
Copy value of ‘REVERSED_CLIENT_ID’ from ‘GoogleService-Info.plist’. Select Project->Targets and open “info” tab. Expand URL Types at bottom of the screen and click on + button. Add ‘REVERSED_CLIENT_ID’ value in ‘URL Schemes’.
-
Copy ‘IntPickerViewController’ folder and add it to your project and make sure you have checked “Copy if needed” option.
-
Implement Address Picker from below code.
IntPickerViewController.show (with : self, coordinate: nil, address : "", completion :{
newCoordinate, newAddress in
let strMessage = "Lat: \((newCoordinate?.latitude ?? 0.0)!) Long: \((newCoordinate?.longitude ?? 0.0)!)\n\nAddress: \(newAddress!)"
print(strMessage)
})
Copyright (c) 2018 INTUZ
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.