Assuming you have the coordinates for the each online user, iterate that collection, create a CLLocation object from the coordinate data, and check that object against CLLocation method distanceFromLocation with a radius value.
https://developer.apple.com/library/ios/documentation/CoreLo...: