每次我加载应用程序时它都会停止,就好像我在这一行设置了一个断点:self.audioPlayer=[[[AVAudioPlayeralloc]initWithData:[dataPersisterloadData:self.fileName]error:&outError]autorelease];这条线上方或附近没有任何断点。只有当我在Debug模式下运行应用程序并且断点后没有崩溃时才会发生这种情况。当我点击“继续执行程序”时,应用程序没有任何反应。这是loadData方法,用initWithData调用:-(NSData*)loadData:(NSString*)fileName{
Checkingifasongstillexists我正在尝试确定一首歌曲在播放之前是否仍存在于用户的库中。如果用户在其库中删除一首歌曲,则作用于MPMediaItem的以下代码行仍会产生一个URL:1NSURL*songURL=[songvalueForProperty:MPMediaItemPropertyAssetURL];songURL的格式为"ipod-library://item/item.m4a?id=5050...etc."然后调用时以下行崩溃:1[[AVAudioPlayeralloc]initWithContentsOfURL:songURLerror:nil];我尝试使用
Checkingifasongstillexists我正在尝试确定一首歌曲在播放之前是否仍存在于用户的库中。如果用户在其库中删除一首歌曲,则作用于MPMediaItem的以下代码行仍会产生一个URL:1NSURL*songURL=[songvalueForProperty:MPMediaItemPropertyAssetURL];songURL的格式为"ipod-library://item/item.m4a?id=5050...etc."然后调用时以下行崩溃:1[[AVAudioPlayeralloc]initWithContentsOfURL:songURLerror:nil];我尝试使用