1

I am trying to a build a framework for tvOS. I am able to generate the framework but when I link against it, with a sample app there are problems.

I get following errors:

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

The built for the device works just fine.

This is the build configuration for the framework. enter image description here

Any ideas what could be wrong?

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152
Vishvesh
  • 512
  • 8
  • 21
  • How do you link the framework in the app? Is it present in "Embed Frameworks" in "Build Phases"? – Michał Ciuba Mar 02 '16 at 15:27
  • I have added the framework to "Link Binary With Libraries" section of the build phases. – Vishvesh Mar 02 '16 at 16:15
  • 1
    Typically when you do a build you do not get both the simulator and device architectures. You can verify the slices that are present in the binary by using the file command on it on the command line. You will probably have to use the `lipo` tool to build a universal framework, but last time I checked you cannot submit the app with such a framework and have to use a tool like `carthage` to strip the simulator slices from the binary prior to submission. – Charles A. Mar 03 '16 at 15:23

0 Answers0