2012-03-21 9 views
2

ios5より前AVFoundationFrameworkが使用されていますが、ios5ストーリーボードでは機能しません。アプリケーション のようなリンクエラーが表示されます。 助けてください。どのフレームワークが使用されていますか?

以下の方法で、上位3または4のエラーが表示されます。事前に

- (id) init 
{ 
    self = [super init]; 
    if (self != nil) { 

     void (^deviceConnectedBlock)(NSNotification *) = ^(NSNotification *notification) { 
      AVCaptureDevice *device = [notification object]; 

      BOOL sessionHasDeviceWithMatchingMediaType = NO; 
      NSString *deviceMediaType = nil; 
      if ([device hasMediaType:AVMediaTypeAudio]) 
       deviceMediaType = AVMediaTypeAudio; 
      else if ([device hasMediaType:AVMediaTypeVideo]) 
       deviceMediaType = AVMediaTypeVideo; 

      if (deviceMediaType != nil) { 
       for (AVCaptureDeviceInput *input in [session inputs]) 
       { 
        if ([[input device] hasMediaType:deviceMediaType]) { 
         sessionHasDeviceWithMatchingMediaType = YES; 
         break; 
        } 
       } 

       if (!sessionHasDeviceWithMatchingMediaType) { 
        NSError *error; 
        AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:&error]; 
        if ([session canAddInput:input]) 
         [session addInput:input]; 
       }    
      } 

      if ([delegate respondsToSelector:@selector(captureManagerDeviceConfigurationChanged:)]) { 
       [delegate captureManagerDeviceConfigurationChanged:self]; 
      }   
     }; 
     void (^deviceDisconnectedBlock)(NSNotification *) = ^(NSNotification *notification) {      
      if ([delegate respondsToSelector:@selector(captureManagerDeviceConfigurationChanged:)]) { 
       [delegate captureManagerDeviceConfigurationChanged:self]; 
      }   
     }; 

     NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 
     [self setDeviceConnectedObserver:[notificationCenter addObserverForName:AVCaptureDeviceWasConnectedNotification object:nil queue:nil usingBlock:deviceConnectedBlock]]; 
     [self setDeviceDisconnectedObserver:[notificationCenter addObserverForName:AVCaptureDeviceWasDisconnectedNotification object:nil queue:nil usingBlock:deviceDisconnectedBlock]]; 
     [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]; 
     [notificationCenter addObserver:self selector:@selector(deviceOrientationDidChange) name:UIDeviceOrientationDidChangeNotification object:nil]; 
     orientation = AVCaptureVideoOrientationPortrait; 
    } 
    return self; 
} 

    Undefined symbols for architecture i386: 
    "_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from: 
     objc-class-ref in AVCamCaptureManager.o 
    "_OBJC_CLASS_$_AVCaptureStillImageOutput", referenced from: 
     objc-class-ref in AVCamCaptureManager.o 
    "_OBJC_CLASS_$_AVCaptureSession", referenced from: 
     objc-class-ref in AVCamCaptureManager.o 
    "_OBJC_CLASS_$_AVCaptureDevice", referenced from: 
     objc-class-ref in AVCamCaptureManager.o 
    "_AVCaptureDeviceWasConnectedNotification", referenced from: 
     -[AVCamCaptureManager init] in AVCamCaptureManager.o 
    "_AVCaptureDeviceWasDisconnectedNotification", referenced from: 
     -[AVCamCaptureManager init] in AVCamCaptureManager.o 
    "_AVMediaTypeAudio", referenced from: 
     ___27-[AVCamCaptureManager init]_block_invoke_0 in AVCamCaptureManager.o 
     -[AVCamCaptureManager micCount] in AVCamCaptureManager.o 
     -[AVCamCaptureManager(InternalUtilityMethods) audioDevice] in AVCamCaptureManager.o 
    "_AVMediaTypeVideo", referenced from: 
     ___27-[AVCamCaptureManager init]_block_invoke_0 in AVCamCaptureManager.o 
     -[AVCamCaptureManager captureStillImage] in AVCamCaptureManager.o 
     -[AVCamCaptureManager cameraCount] in AVCamCaptureManager.o 
     -[AVCamCaptureManager(InternalUtilityMethods) cameraWithPosition:] in AVCamCaptureManager.o 
     -[AVCamViewController(InternalMethods) convertToPointOfInterestFromViewCoordinates:] in AVCamViewController.o 
     ___27-[AVCamCaptureManager init]_block_invoke_0 in AVCamCaptureManager.o 
     -[AVCamCaptureManager captureStillImage] in AVCamCaptureManager.o 
     -[AVCamCaptureManager cameraCount] in AVCamCaptureManager.o 
     -[AVCamCaptureManager(InternalUtilityMethods) cameraWithPosition:] in AVCamCaptureManager.o 
     -[AVCamViewController(InternalMethods) convertToPointOfInterestFromViewCoordinates:] in AVCamViewController.o 
    "_AVVideoCodecJPEG", referenced from: 
     -[AVCamCaptureManager setupSession] in AVCamCaptureManager.o 
    "_AVVideoCodecKey", referenced from: 
     -[AVCamCaptureManager setupSession] in AVCamCaptureManager.o 
    "_CMVideoFormatDescriptionGetCleanAperture", referenced from: 
     -[AVCamViewController(InternalMethods) convertToPointOfInterestFromViewCoordinates:] in AVCamViewController.o 
    "_OBJC_CLASS_$_AVCaptureVideoPreviewLayer", referenced from: 
     objc-class-ref in AVCamViewController.o 
    "_AVLayerVideoGravityResize", referenced from: 
     -[AVCamViewController(InternalMethods) convertToPointOfInterestFromViewCoordinates:] in AVCamViewController.o 
    "_AVLayerVideoGravityResizeAspect", referenced from: 
     -[AVCamViewController(InternalMethods) convertToPointOfInterestFromViewCoordinates:] in AVCamViewController.o 
    "_AVLayerVideoGravityResizeAspectFill", referenced from: 
     -[AVCamViewController viewDidLoad] in AVCamViewController.o 
     -[AVCamViewController(InternalMethods) convertToPointOfInterestFromViewCoordinates:] in AVCamViewController.o 
    "_OBJC_CLASS_$_ALAssetsLibrary", referenced from: 
     objc-class-ref in ImageViewController.o 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

おかげ EDIT: 問題が解決されます。私にはなど

+0

ターゲットクラスでプロジェクトおよびインポートに動作します。 – Diziet

+0

ありがとう@Diziet私はできるだけ頻繁に自分の投稿を更新しようとする –

答えて

15

検索ヘッダーパスの変更などのアプリの設定で いくつかの変更:

は、単にターゲット]タブにリンクされたフレームワークとライブラリにAVFoundationフレームワークを追加します。

3

CoreMedia.frameworkと一緒に私はAVFoundation.frameworkと一緒に助けました。

0

を追加してください。次のフレームは、それは情報が他人に使用のものであってもよい場合は特に、あなた自身の質問に答えるために完全に有効です

<AssetsLibrary/AssetsLibrary.h> 
<AVFoundation/AVFoundation.h> 
関連する問題