Story:
I am trying to use Phonegap with cocoapods. Phonegap already has problems compiling from the command line, so I just use Xcode with the generated project file (and, presumably, I would have to do this when using cocoapods).
I put up on Github a reproducible empty project with my problem: https://github.com/Dan2552/phonegap-reproducable-issue
You can see the steps I took after creating a completely new Phonegap application in the build_ios script in the root directory of the repo. But I also pushed the generated project files (platform / ios) so that anyone who didn't have a phone could open the project.
Problem:
I had a strange compilation problem. Probably problems with the pre-built library of Cordoba and cocoapods.
When creating without any action after creating the project using Phonegap and adding to cocoapods, I get the following errors:
Undefined symbols for architecture i386: "_OBJC_CLASS_$_OTPublisher", referenced from: objc-class-ref in libPods.a(OpenTokPlugin.o) "_OBJC_CLASS_$_OTSession", referenced from: objc-class-ref in libPods.a(OpenTokPlugin.o) "_OBJC_CLASS_$_OTSubscriber", referenced from: objc-class-ref in libPods.a(OpenTokPlugin.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)
Cocoapods warns:
[!] The HelloWorld [Debug] ] target overrides the OTHER_LDFLAGS build parameter defined in `Pods / Pods.xcconfig '.
[!] The HelloWorld [Debug - Release] OTHER_LDFLAGS overrides the OTHER_LDFLAGS build parameter defined in `Pods / Pods.xcconfig '.
and so I tried to remove the OTHER_LDFLAGS element ('Other Linker Flags' in Xcode) in general. This compiles successfully on the iOS device , but not on the simulator, and the project will not be created based on the archive.
The building for the simulator will receive the same error as before ( Undefined symbols for architecture )
The building for the archive will receive /Users/dan2552/projects/ReproducableProblems/OpenTokPhonegap/Classes/OpentokPlugin.h:9:9: 'Cordova/CDVPlugin.h' file not found
I also tried putting $(inherited) in OTHER_LDFLAGS , which gives the same results as deleting them.
ios build xcode cocoapods cordova
Dan2552
source share