Latest 0.2.0
License MIT
Platforms ios 8.0, requires ARC
Dependencies GoogleMaps, GooglePlaces, SDWebImage, ACProgressHUD-Swift

CI Status

This library is used to find nearby user from your current location with respect to your radius.


To run the example project, clone the repo, and run pod install from the Example directory first.


  • Xcode 6 or later
  • iOS 8 or later


NearbyUser is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'NearbyUser'


  • Objective C

#import "NearbyUser-Swift.h"

  • Swift

import NearbyUser

How to use

1.Create object for mapManagers class[which is in pod]

var mapObject = mapManagers()

2.mapManagers class has below method with returntype of GMSMapView
public func initLocationManagerWithRadiusAndMap(getRadius: String, googleMapView: GMSMapView) -> GMSMapView
return GMSMapView
usage of the above method is:
gMap = mapObject.initLocationManagerWithRadiusAndMap(getRadius: "yourradiusvalue", googleMapView: gMap)
(in viewDidLoad or wherever based on your preference)

3.mapManagers class has following variables:
/// This variable is used to store all user informatiom from json/api
public var userInformation: [[String: String]] = []
/// This variable is used set custom marker image
public var pinImage = UIImage()
/// This variable is used for placeholder image inside the pin image
public var userPlaceholderImage = UIImage()
/// This variable is used to store the current location of the user
public var currentLocationCoordinates = CLLocationCoordinate2D()

usage of the above variables is:
mapObject.userInformation = "yourData from api/json"
mapObject.pinImage = UIImage(named: "yourImage")!
mapObject.userPlaceholderImage = UIImage(named: "yourImage")!

4.The following methods to get users and marker within the radius
/// This method is to get all users within the radius
/// – Returns: value in [[String: String]]
public func getAllVisibleUserFromRadius() -> [[String: String]]
return [[String: String]]

/// This method is to get all markers within the radius
/// – Returns: GMSMarker
public func getAllVisibleMarkerFromRadius() -> [GMSMarker]
return [GMSMarker]

gMap – outlet of your GMSMapView[used in your project]
mapObject – instance of mapManagers class


RajeshwariU, [email protected]


NearbyUser is available under the MIT license. See the LICENSE file for more info.

Latest podspec

    "name": "NearbyUser",
    "version": "0.2.0",
    "summary": "Used to find the nearby users.",
    "description": "TODO: This library is used to find the nearByUsers from your current location.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "RajeshwariU": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.2.0"
    "platforms": {
        "ios": "8.0"
    "static_framework": true,
    "source_files": "NearbyUser/Classes/**/*",
    "requires_arc": true,
    "swift_version": "4.0",
    "dependencies": {
        "GoogleMaps": [],
        "GooglePlaces": [],
        "SDWebImage": [
            "~> 4.0"
        "ACProgressHUD-Swift": [
            "~> 1.3"

Pin It on Pinterest

Share This