iOS SDK 3.2.5 中的视频错误
升级到 3.2.5 后出现一个奇怪的错误:
未定义的符号:“_OBJC_CLASS_$_MPMoviePlayerViewController”,
参考自: SecondView.o 中的 objc-class-ref-to-MPMoviePlayerViewController
ld:未找到符号
collect2:ld返回1退出状态
这是之前一直有效的代码。
-(IBAction)button:(id)sender {
NSString *path = [[NSBundle mainBundle] pathForResource:@"video" ofType:@"m4v"];
player = [[MPMoviePlayerViewController alloc]
initWithContentURL:[NSURL fileURLWithPath:path]];
[self presentMoviePlayerViewControllerAnimated:player];
}
I get a strange error since upgrading to 3.2.5:
Undefined symbols: "_OBJC_CLASS_$_MPMoviePlayerViewController",
referenced from:
objc-class-ref-to-MPMoviePlayerViewController in SecondView.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
Here's the code that always worked before.
-(IBAction)button:(id)sender {
NSString *path = [[NSBundle mainBundle] pathForResource:@"video" ofType:@"m4v"];
player = [[MPMoviePlayerViewController alloc]
initWithContentURL:[NSURL fileURLWithPath:path]];
[self presentMoviePlayerViewControllerAnimated:player];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在你的 xcode 中试试这个。
项目菜单->编辑活动目标 ->在左下角选择加号。现在选择 mediaframework 并构建代码。希望这应该有效。
try this in your xcode.
project menu -> edit active target -> in that select plus symbol in the bottom left corner. Now select mediaframework and build the code. Hopefully this should work.