Posts

Post not yet marked as solved
3 Replies
3.4k Views
Hi everyone,every time I create new Playgrounds I can hear a loud noise from my MacBook Pro fans. I can see in Activity Monitor that mobileassetd process is taking about 75-80% CPU power. It happens basically all the time. Sometimes is happens just because I opened Simulator.Am I the only 1 with such an issue?macos: Catalina 10.15Xcode: 11.1 (11A1027)MacBook Pro A1708
Posted
by bdolewski.
Last updated
.
Post not yet marked as solved
1 Replies
1.7k Views
Hi,I have an IoT app that uses CNCopyCurrentNetworkInfo to check current WiFi to determine if user switched WiFi. It's important to me because the IoT device is WiFi hardware and it relies on being in the same WiFi network as iOS device.Any suggestions?Current code is that:guard let interfaces = CNCopySupportedInterfaces() else { return nil } var wifiName: String? = nil for i in 0..<CFArrayGetCount(interfaces) { let interfaceName: UnsafeRawPointer = CFArrayGetValueAtIndex(interfaces, i) let rec = unsafeBitCast(interfaceName, to: AnyObject.self) let unsafeInterfaceData = CNCopyCurrentNetworkInfo("\(rec)" as CFString) if unsafeInterfaceData != nil { let interfaceData = unsafeInterfaceData! as NSDictionary wifiName = interfaceData["SSID"] as? String } } return wifiName
Posted
by bdolewski.
Last updated
.