My app passed app review. So the archive validation in Xcode 11.5 has a cosmetic error.
Post
Replies
Boosts
Views
Activity
Screenshot of what the app looks like:https://github.com/darrellroot/focusBug/blob/master/focusBug/screenshot.png
Thanks! Not the answer I wanted, but better to get it now than later. Cheers!Darrell
Thanks for the answer.I figured out how I was accessing /dev/bpf0 when I wasn't in the sandbox.It looks like the Wireshark installer creates an access_bpf group, makes /dev/bpf* group-owned by access_bpf, and then adds the user to the access_bpf group (as can be seen by preferences -> Users and groups by opening up the group tab at the bottom). It looks like these permissions work for my app when outside the sandbox, but not in the sandbox.That also why tcpdump was working for me without sudo.Makes perfect sense because packet-capturing apps can be used for evil. But makes it hard to provide certain kinds of functionality. I will have to think about options.Edit: It also makes me wonder if sandboxed apps run as a different "user". If yes, then that user could be added to the access_bpf group, allowing access to /dev/bpf* from a sandbox without granting access to everyting else.Darrell
I am doing live packet and (for ethernet and wifi interfaces) frame header capture. It is the primary function of the app.
Thank you eskimo! I was able to get the NWInterface with the code you sent (which will be useful for other things too--I was trying to figure out how to open link-local IPv6 sockets with a specific source interface ;-).Feedback FB7551376 submitted.FYI I am experiencing other issues with NWEthernetChannel. I may come back and submit another bug report. Per wireshark the destination mac address on the wire does not match the NWEthernetChannel.EthernetAddress("11:11:11:11:11:11")! I configured for sending a frame. But I need to narrow down the code to have a submittable case.
Check out the CWWiFiClient framework, which I think is in CoreWiFiHere's some code I was playing with recently. This was on MacOS. I'm not certain whether these APIs are supported on iOS. This is showing the signal strength of the Wifi that I'm associated to, not all WiFi available.//I'm not sure all these imports are necessary for this code sample:
import SystemConfiguration
import CoreWLAN
import SystemConfiguration.CaptiveNetwork
...
if let interfaceNames = CWWiFiClient.interfaceNames() {
for interface in interfaceNames {
debugPrint("CWWiFi interface name \(interface)")
}
}
let cwwifi = CWWiFiClient.shared()
if let interface = cwwifi.interface() {
if let name = interface.interfaceName {
debugPrint("wifi interface name \(name)")
}
if let bssid = interface.bssid() {
debugPrint("wifi bssid \(bssid)")
}
if let hardwareAddress = interface.hardwareAddress() {
debugPrint("wifi hw address \(hardwareAddress)")
}
debugPrint("rssi \(interface.rssiValue())")
debugPrint("noise \(interface.noiseMeasurement())")
}Sample output:"CWWiFi interface name en1""wifi interface name en1""wifi hw address c8:e0:eb:32:15:8b""rssi -29""noise -95"You can always option-click the wifi symbol in the top right of the mac to get diagnostic information, including the rssi and noise, for confirmation.