Delivered remotely for a business based in Munich, Germany. Names withheld by agreement.
Project Overview
Checking a hotel room, short-term rental, or private conference room for concealed recording hardware requires inspecting several distinct physical and wireless signatures—none of which can be verified reliably by a single sensor alone. Everyday consumers rarely carry dedicated RF spectrum analyzers or optical borescopes, yet they already carry a calibrated suite of magnetometers, high-resolution cameras, radios, and local networking stacks inside their pocket.
We built a native Objective-C iOS privacy utility that transforms those onboard sensors into a structured, intuitive room-sweep toolkit. Rather than packaging gimmicky meters over raw noisy outputs, the engineering focus centered on signal conditioning, strict adherence to Apple's hardware sandbox rules, zero-cloud privacy guarantees, and responsive visual and haptic feedback that guides users smoothly through a physical inspection.
Hardware & Sandbox Constraints
Building a genuine sensor utility on iOS means confronting two realities: physical hardware limitations and Apple's tightening OS privacy boundaries. Smartphone magnetometers measure Earth's ambient magnetic field alongside steel rebar, speaker magnets, and power adapters; naively graphing raw microtesla numbers overwhelms users with constant false alarms. Likewise, infrared emitters and pinhole lenses behave differently depending on ambient lighting and phone LED geometry.
On the networking and radio side, iOS strictly forbids raw ARP table scraping or arbitrary MAC address extraction outside enterprise entitlements. Attempting undocumented workarounds risks immediate App Store rejection or silent runtime failures across iOS updates. Our architecture had to extract maximum diagnostic signal strictly through documented CoreMotion, AVFoundation, CoreBluetooth, and BSD/Bonjour APIs.
Architectural Strategy
We designed the application around isolated, single-purpose inspection engines coordinated by a lightweight UIKit workflow:
- Pure native Objective-C & C-interop execution: Writing directly in Objective-C simplified zero-overhead access to
CVPixelBuffercamera frames,CMMagnetometerDatastructs, and non-blocking BSD socket descriptors without Swift/JS marshaling layers. - Guided multi-modal sweeps: Rather than claiming one-tap detection, the app separates inspection into four complementary disciplines—electromagnetic sweep, optical glint inspection, Wi-Fi host discovery, and BLE proximity tracking—paired with a structured room checklist.
- Strict on-device isolation: No network calls leave the local LAN subnet, no camera frames are written to disk unless the user explicitly exports an inspection note, and zero third-party telemetry libraries are linked.
Core Capabilities
- Calibrated Magnetometer Sweep: Continuously reads three-axis magnetic flux via
CoreMotion, establishes a room baseline, computes vector magnitude deviations, and drives a real-time analog meter with proportional haptic pulses as the phone approaches hidden electronics or energized coils. - Coaxial Optical Lens Inspection: Streams rear-camera video through
AVFoundationwith manual torch toggle, exposure lock, and selectable color-inversion/contrast overlays that accentuate pinhole lens retro-reflections inside smoke detectors, clocks, or wall trim. - Local Network & Bonjour Scanner: Discovers active devices sharing the local Wi-Fi subnet using mDNS service browsing and non-blocking TCP service probes, flagging common media-streaming, RTSP, and web-admin ports with human-readable service hints.
- BLE Peripheral Proximity Radar: Scans nearby Bluetooth Low Energy beacons via
CoreBluetooth, displaying smoothed RSSI signal bars, advertised device names, and service UUIDs so users can walk toward an unknown transmitter. - Structured Room Inspection Checklist: Walks travelers step-by-step through common concealment points—mirrors, wall outlets, thermostats, and vents—storing local sweep timestamps solely on the device.
Technical Architecture
Flow: Hardware sensors (CoreMotion / AVFoundation / CoreBluetooth / Wi-Fi NIC) -> Objective-C acquisition controllers -> Signal smoothing & subnet probe queues -> UIKit real-time gauges & local sandbox storage.
Each diagnostic module runs on its own dedicated GCD queue so heavy video frame processing never starves magnetometer sampling or UI responsiveness. CMMotionManager pushes 50 Hz magnetometer updates into a ring buffer processed with moving-average filtering to suppress hand tremor noise while preserving sharp localized spikes. Simultaneously, AVCaptureVideoDataOutput delivers pixel buffers where optional luminance and high-contrast filters render cleanly inside a hardware-backed preview layer.
For local network sweeps, an asynchronous GCD operation queue verifies active Wi-Fi interface addresses via getifaddrs, resolves the local CIDR range, fires bounded non-blocking connect() probes with short millisecond timeouts across standard camera and streaming ports, and merges findings with NSNetServiceBrowser Bonjour announcements into a single deduplicated host list.
Technology Stack
| Category | Technology detail |
|---|---|
| Application language | Objective-C with Automatic Reference Counting (ARC) |
| Magnetic & motion sensors | CoreMotion (CMMotionManager) raw and calibrated magnetometer streams |
| Optical camera inspection | AVFoundation live video preview, torch intensity control, and frame capture |
| Bluetooth scanning | CoreBluetooth (CBCentralManager) for nearby BLE advertisements and RSSI |
| Local network discovery | BSD sockets, mDNS/Bonjour (NSNetServiceBrowser), and subnet probing |
| Wi-Fi & permission context | CoreLocation & SystemConfiguration / NetworkExtension SSID context |
| Signal processing | Accelerate / vDSP moving-average smoothing and baseline threshold filtering |
| UI & persistence | UIKit custom gauges, haptic feedback (UIImpactFeedbackGenerator), local plist/SQLite logs |
Engineering Trade-offs & Solutions
| Architectural Dilemma | Chosen Solution & Rationale |
|---|---|
Calibrated vs. uncalibrated CoreMotion magnetometer stream |
Used calibrated magnetic field data by default to strip hard-iron phone casing bias, with dynamic relative delta calculation so users do not get tripped up by Earth's background field orientation. |
| Blocking socket scans vs. multiplexed non-blocking probes | Built bounded non-blocking BSD socket sweeps over GCD queues with strict concurrency caps, completing full /24 subnet port checks rapidly without tripping iOS socket descriptor limits. |
| Raw BLE packet flood vs. smoothed RSSI ranking | Averaged incoming CoreBluetooth RSSI readings over a sliding window and suppressed stale peripherals with an expiry timer, preventing UI list jumping during live proximity walks. |
| External vendor OUI API lookups vs. bundled local lookup table | Embedded a compact, offline vendor/service signature lookup table directly in the app bundle so network sweeps work identically on isolated guest networks without leaking scanned hardware metadata online. |
Privacy & Permission Boundaries
A privacy utility must uphold higher privacy standards than the threats it helps uncover. Every permission prompt—Camera, Local Network, Bluetooth, and optional Location for reading current Wi-Fi SSID names—is requested just-in-time when the user opens the corresponding sweep mode. If a user declines Location access, the LAN scanner still probes the local subnet cleanly using interface IP boundaries without blocking functionality.
All compiled binaries avoid third-party advertising, crash-upload, or analytics frameworks. Local inspection logs reside inside the encrypted iOS Data Protection sandbox and can be wiped instantly from within the settings screen.
Signal Processing & Battery Efficiency
Running the rear camera LED torch, continuous AVFoundation video frames, CoreBluetooth active scanning, and 50 Hz CoreMotion polling simultaneously places substantial thermal and battery load on a phone. Rather than activating all subsystems globally on launch, each mode cleanly acquires hardware resources in viewWillAppear: and tears down AVCaptureSession, CBCentralManager scans, and CMMotionManager updates immediately when the user navigates back.
Memory allocations inside the video frame callback avoid per-frame Objective-C object churn by reusing pixel buffers and throttling UI gauge redraws to display refresh rates, ensuring smooth frame rates even on older iPhone hardware.
Operational Outcomes
The finished Objective-C utility delivers a calm, verifiable room-inspection workflow built strictly within Apple's documented hardware APIs. By replacing noisy raw sensor readouts with baseline-calibrated deltas, coaxial optical contrast tools, and deterministic LAN/BLE discovery, everyday users can inspect unfamiliar environments quickly without specialized hardware or technical training—and with complete confidence that their sweep data never leaves their handset.