build error while add revmob ad in iOS app

2019-04-04 06:00发布

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.

标签: ios xcode revmob
8条回答
甜甜的少女心
2楼-- · 2019-04-04 06:02

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.

查看更多
We Are One
3楼-- · 2019-04-04 06:03

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.
查看更多
ら.Afraid
4楼-- · 2019-04-04 06:05

You must link against StoreKit.framework

查看更多
贼婆χ
5楼-- · 2019-04-04 06:07

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

查看更多
Anthone
6楼-- · 2019-04-04 06:08

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.

查看更多
倾城 Initia
7楼-- · 2019-04-04 06:11

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

查看更多
登录 后发表回答