Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"_CMTimeGetSeconds",symbol(s) not found for architecture armv7 -IOS

Tags:

xcode

ios

iphone

By using this Code

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

Error

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)
like image 765
ios_av Avatar asked Mar 28 '13 08:03

ios_av


1 Answers

CMTime is defined in the CoreMedia.framework. Add that framework to your project.

And take a look at Apple's CMTime reference

like image 139
Tomas Camin Avatar answered Sep 22 '22 22:09

Tomas Camin