Phonegap build issues

I have had the worst two days.  Here I have my app, Notiffi, pretty much ready to go.  I have it set up in iTunes connect, ready to go.  I am ready for the last step in the process, archiving.  I hit Archive and BOOM.  Nothing.  Build works.  Debug works.  Archive does not work, and it still doesn’t as I’m writing this.  Also, suddenly I start getting linker errors like this when I was building it and so I couldn’t even check to see if the app worked any more.

(null): "_OBJC_CLASS_$_CDVPlugin", referenced from:
(null): _OBJC_CLASS_$_ChildBrowserCommand in ChildBrowserCommand.o
(null): _OBJC_CLASS_$_PushNotification in PushNotification.o
(null): "_OBJC_CLASS_$_CDVViewController", referenced from:
(null): _OBJC_CLASS_$_MainViewController in MainViewController.o
(null): "_OBJC_METACLASS_$_CDVPlugin", referenced from:
(null): _OBJC_METACLASS_$_ChildBrowserCommand in ChildBrowserCommand.o
(null): _OBJC_METACLASS_$_PushNotification in PushNotification.o
(null): "_OBJC_CLASS_$_CDVPluginResult", referenced from:
(null): Objc-class-ref in PushNotification.o
(null): "_OBJC_METACLASS_$_CDVViewController", referenced from:
(null): _OBJC_METACLASS_$_MainViewController in MainViewController.o
(null): Symbol(s) not found for architecture armv7
(null): Linker command failed with exit code 1 (use -v to see invocation)

While Archiving (at the moment) still isn’t working I did find a way to get the linker errors to go away.  I presume that it was because of some incorrect paths in Xcode, but I’m a PHP, Java, HTML and JavaScript developer and so compiler issues on a Mac with Xcode are things that I know a lot about.  Linux?  Sure.  Mac/Xcode?  Not a bit.

But my workaround for this was relatively easy.  I removed CordovaLib as a subproject and built it separately.  Then I did find ./ -name libCordova.a on my home directory, created a new dir called /lib in my project and copied libCordova.a there.  I cleaned the project, rebuilt and and voila! it worked.

Now on to fix the Archiving problem.  For some reason I get this

Command /Applications/ emitted errors but did not return a nonzero exit code to indicate failure


/Users/tk421/Documents/Notiffi/Notiffi/Plugins/ChildBrowserCommand.h:5:9: 'Cordova/CDVPlugin.h' file not found

Hopefully these will be easy issues


They were not easy issues. I basically created a brand new Cordova project and copied all of my source files in.  Clearly there was something wrong in my build configuration, but I don’t know what it was.

One Thought to “Phonegap build issues”

  1. I firmly believe that phonegap development has been quite successful over the years. I do not think that anybody will now prefer to develop any particular application individually for all the platforms, keeping in mind the cost and time spent during the development process. PhoneGap is one easy way to develop apps for all the platforms easily.

Leave a Reply

Your email address will not be published.