Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7381

iOS compile fails with certain plugins

VotersWatch issueWatchersLinkUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      cordova create app1
      cd app1
      cordova plugin add org.apache.cordova.vibration
      cordova plugin add org.apache.cordova.contacts
      cordova platform add ios
      cordova compile

      The compile fails with a long error:
      Undefined symbols for architecture i386:
      "_ABAddressBookAddRecord", referenced from:
      ___20-[CDVContacts save:]_block_invoke_2 in CDVContacts.o
      "_ABAddressBookCopyArrayOfAllPeople", referenced from:
      ___22-[CDVContacts search:]_block_invoke_2 in CDVContacts.o
      "_ABAddressBookCreateWithOptions", referenced from:
      -[CDVContacts peoplePickerNavigationControllerDidCancel:] in CDVContacts.o
      -[CDVAddressBookHelper createAddressBook:] in CDVContacts.o
      "_ABAddressBookGetPersonWithRecordID", referenced from:
      ___30-[CDVContacts displayContact:]_block_invoke in CDVContacts.o
      .
      . (omitting similar lines)
      .
      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/HelloCordova.app/HelloCordova normal i386
      (1 failure)
      Error: /Users/toddmosc/app1/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:743:16)
      at Process.ChildProcess._handle.onexit (child_process.js:810:5)

      It seems like some work the prepare step is doing in the platform add needs to come before it adds in the plugins, also inside the platform add. Doing a prepare after the platform add will fix the build, but it shouldn't be necessary since the platform add does a prepare.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            toddmosc Todd Moscinski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment