2014-10-27 46 views
0

我想在我的cocos2d項目在Xcode中顯示AppLovin sdk,我目前無法調試這個Apple Mach-O錯誤,如下所述。蘋果Mach-O爲libAppLovinSdk.a在iPhone的cocos2d

Undefined symbols for architecture i386: 
    "_CMTimeGetSeconds", referenced from: 
     -[ALVideoViewController timeLeft] in libAppLovinSdk.a(ALVideoViewController.o) 
     -[ALVideoViewController percentViewed] in libAppLovinSdk.a(ALVideoViewController.o) 
    "_CMTimeMakeWithSeconds", referenced from: 
     -[ALVideoViewController createCountdownTimeObserver] in libAppLovinSdk.a(ALVideoViewController.o) 
    "_MPMoviePlayerPlaybackDidFinishNotification", referenced from: 
     ___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o) 
    "_MPMoviePlayerPlaybackDidFinishReasonUserInfoKey", referenced from: 
     ___53-[ALInterstitialViewController moviePlayerDidFinish:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o) 
    "_MPMoviePlayerPlaybackStateDidChangeNotification", referenced from: 
     ___50-[ALInterstitialViewController prepareForVideoAd:]_block_invoke in libAppLovinSdk.a(ALInterstitialViewController.o) 
    "_OBJC_CLASS_$_MPMoviePlayerController", referenced from: 
     objc-class-ref in libAppLovinSdk.a(ALInterstitialViewController.o) 
ld: symbol(s) not found for architecture i386 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

我去構建階段 - >添加其他 - >選擇libAppLovinSdk.a從顯示的數據庫文件。

我還將Build Active Architectures的值設置爲NO,並從體系結構中刪除arm64。沒有i386架構。

回答

4

您缺少CoreMediaMediaPlayer框架。

(我發現了這一點,通過谷歌搜索CMTimeGetSecondsMPMoviePlayerPlaybackDidFinishNotification和看到的蘋果文檔的部分得到了命中率,但是CMMP前綴應該足以告訴你)。