iOS WiFi Survey

Adding one of my most missed Android apps to iOS (kinda, with caveats).

Before my switch to the the land of the Steves, I used an Android app to analyze and visualize the WiFi networks around me:

WiFi Analyzer on Play Store

Apple annoyingly (but probably for privacy/security/competitive reasons, I have my theories) does not allow any third party apps to have the same low-level access to WiFi information. That means all the so-called “wifi analyzer” apps on iOS can’t actually analyze the WiFi signals around you!

Apple does give one app access to low-level WiFi information that we can see, it’s own Airport Utility app. What I’ve built allows you to take the data from that app and visualize it:

Installation Instructions

Time for you to have a play:

  1. Install the Airport Utility App -> Link to App Store
  2. Open iOS Settings, scroll down to Airport Utility, tap to open and turn on WiFi Scanner
  3. Download and Add the WiFi_Survey Shortcut -> Link to WiFi_Survey Shortcut

Follow the steps in the above video to perform your own scan. When prompted on first run, Always Allow “WiFi_Survey” to open “kavinaidoo.github.io”.

Features

For now, this supports a single static chart showing networks found, WiFi channel and signal strength. Features and/or functionality may change, follow the project in GitHub for up to date information.

How it Works

  1. The Airport Utility scans for WiFi networks and stores the information captured.
  2. Tapping the share button creates a CSV with the WiFi network data collected.
  3. Tapping “WiFi_Survey” in the Share Sheet passes the CSV data to the WiFi_Survey Shortcut.
  4. The WiFi_Survey shortcut does the following:
    1. Receives the CSV data.
    2. URL Encodes the CSV data.
    3. Builds a URL, passing the CSV data as a URI fragment.
    4. Opens the URL in Safari.
  5. Once in Safari, the site loads and runs Javascript code that:
    1. Pulls the fragment out of the URL and tests to see if it has been cut off or malformed.
    2. URL Decodes the fragment into a CSV.
    3. Parses the CSV into a Javascript array.
    4. Processes the array into a format compatible with the charting library.
    5. Plots chart using chart.js

Post-Build Comments

I now have a tiny bit of the functionality of Android’s WiFi Analyzer on my iPhone with a base setup I can add more features to. Finally, I’ve done something more exciting with Shortcuts than “Netflix Time“. Having my first public repo on GitHub is equal parts awesome and terrifying. Now the whole world can see my spaghetti code. Special shout outs to the Chart JS YouTube Channel and Stack Overflow.

The Future

The CSV contains timestamped data collected over the scan duration but the current version just uses data from the end of the scan to create a static chart. How about using all the data to make charts a bit more ✨dynamic✨…

If you have any questions/would like to share your experience with iOS Shortcuts, writing front-end JS or starting out on GitHub, leave a reply below. To receive an email when I publish a post, subscribe here. Till next time!

(Featured image remixed from this photo)

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑