我正在尝试在我的项目中使用地址框架。我已经在我的项目中链接了AddressBookUI.framework和AddressBook.framework框架。但是仍然在构建应用程序时出现以下错误。

请帮助我找出问题。

Ld "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator/Easy Contacts.app/Easy Contacts" normal i386
    cd "/Users/sathishkumar/projects/Easy Contacts"
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -L/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator -F/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator -filelist "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Intermediates/Easy Contacts.build/Debug-iphonesimulator/Easy Contacts.build/Objects-normal/i386/Easy Contacts.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -Xlinker -no_implicit_dylibs -D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/sathishkumar/Library/Developer/Xcode/DerivedData/Easy_Contacts-eafemguogncacmhgnbfsjtizjcbd/Build/Products/Debug-iphonesimulator/Easy Contacts.app/Easy Contacts"

    Undefined symbols for architecture i386:
      "_ABRecordCopyValue", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_ABMultiValueGetCount", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_ABMultiValueCopyValueAtIndex", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_OBJC_CLASS_$_ABPeoplePickerNavigationController", referenced from:
          objc-class-ref in ViewController.o
      "_kABPersonFirstNameProperty", referenced from:
          -[ViewController displayPerson:] in ViewController.o
      "_kABPersonPhoneProperty", referenced from:
          -[ViewController displayPerson:] in ViewController.o
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

最佳答案

<AddressBook/AddressBook.h>添加到文件中,AddressBookUI就是该地址簿UI。

关于ios - 使用IOS通讯簿框架的问题,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10673794/

10-12 15:54