" _CMTimeGetSeconds",未找到架构armv7 -IOS的符号

时间:2013-03-28 08:52:59

标签: iphone ios xcode

使用此代码

AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:selectedVideoUrl];
CMTime duration = playerItem.duration;
float seconds = CMTimeGetSeconds(duration);
NSLog(@"duration: %.2f", seconds);

错误

Undefined symbols for architecture armv7:
  "_CMTimeGetSeconds", referenced from:
      -[VideoUpload imagePickerController:didFinishPickingMediaWithInfo:] in VideoUpload.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

1 个答案:

答案 0 :(得分:45)

CMTime在CoreMedia.framework中定义。将该框架添加到您的项目中。

看看Apple的CMTime reference