WISSID
The Service Set Identifier (SSID) for a Wi-Fi network, from which applications derive the human-readable network name.
Declaration
struct WISSIDOverview
An SSID represents the identifier for a wireless network, as the Wi-Fi standard defines. Your app converts this binary data to text when displaying network names to people. The Wi-Fi standard defines SSIDs as binary values between 1 and 32 bytes long, without specifying a text encoding. This means SSID data can include:
Embedded null bytes (
0x00)Control characters and escape sequences
Non-printable binary data
Text in various encodings (UTF-8, ASCII, Latin-1, etc.)
Mixed binary and text content
Don’t assume SSID data represents UTF-8 encoded text. Use stringRepresentation(encoding:) to safely convert the raw data to a readable format. Since no standard encoding exists for SSIDs, different networks may use different text encodings or contain pure binary data. When converting SSIDs to strings:
Try UTF-8 encoding first, as it’s most common.
Fall back to other encodings if UTF-8 conversion fails.
Handle cases where no text representation is possible.
Consider displaying raw hexadecimal values for non-text SSIDs.