FindViewControl is written in Swift
CocoaPods is a dependency manager for Cocoa projects.
pod 'FindViewControl', :git => 'https://github.com/Kruks/FindViewControl.git', :tag => '1.0.12'
Also, add below code at the end of the pod file
pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies; end
end
You need to add GoogleMaps framework manually, for that go to "Pods" project, select target "FindViewControl" goto Build Phases in "Link Binary With Libraries" add GoogleMaps.framework from project. Also in Build Settings in "Framework Search Paths", please verify the below two paths are added for both debug & release(If not, add it manually):-
"${PODS_ROOT}/GoogleMaps/Base/Frameworks"
"${PODS_ROOT}/GoogleMaps/Maps/Frameworks"
(Add this code in viewdidload for viewcontroller)
// Initialize Picker for filter
let pickerArray = [FilterObject]()
let fobj = FilterObject()
fobj.filterID = "fire_station"
fobj.filterValue = "FireStation"
pickerArray.append(fobj)
let fobj1 = FilterObject()
fobj1.filterID = "gas_station"
fobj1.filterValue = "gas_station"
pickerArray.append(fobj1)
// Init Find Control
_ = FindControl.init(viewController: self,googleAPIKey: "AIzXXXXXXXXXXXXXXXXXX8sk",useGooglePlaces: true, filterArray: pickerArray, gisURL: "GIS validation URl", googlePlacesKey: "AIzaXXXXXXXXXXXXXXXXXXFFMc", defaultLattitude: 34.052235, defaultLongitude: -118.243683, defaultAddress: "test")