加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – “_CMTimeGetSeconds”,没有找到符号的架构armv7 -IOS

发布时间:2020-12-15 01:53:54 所属栏目:百科 来源:网络整理
导读:通过使用此代码 AVPlayerItem *playerItem = [AVPlayerItem playerItemWithURL:selectedVideoUrl];CMTime duration = playerItem.duration;float seconds = CMTimeGetSeconds(duration);NSLog(@"duration: %.2f",seconds); 错误 Undefined symbols for archi
通过使用此代码

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)

解决方法

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

看看苹果的CMTime reference

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读