Undefined characters for the i386 architecture: "_CMTimeMake" referenced:

I do not understand why this is happening. I am trying to use CMTimeMake:

CMTime cmTime = CMTimeMake(60, 1);

Import .h:

#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>

and .m:

#import "ViewController.h"
#import "ContentView.h"
#import "AppDelegate.h"
#import "BackButton.h"
#import "NavButton.h"
#import "IIViewDeckController.h"
#import "TutorialView.h"

With build error:

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

What am I missing?

+4
source share
1 answer

You are not contacting the CoreMedia framework. You can add it to your target in the project editor, for example:

frame snap

+23
source

All Articles