xcode 在 iOS 应用程序中添加 revmob 广告时构建错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12726640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
build error while add revmob ad in iOS app
提问by Arpi
I want to add RevMob add in my app but there are some errors
我想在我的应用程序中添加 RevMob add 但有一些错误
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_SKStoreProductViewController", referenced from:
objc-class-ref in RevMobAds(RevMobStoreController.o)
"_SKStoreProductParameterITunesItemIdentifier", referenced from:
-[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have added StoreKit
,SystemConfiguration
and RevMob
Frameworks already.
I am using Xcode4.3 and ios4.2
Plz help me.
Thanks in advance.
我已经添加了StoreKit
,SystemConfiguration
和RevMob
Frameworks 。我正在使用 Xcode4.3 和 ios4.2 请帮助我。提前致谢。
回答by XIII
You need to add the StoreKit framework
您需要添加 StoreKit 框架
EDIT: I see now what you mean, there was an issue with the older versions, I'm adding a link to an edited framework to solve that issue: Edited Revmob Framework
编辑:我现在明白你的意思了,旧版本有问题,我正在添加一个链接到一个编辑过的框架来解决这个问题:Edited Revmob Framework
回答by Roman Volkov
You must link against StoreKit.framework
您必须链接到 StoreKit.framework
回答by felixDkatt
It looks like the ad sdk you have now does not include support for use with the simulator.
您现在拥有的广告 sdk 似乎不支持与模拟器一起使用。
-[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o) ld: symbol(s) not found for architecture i386
-[RevMobStoreController openStoreWithITunesItemId:] 在 RevMobAds(RevMobStoreController.o) ld:未找到架构 i386 的符号
if you get anything that mentions "not found for architecture" means revmob didnt include classes for running on simulator. You have 2 choices. look for a missing library ".a file" or only compile for testing on a device.
如果您收到任何提到“未找到架构”的内容,则表示 revmob 不包含在模拟器上运行的类。你有2个选择。查找丢失的库“.a 文件”或仅编译以在设备上进行测试。
I've ran into an issue with the new ios6 where revmob did not support the new iphone 5 armv7s architecture.
我在新的 ios6 中遇到了一个问题,其中 revmob 不支持新的 iphone 5 armv7s 架构。
Double check your revmob installation or try compiling to your phone instead of the simulator
仔细检查您的 revmob 安装或尝试编译到您的手机而不是模拟器
回答by FractalDoctor
This error can also happen if you removed a file from your project and subsequently re-created it. Sometimes Xcode doesn't automatically re-include it in the 'compile sources' box (when you click on target). Check the box and see if all of your source files are included, if not then drag them in and rebuild.
如果您从项目中删除文件并随后重新创建它,也会发生此错误。有时 Xcode 不会自动将其重新包含在“编译源”框中(当您单击目标时)。选中该框并查看是否包含所有源文件,如果没有,则将它们拖入并重建。
回答by Sumanth
When your are dropping the files manually in xcode the files are not copied to Bundle. So "SKStoreProductViewController.m" was the file not copied in the bundle so the error occurred. To resolve the error. Drag the files only .m files to Copy Bundle Resource
as shown in the image
当您在 xcode 中手动删除文件时,文件不会复制到 Bundle。所以“SKStoreProductViewController.m”是包中没有复制的文件,所以发生了错误。来解决错误。Copy Bundle Resource
如镜像所显示,仅将文件拖至 .m 文件
回答by Diogo T
They release a new SDK version (4.6.0) that works perfectly on older Xcode versions!
他们发布了一个新的 SDK 版本 (4.6.0),可以在旧的 Xcode 版本上完美运行!
回答by uplearnedu.com
This also happens with Appirater. I was getting this message:
Appirater 也会发生这种情况。我收到这条消息:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_SKStoreProductViewController", referenced from: objc-class-ref in Appirater.o "_SKStoreProductParameterITunesItemIdentifier", referenced from: +[Appirater rateApp] in Appirater.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_SKStoreProductViewController", referenced from: objc-class-ref in Appirater.o "_SKStoreProductParameterITunesItemIdentifier", referenced from: +[Appirater rateApp] in Appirater.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
---To Fix---
- -修理 - -
- add StoreKit.framwork in --> BuildPhases
- ---Under-> Link Libraries with Libraries
- If you have more than one target you might need to add the StoreKit.framwork to both Targets.
- 在 --> BuildPhases 中添加 StoreKit.framework
- ---在->链接库与库
- 如果您有多个目标,则可能需要将 StoreKit.framework 添加到两个目标。
回答by Ahmad.Net
I faced similar issue and after long search and checking sample RevMob code, i found this solution, may be help others:
我遇到了类似的问题,经过长时间的搜索和检查示例 RevMob 代码,我找到了这个解决方案,可能对其他人有帮助:
Under project target, select Build Settings, under Deployment, check iOS Deployment Target, change the value to 'iOS 9.0' or higher.
在项目目标下,选择Build Settings,在Deployment下,选中iOS Deployment Target,将值更改为“ iOS 9.0”或更高版本。
I hope this help.
我希望这有帮助。