Apple似乎在Yosemite和CoreWLAN框架上引入了相当大的变化.我想使用它的新API,引用头文件:
/*!
* @method
*
* @param type
* A CWEventType value.
*
* @param error
* An NSError object passed by reference, which upon return will contain the error if an error occurs.
* This parameter is optional.
*
* @result
* A BOOL value indicating whether or not an error occurred. YES indicates no error occurred.
*
* @abstract
* Register for specific Wi-Fi event notifications.
*
* @discussion
* Requires the <i>com.apple.wifi.events</i> entitlement.
*/
- (BOOL)startMonitoringEventWithType:(CWEventType)type error:(out …Run Code Online (Sandbox Code Playgroud)