0

我创建了一个静态库,其中包含 UIDevice 的使用。没有使用唯一标识符。

Apple 拒绝了起诉该库的应用程序,我们怀疑这是因为在 *.a 中搜索 uniqueIdentifier 会返回匹配项:

$ find .|grep "\.a"|grep -v "\.app"|xargs grep uniqueIdentifier

在代码中包含以下行就足以与上述命令匹配。

UIDevice *device = [UIDevice currentDevice];

有没有办法告诉 Xcode 从构建文件中排除 UIDevice ?

4

1 回答 1

0

我找到了一个解决方案:
在我的代码中,我正在使用代码初始化 UIDevice 对象:

UIDevice *device = [UIDevice currentDevice];

然后我得到 systemversion 使用 [device systemVersion]它在执行grep命令后显示 uniqueIdentifier 的匹配项。

因此,我没有初始化设备对象,而是直接检索了 systemVersion:

NSString *systemver= [[UIDevice currentDevice] systemVersion] ;

这解决了我的问题。希望这也能解决你的问题。

于 2013-06-03T08:20:58.033 回答