16

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.

XIII
  • 2,036
  • 16
  • 25
Arpi
  • 397
  • 2
  • 5
  • 14

8 Answers8

39

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

XIII
  • 2,036
  • 16
  • 25
  • You are welcome, please mark the answer as correct by pressing the check mark at left, this is the only way people will know the helpful answer amongst other ones. – XIII Nov 02 '12 at 06:42
10

You must link against StoreKit.framework

Roman Volkov
  • 389
  • 1
  • 3
  • 8
2

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

felixDkatt
  • 43
  • 7
0

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 imageenter image description here

FractalDoctor
  • 2,496
  • 23
  • 32
Sumanth
  • 4,913
  • 1
  • 24
  • 39
  • but i don't have any "SKStoreProductViewController.m" file . This error occur when I code for RevMob And add frameworks mentioned above. – Arpi Oct 04 '12 at 12:16
  • In the Copy Bundle Resources did you find any red color files if yes that file is missing in your application. The Error which you specified mean your application was missing the file – Sumanth Oct 04 '12 at 13:06
  • No there is no red color file in bundle resource – Arpi Oct 04 '12 at 13:24
0

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

Diogo T
  • 2,591
  • 1
  • 29
  • 39
0

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.

FractalDoctor
  • 2,496
  • 23
  • 32
0

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.
uplearned.com
  • 3,393
  • 5
  • 44
  • 59
0

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.

Ahmad.Net
  • 581
  • 5
  • 8