Apple在UILocalNotification类引用中指定音频文件必须来自应用程序包.然而,一些聪明的极客通过使用以下方法找到了解决这个限制的方法:
// this works by going up the bundle dir, then pointing to the Documents dir
localNotif.soundName = @"../Documents/blabla.caf";
Run Code Online (Sandbox Code Playgroud)
这种解决方法已在iOS 5的效果不错,但是,它在IOS 6打破了在绝望的尝试,试图拿出一个解决办法新,我做了一个别名(符号链接)称为blabla.caf该点../Documents/blabla.caf,并把它放在到应用程序中束.这是我被卡住了.
现在,我得到了一个PBXCp error,并且Xcode无法完成应用程序部署到设备,因为显然
错误:/Users/stuff/moreStuff/appName/../Documents/blabla.caf:没有这样的文件或目录
我的问题:
Documents目录只是为了关闭Xcode?