Parse Apple Mach O-Linker error?

2019-05-03 12:00发布

问题:

I was using the parse framework and all of a sudden I got 39 errors. even when I delete the the framework, it still has the errors. I already checked the build phases/settings and the paths, but nothing worked. Also, I'm using xcode 4.6.3 (I have an outdated macbook).

    Ld
 "/Users/anikakablan/Library/Developer/Xcode/DerivedData/_App-gkiwwexxeirenwdbcblamqsuyjcy/Build/Products/Debug-iphonesimulator/
 App.app/ App" normal i386
     cd "/Users/anikakablan/Desktop/ App"
     setenv IPHONEOS_DEPLOYMENT_TARGET 6.1
     setenv PATH "/Users/anikakablan/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Users/anikakablan/Desktop/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
     /Users/anikakablan/Desktop/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
 -arch i386 -isysroot /Users/anikakablan/Desktop/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk
 -L/Users/anikakablan/Library/Developer/Xcode/DerivedData/_App-gkiwwexxeirenwdbcblamqsuyjcy/Build/Products/Debug-iphonesimulator -F/Users/anikakablan/Library/Developer/Xcode/DerivedData/_App-gkiwwexxeirenwdbcblamqsuyjcy/Build/Products/Debug-iphonesimulator "-F/Users/anikakablan/Desktop/
 App/../../Downloads/parse-library-1.2.21 (1)" -filelist
 "/Users/anikakablan/Library/Developer/Xcode/DerivedData/_App-gkiwwexxeirenwdbcblamqsuyjcy/Build/Intermediates/
 App.build/Debug-iphonesimulator/
 App.build/Objects-normal/i386/ App.LinkFileList" -Xlinker
 -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.1 -framework QuartzCore -framework CoreImage -framework Parse -framework UIKit
 -framework Foundation -framework CoreGraphics -o "/Users/anikakablan/Library/Developer/Xcode/DerivedData/_App-gkiwwexxeirenwdbcblamqsuyjcy/Build/Products/Debug-iphonesimulator/
 App.app/ App"










Undefined symbols for architecture i386:
  "_AudioServicesCreateSystemSoundID", referenced from:
      +[PFPush handlePush:] in Parse(PFPush.o)
  "_AudioServicesPlaySystemSound", referenced from:
      +[PFPush handlePush:] in Parse(PFPush.o)
  "_If", referenced from:
      -[ViewControllerLogin checkFieldsComplete] in ViewControllerLogin.o
      -[SignInViewController checkFieldsComplete] in SignInViewController.o
  "_OBJC_CLASS_$_BFExecutor", referenced from:
      objc-class-ref in Parse(BFTask+Private.o)
      l_OBJC_$_CATEGORY_BFExecutor_$_Background in Parse(BFTask+Private.o)
  "_OBJC_CLASS_$_BFTask", referenced from:
      objc-class-ref in Parse(PFUser.o)
      objc-class-ref in Parse(PFNetworkCommandRunner.o)
      objc-class-ref in Parse(PFObject.o)
      objc-class-ref in Parse(PFRetryingCommandRunner.o)
      objc-class-ref in Parse(PFFile.o)
      objc-class-ref in Parse(PFQuery.o)
      objc-class-ref in Parse(PFTaskQueue.o)
      ...
  "_OBJC_CLASS_$_BFTaskCompletionSource", referenced from:
      objc-class-ref in Parse(PFNetworkCommandRunner.o)
      objc-class-ref in Parse(PFObject.o)
      objc-class-ref in Parse(PFCommandCache.o)
      objc-class-ref in Parse(PFFile.o)
      objc-class-ref in Parse(BFTask+Private.o)
  "_OBJC_CLASS_$_CLLocationManager", referenced from:
      objc-class-ref in Parse(PFLocationManager.o)
  "_SCNetworkReachabilityCreateWithName", referenced from:
      +[PFInternalUtils(Reachability) isParseReachable] in Parse(PFInternalUtils.o)
      -[PFCommandCache init] in Parse(PFCommandCache.o)
  "_SCNetworkReachabilityGetFlags", referenced from:
      +[PFInternalUtils(Reachability) isParseReachable] in Parse(PFInternalUtils.o)
      ___22-[PFCommandCache init]_block_invoke in Parse(PFCommandCache.o)
  "_SCNetworkReachabilitySetCallback", referenced from:
      -[PFCommandCache init] in Parse(PFCommandCache.o)
  "_SCNetworkReachabilitySetDispatchQueue", referenced from:
      -[PFCommandCache init] in Parse(PFCommandCache.o)
      -[PFCommandCache dealloc] in Parse(PFCommandCache.o)
  "_SecCertificateCopyData", referenced from:
      -[PF_AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in Parse(PF_AFURLConnectionOperation.o)
  "_SecCertificateCreateWithData", referenced from:
      ___47+[PF_AFURLConnectionOperation pinnedPublicKeys]_block_invoke in Parse(PF_AFURLConnectionOperation.o)
  "_SecItemAdd", referenced from:
      +[PFInternalUtils saveToKeychain:data:] in Parse(PFInternalUtils.o)
  "_SecItemCopyMatching", referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_SecItemDelete", referenced from:
      +[PFInternalUtils saveToKeychain:data:] in Parse(PFInternalUtils.o)
      +[PFInternalUtils deleteFromKeychain:] in Parse(PFInternalUtils.o)
  "_SecPolicyCreateBasicX509", referenced from:
      ___47+[PF_AFURLConnectionOperation pinnedPublicKeys]_block_invoke in Parse(PF_AFURLConnectionOperation.o)
      -[PF_AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in Parse(PF_AFURLConnectionOperation.o)
  "_SecTrustCopyPublicKey", referenced from:
      ___47+[PF_AFURLConnectionOperation pinnedPublicKeys]_block_invoke in Parse(PF_AFURLConnectionOperation.o)
      -[PF_AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in Parse(PF_AFURLConnectionOperation.o)
  "_SecTrustCreateWithCertificates", referenced from:
      ___47+[PF_AFURLConnectionOperation pinnedPublicKeys]_block_invoke in Parse(PF_AFURLConnectionOperation.o)
      -[PF_AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in Parse(PF_AFURLConnectionOperation.o)
  "_SecTrustEvaluate", referenced from:
      ___47+[PF_AFURLConnectionOperation pinnedPublicKeys]_block_invoke in Parse(PF_AFURLConnectionOperation.o)
      -[PF_AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in Parse(PF_AFURLConnectionOperation.o)
  "_SecTrustGetCertificateAtIndex", referenced from:
      -[PF_AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in Parse(PF_AFURLConnectionOperation.o)
  "_SecTrustGetCertificateCount", referenced from:
      -[PF_AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in Parse(PF_AFURLConnectionOperation.o)
  "_UTTypeCopyPreferredTagWithClass", referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
  "_UTTypeCreatePreferredIdentifierForTag", referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
  "_kCFStreamPropertyFTPAttemptPersistentConnection", referenced from:
      -[PFHTTPCommand scheduleInCurrentThread] in Parse(PFHTTPCommand.o)
  "_kCFStreamPropertyHTTPAttemptPersistentConnection", referenced from:
      -[PFHTTPCommand scheduleInCurrentThread] in Parse(PFHTTPCommand.o)
  "_kSecAttrAccessible", referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecAttrAccessibleAfterFirstUnlock", referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecAttrAccount", referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecAttrService", referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecClass", referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecClassGenericPassword", referenced from:
      +[PFInternalUtils getKeychainQuery:] in Parse(PFInternalUtils.o)
  "_kSecMatchLimit", referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_kSecMatchLimitOne", referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_kSecReturnData", referenced from:
      +[PFInternalUtils loadFromKeychain:] in Parse(PFInternalUtils.o)
  "_kSecValueData", referenced from:
      +[PFInternalUtils saveToKeychain:data:] in Parse(PFInternalUtils.o)
  "_kUTTagClassFilenameExtension", referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
  "_kUTTagClassMIMEType", referenced from:
      -[PFFile getMimeType] in Parse(PFFile.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

回答1:

You have to import all this following frameworks in your project to use parse.com frameworks and remove errors.

AudioToolbox.framework
CFNetwork.framework
CoreGraphics.framework
CoreLocation.framework
libz.1.1.3.dylib
MobileCoreServices.framework
QuartzCore.framework
Security.framework
StoreKit.framework
SystemConfiguration.framework