Iphone MPMoviePlayer加载文件时出错

Iphone MPMoviePlayer加载文件时出错,iphone,objective-c,simulator,mpmovieplayer,Iphone,Objective C,Simulator,Mpmovieplayer,我正在尝试使用MPMoviePlayer播放一部简单的电影,但在控制台中不断出现此错误(但电影已播放): 我的xcode版本是4.3.1 2012-03-24 14:51:49.488 european_culture[450:17a07] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlug

我正在尝试使用MPMoviePlayer播放一部简单的电影,但在控制台中不断出现此错误(但电影已播放): 我的xcode版本是4.3.1

2012-03-24 14:51:49.488 european_culture[450:17a07] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn:  dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.496 european_culture[450:17a07] Error loading /System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn:  dlopen(/System/Library/Extensions/AudioIPCDriver.kext/Contents/Resources/AudioIPCPlugIn.bundle/Contents/MacOS/AudioIPCPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.584 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.592 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.610 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:49.617 european_culture[450:17a07] Error loading /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn:  dlopen(/System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAHALPlugIn.bundle/Contents/MacOS/AppleHDAHALPlugIn, 262): Symbol not found: ___CFObjCIsCollectable
Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
in /System/Library/Frameworks/Security.framework/Versions/A/Security
2012-03-24 14:51:51.749 european_culture[450:13a03] Unbalanced calls to begin/end appearance transitions for <MPMoviePlayerViewController: 0x935f500>.
2012-03-24 14:51:51.930 european_culture[450:15303] AQMixerDevice::SetMixerChannelLayout(0x7d47f50): scope 1, element 1, layout: tag=0x640001: error -10851
请帮帮我。

非常感谢。

这是iOS SDK 5/模拟器的一个已确认错误-只要模拟器尝试播放声音(来自电影或任何其他声音源),就会发生。不过别担心,在实际设备上不会有问题

您提到了用户在使用您的应用程序时遇到问题的实际报告-这些问题与您在上面发布的问题无关

该问题由苹果公司以Bug ID#10555404提交。我自己提交了一份报告,最终被确认为上述bug id的复制品

该问题目前一直持续到Xcode版本4.3.2(4E2002),iOS SDK 5.1

如果不正确地导入Mac OSX框架而不是iOs框架,则可能会出现此问题。删除Mac OS框架对我来说很有效

记住设置代理(self.player.delegate=self)并使用代理的方法清理:

-(void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)playedSuccessfully 
 {
       self.player = nil;
 }

From

仅关于第一部分:我想,您最近已经从Xcode 4.2更新到了4.3,并且使用了一个“旧”项目。因此,路径是不正确的,这并不重要,因为框架仍然存在。啊。。。我懂了。谢谢你的帮助。这是件好事,没关系。这是模拟器的SDK错误。如果您禁用异常断点或只是继续使用它们,那么实际上一切都可以正常工作。在设备上一切正常。哦!!非常感谢你!!好啊我将检查导入的框架。我将设置代理。非常感谢!!:当我在模拟器上测试我的场景时,视频和声音会在几秒钟后消失。在设备上,我得到了相同的错误结果…(使用最新的Xcode版本4.3.2进行测试)他是从那里复制的吗@波波,那么这个链接呢
-(void)playMovie:(NSString *)fileName   
{
NSString *movieFile = [[NSBundle mainBundle] pathForResource:fileName ofType:@"mov"];
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath:movieFile];
MPMoviePlayerViewController *tempMoviePlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:fileURL];
MPMoviePlayerController *moviePlayer = [tempMoviePlayer moviePlayer];

[tempMoviePlayer.view setFrame:CGRectMake(0, 0, 1024, 768)];
[_zoomImageView addSubview: tempMoviePlayer.view];
[self presentMoviePlayerViewControllerAnimated:tempMoviePlayer]; 
[self setWantsFullScreenLayout:YES]; 
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playMovieFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayer];
[moviePlayer play];

[fileURL release];
[tempMoviePlayer release];
}
-(void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)playedSuccessfully 
 {
       self.player = nil;
 }