Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova 3.4 with xcode 5.1 won´t build with latest file-transfer plugin

Tags:

xcode

ios

cordova

I updated my cordova app to 3.4.0-0.1.3. I have xcode 5.1. In my app I use a brunch of plugins an rm/add all of them. cordova plugins list reports the following:

[ 'com.phonegap.plugins.PushPlugin',
  'org.apache.cordova.camera',
  'org.apache.cordova.console',
  'org.apache.cordova.device',
  'org.apache.cordova.dialogs',
  'org.apache.cordova.file',
  'org.apache.cordova.file-transfer',
  'org.apache.cordova.geolocation',
  'org.apache.cordova.globalization' ]

After that I tried to build in xcode and got a lot of errors (47), but I did my homework an found a lot of helpful answers like these http://shazronatadobe.wordpress.com/2014/03/12/xcode-5-1-and-cordova-ios/ which helped me reduce the issues down to 2. Below are the error messages form the command line, because I´m not allowed (by now) to post screenshots. They are quite similar to the one in xcode:

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

** BUILD FAILED **


The following build commands failed:
  Ld build/emulator/Appname.app/Appname normal i386
(1 failure)
Error: /Users/username/Documents/cordova/appname/platforms/ios/cordova/build: Command failed with exit code 65
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/src/superspawn.js:112:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Process.ChildProcess._handle.onexit (child_process.js:802:5)

Because the error message refers to CDVFileTransfer.o, I tried to uninstall the File-Transfer Pluging an build again. Now I got this lovely ** BUILD SUCCEEDED ** Message. After reinstall the plugin, the build fail again.

I did a lot of research but did´t find anything related, except the following, but I´m not sure if this cause the problem: https://issues.apache.org/jira/browse/CB-6212 Can anyone confirm?

Did anyone running the newest cordova (3.4.0-0.1.3) with new xcode (5.1) and the file-transfer plugin (0.4.2)?

Thanks a lot!

like image 479
Gerald Müller Avatar asked Apr 03 '14 11:04

Gerald Müller


1 Answers

I have had the same error. I solved it by checking the files compiled by xcode. In my case CDVFile.m was not in the list.

I invit you to verify if the plugin *.m files are well added to the compilation file list.

like image 135
user3518509 Avatar answered Nov 15 '22 16:11

user3518509