我的应用程序被拒绝。它访问“/usr/lib/libpcap.A.dylib”;我可以做什么来避免它?

发布于 2024-11-13 12:21:50 字数 379 浏览 7 评论 0原文

我向 Mac OSX App Store 提交了一个简单的应用程序,但被拒绝,并给出了以下解释:

“该应用程序正在以下位置创建文件、写入文件或打开读/写访问:

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

我使用一些碳代码,例如 FSMountServerVolumeSync 和 FSGetCatalogInfo。

有什么办法可以让我无效吗?

编辑: 它是由 shell 脚本而不是碳引起的: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | sed -e 's/^ *SSID: //p' -ed\")"

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 void 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\")"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

雪落纷纷 2024-11-20 12:21:50

由于问题是由于使用 airport 命令行实用程序造成的,如果您的目标是 Mac OS X v10.6+,我建议您使用 CoreWLAN框架获取当前无线接口的SSID:

#import <CoreWLAN/CoreWLAN.h>

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

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;
}
知你几分 2024-11-20 12:21:50

好的,我知道是什么原因导致了这个问题。
我可以使用fs_usage 终端命令来查看文件系统中发生的情况。我使用“sudo fs_usage -w | grep“/usr/lib

这就是问题:

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

我使用 shell 脚本来获取活动 WIFI 连接的名称。很明显,机场打开 /usr/lib/libpcap.A.dylib 进行读取,其他库不会像那样打开(否(R__))

编辑:这是我第二个问题的答案,但是获取 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 ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文