Registry /
communication / pyobjc-framework-corewlan
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CoreWLAN
✓ import CoreWLAN
Imports the entire CoreWLAN framework as a Python package.
This quickstart demonstrates how to import the CoreWLAN framework and retrieve basic information about the Wi-Fi interface and available networks. Note that modifying Wi-Fi settings (e.g., turning power on/off) typically requires a properly signed application or administrative privileges on macOS, and is not included in this basic example.
import CoreWLAN
def get_wifi_info():
try:
# Get the default wireless interface
interface = CoreWLAN.CWInterface.interface()
if interface:
print(f"Current Wi-Fi interface Hardware Address: {interface.hardwareAddress()}")
print(f"Current Wi-Fi Power Status: {'On' if interface.powerOn() else 'Off'}")
current_ssid = interface.ssid()
if current_ssid:
print(f"Currently connected to network: {current_ssid}")
else:
print("Not currently connected to a Wi-Fi network.")
# List available Wi-Fi networks
print("\nAvailable Wi-Fi Networks:")
for network in CoreWLAN.CWInterface.interface().cachedScanResults():
print(f" - SSID: {network.ssid()}, RSSI: {network.rssiValue()} dBm")
else:
print("No Wi-Fi interface found.")
except Exception as e:
print(f"An error occurred: {e}")
print("Note: Accessing CoreWLAN functionality, especially for modifications, often requires a properly signed application or elevated privileges on macOS.")
if __name__ == "__main__":
get_wifi_info()
Debug
Known issues
breakingPyObjC v12.0 and later dropped support for Python 3.9. Attempting to use these versions with Python 3.9 will result in installation or runtime errors.fixUpgrade your Python environment to Python 3.10 or later. Python 3.10+ is required.
affects: 12.0+
breakingPyObjC v11.0 and later dropped support for Python 3.8. Similar to Python 3.9, this will cause compatibility issues.fixEnsure your Python environment is at version 3.9 or later (preferably 3.10+ as per v12.0 changes).
affects: 11.0+
breakingPyObjC v11.1 introduced changes to align reference counting behavior for Objective-C 'init' family methods with `clang`'s automatic reference counting (ARC) documentation. This means `init` methods now correctly model stealing a reference to `self` and returning a new one.fixReview any custom Objective-C subclasses defined in Python, especially their `init` methods, to ensure they correctly handle reference counting based on the new behavior. Incorrect handling might lead to memory leaks or premature object deallocation.
affects: 11.1+
gotchaThe interaction between Python's `__init__` and `__new__` methods for PyObjC subclasses was altered in v10.3, partially reverted in v10.3.1. While `__init__` can now be used with user-implemented `__new__`, it still cannot be used with PyObjC's provided `__new__`.fixIf defining Objective-C subclasses in Python with custom object creation logic, carefully manage the use of `__new__` and `__init__` in accordance with PyObjC's specific rules, particularly when overriding `__new__`.
affects: 10.3 - 10.3.1+
breakingThe 'IMServicePlugIn' framework bindings were removed in PyObjC v10.0 because the framework itself was deprecated in macOS 10.13 and removed in macOS 14.fixRemove any dependencies on the `IMServicePlugIn` framework. There is no direct replacement within PyObjC as the underlying Apple framework is no longer available.
affects: 10.0+
gotchaAccessing privacy-relevant CoreWLAN information or performing actions (like changing Wi-Fi power) in macOS requires the application binary to be properly signed, not just an ad-hoc signature.fixEnsure your macOS application is properly signed with a developer certificate to gain full access to CoreWLAN functionalities. Running from an unsiged script or an ad-hoc signed app might result in permission errors or limited functionality.
affects: All versions on recent macOS
Upgrade
Version history
12.2.2latest on PyPI · released Aug 11, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.10 or later.