Note that the following procedure is only supported in iOS 8 and later.
For more information about Wi-Fi scanning, see also:
Article by Jan Pedro Tumusok and Sverre Steinsland (illustrations)