0
Undefined symbols for architecture i386:
  "_OBJC_CLASS_$_PHAppDelegate", referenced from:
      objc-class-ref in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

All I did is I added the philips hue SDK and I replaced the app delegate files with PHAppDelegate.h and .m. and then I changed main.m to work with the new app delegate files and when I built, I got this error. Any insight?

Pittfall
  • 2,751
  • 6
  • 32
  • 61

2 Answers2

3

Reading through your question, it seems you had generated appdelegate files, for example SampleAppDelegate.h and SampleAppDelegate.m. Then you copied in the PHAppDelegate.h and .m from the Sample App of the iOS Hue SDK. You changed the references in main.m, but what you did not do, was add the new PHAppDelegate.m to the compile sources phase in the build phases tab of your project in XCode.

This would produce the linker error you described.

Regarding ahwulf's answer, the Hue iOS SDK contains both simulator and iOS device code, so no problem there.

  • I needed to add the new PHAppDelagate.m file to "Compile Sources" in "Build Phases" just like you said – Pittfall Apr 11 '13 at 18:08
-1

Could the Phillips SDK have no simulator binary, only ARM, so it only works on a device?

ahwulf
  • 2,584
  • 15
  • 29
  • No, I've executed their sample app and it runs on the simulator. Plus I get the same errors on the device – Pittfall Apr 04 '13 at 18:06
  • It works perfectly fine in the simulator. I am working with the SDK for some time now, and I even haven't tested it on a real device yet ;-) – Niek van der Steen Apr 08 '13 at 09:57