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)
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/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng 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.