开发者

My app is rejected. It access '/usr/lib/libpcap.A.dylib' What can I do to avoid it?

开发者 https://www.devze.com 2023-03-10 13:53 出处:网络
I submitted a simple app to the Mac OSX App Store, but it was rejected with the following explanation:

I submitted a simple app to the Mac OSX App Store, but it was rejected with the following explanation:

"The application is creating files in, writing to, or opening for Read/Write access the following location(s):

'/usr/lib/libpcap.A.dylib'"

I use some carbon code such as FSMountServerVolumeSync and FSGetCatalogInfo.

Is there any way I could v开发者_如何学Gooid this?

Edit: It is caused by a shell-script not carbon: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | sed -e 's/^ *SSID: //p' -e d\")"


Since the problem is due to using the airport command-line utility, if you’re targeting Mac OS X v10.6+ I suggest you use the CoreWLAN framework to obtain the SSID of the current wireless interface:

#import <CoreWLAN/CoreWLAN.h>

CWInterface *wif = [CWInterface interface];
if (wif) {
    // There's an active WiFi connection; get its SSID
    NSString *currentSSID = wif.ssid;
}


OK, I figured out what's causing the problem. I can use fs_usage terminal command to see what's happening in the filesysytem. I use "sudo fs_usage -w | grep "/usr/lib"

This is the problem:

15:58:03.049 stat64 /usr/lib/libpcap.A.dylib 0.000007 airport
15:58:03.049 open F=4 (R___) /usr/lib/libpcap.A.dylib 0.000020 airport

I use an shell script to get the name of the active WIFI connection. It is obvious that airport opens /usr/lib/libpcap.A.dylib for reading, other libraries are not opened like that (no (R__) )

EDIT: This was the answer to my second question, but Bavarious simple solution to get the SSID eliminates all the hassles for me ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消