OpenTok framework in 64bit

1.3k views Asked by At

Hi I am using OperTok SDK for video chating in my app. Everything works fine in my app. But when I try to run it in a 64 bit device/simulator - Build fails with below error report.

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

My Architecture set up is -

   ARCHITECTURES -  standard architectures armv7, armv7s, arm64
   VALID ARCHITECTURES -  armv7, armv7s, arm64

But when I chage these to only ARMV7 - it works (32bit devices/simulators)

What could be the issue, doesn't opentok support 64 bit devices ? Please help me, thanks in advance.

3

There are 3 answers

1
gabbler On

You can check if the library contains 64bit code using lipo. The result shows it is a 32bit framework.

$ lipo -info OpenTok.framework/OpenTok 
Architectures in the fat file: OpenTok.framework/OpenTok are: armv7 armv7s i386

What you can do is to change Build Active Architecture only to NO in project settings and target settings, this way xcode will build all architecture included in the settings but lose some performance since arm64 is better option for 64bit iPhones.

0
average Joe On

OpenTok 2.4.0 with 64 bit support has been released recently: https://tokbox.com/opentok/libraries/client/ios/

0
ali On

You may get this error due to enable bitcode. Try to set enable bitcode "No"

Go to Targets - > Build Settings -> Search "Enable Bitcode" -> Set to "No"

That is solved my problem.