Apple在UILocalNotification类引用中指定音频文件必须来自应用程序包.然而,一些聪明的极客通过使用以下方法找到了解决这个限制的方法:
// this works by going up the bundle dir,then pointing to the Documents dir localNotif.soundName = @"../Documents/blabla.caf";
这种解决方法在iOS 5中运行良好,然而,它在iOS 6中爆发.在拼命尝试尝试并提出新的解决方法时,我创建了一个名为blabla.caf的别名(Symbolic Link),指向../Documents /blabla.caf,并将其放入应用程序包中.这是我被卡住了.
现在,我收到PBXCp错误,Xcode无法完成应用程序部署到设备,因为显然
error: /Users/stuff/moreStuff/appName/../Documents/blabla.caf: No such file or directory
我的问题:
>我可以以某种方式添加一个虚拟文件(0 KB)到Documents目录只是为了关闭Xcode?
>我可以以某种方式强制Xcode覆盖此错误并继续生活部署应用程序?