我创建了一个静态库,其中包含UIDevice的用法。不使用uniqueIdentifier。
苹果拒绝了一个起诉这个库的应用程序,我们怀疑这是因为在*.a中搜索uniqueIdentifier会返回匹配的结果:
$ find .|grep "\.a"|grep -v "\.app"|xargs grep uniqueIdentifier在代码中使用以下行就足够了,这样就可以匹配上面的命令。
UIDevice *device = [UIDevice currentDevice];有没有办法告诉Xcode从构建文件中排除UIDevice?
发布于 2013-06-03 16:20:58
我找到了一个解决方案:
在我的代码中,我使用代码初始化UIDevice对象:
UIDevice *device = [UIDevice currentDevice];然后我使用[device systemVersion]获取系统版本,它在执行grep命令后显示uniqueIdentifier的匹配项。
因此,我没有初始化device对象,而是直接检索了systemVersion:
NSString *systemver= [[UIDevice currentDevice] systemVersion] ;这解决了我的问题。希望这也能解决你的问题。
https://stackoverflow.com/questions/16456420
复制相似问题