I am trying to display AppLovin sdk in my cocos2d project in Xcode and I'm currently unable to debug this Apple Mach-O error as described below.
我试图在Xcode的cocos2d项目中显示AppLovin sdk,目前我无法调试这个Apple Mach-O错误,如下所述。
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)
I went to build phases -> add other -> Selected libAppLovinSdk.a file from the finder displayed.
我去构建阶段->添加其他->选择的libAppLovinSdk。从finder中显示的文件。
I also set the value of Build Active Architectures only to NO and removed arm64 from architectures. There is no i386 architecture.
我还将构建活动架构的值设置为NO,并从架构中移除arm64。没有i386架构。
1 个解决方案
#1
4
You are missing the CoreMedia
and MediaPlayer
frameworks.
您缺少CoreMedia和MediaPlayer框架。
(I found this out by Googling for CMTimeGetSeconds
and MPMoviePlayerPlaybackDidFinishNotification
and seeing what section of the Apple docs got hits, however the CM
and MP
prefixes should be enough to tell you).
(我在谷歌上搜索了CMTimeGetSeconds和mpmovieplayerplayerplaybackdidfinishnotification,看到了苹果文档的哪个部分被点击了,但是CM和MP前缀应该足够告诉你)。
#1
4
You are missing the CoreMedia
and MediaPlayer
frameworks.
您缺少CoreMedia和MediaPlayer框架。
(I found this out by Googling for CMTimeGetSeconds
and MPMoviePlayerPlaybackDidFinishNotification
and seeing what section of the Apple docs got hits, however the CM
and MP
prefixes should be enough to tell you).
(我在谷歌上搜索了CMTimeGetSeconds和mpmovieplayerplayerplaybackdidfinishnotification,看到了苹果文档的哪个部分被点击了,但是CM和MP前缀应该足够告诉你)。