build error while add revmob ad in iOS app

☆樱花仙子☆ 提交于 2019-12-09 14:48:29

问题


I want to add RevMob add in my app but there are some errors

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.


回答1:


You need to add the StoreKit framework

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




回答2:


You must link against StoreKit.framework




回答3:


It looks like the ad sdk you have now does not include support for use with the simulator.

-[RevMobStoreController openStoreWithITunesItemId:] in RevMobAds(RevMobStoreController.o) ld: symbol(s) not found for architecture 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.

I've ran into an issue with the new ios6 where revmob did not support the new iphone 5 armv7s architecture.

Double check your revmob installation or try compiling to your phone instead of the simulator




回答4:


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 Resourceas shown in the image




回答5:


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.




回答6:


They release a new SDK version (4.6.0) that works perfectly on older Xcode versions!




回答7:


This also happens with Appirater. I was getting this message:

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---

  1. add StoreKit.framwork in --> BuildPhases
  2. ---Under-> Link Libraries with Libraries
  3. If you have more than one target you might need to add the StoreKit.framwork to both Targets.



回答8:


I faced similar issue and after long search and checking sample RevMob code, i found this solution, may be help others:

Under project target, select Build Settings, under Deployment, check iOS Deployment Target, change the value to 'iOS 9.0' or higher.

I hope this help.



来源:https://stackoverflow.com/questions/12726640/build-error-while-add-revmob-ad-in-ios-app

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!