Ios 更新为解析1.8.4 pod后Apple Mach-O链接器错误

Ios 更新为解析1.8.4 pod后Apple Mach-O链接器错误,ios,parse-platform,xcode6,cocoapods,Ios,Parse Platform,Xcode6,Cocoapods,在更新到最新的解析pod(1.8.4)后,我只有在为设备构建时才收到Apple Mac-O链接器错误。模拟器工作正常 Ld /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos/ParseCrashReporting.framework/ParseCrashReporting normal arm64 cd "/U

在更新到最新的解析pod(1.8.4)后,我只有在为设备构建时才收到Apple Mac-O链接器错误。模拟器工作正常

Ld /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos/ParseCrashReporting.framework/ParseCrashReporting normal arm64
    cd "/Users/mile/Projects/Nanusim Xcode/nanusim_obejctiveC/Nanuism/Pods"
    export IPHONEOS_DEPLOYMENT_TARGET=8.4
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.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 arm64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk -L/Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos -L/Users/mile/Projects/Nanusim\ Xcode/nanusim_obejctiveC/Nanuism/Pods/ParseCrashReporting -F/Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos -filelist /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Intermediates/Pods.build/Debug-iphoneos/ParseCrashReporting.build/Objects-normal/arm64/ParseCrashReporting.LinkFileList -install_name @rpath/ParseCrashReporting.framework/ParseCrashReporting -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -dead_strip -ObjC -lParseCrashReportingLib -lsqlite3 -lstdc++.6 -lz -framework CFNetwork -framework Foundation -framework Security -framework SystemConfiguration -fobjc-arc -fobjc-link-runtime -miphoneos-version-min=8.4 -framework Bolts -framework CFNetwork -framework Foundation -framework Parse -framework Security -framework SystemConfiguration -single_module -compatibility_version 1 -current_version 1.8.4 -Xlinker -dependency_info -Xlinker /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Intermediates/Pods.build/Debug-iphoneos/ParseCrashReporting.build/Objects-normal/arm64/ParseCrashReporting_dependency_info.dat -o /Users/mile/Library/Developer/Xcode/DerivedData/Nanuism-ezuxcvwcbtlytwdpwrmzcxghttsw/Build/Products/Debug-iphoneos/ParseCrashReporting.framework/ParseCrashReporting



ld: 14 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

请查看findObjectsInBackgroundWithBlock方法中的签名。将AnyObject更改为PFObject应该可以做到这一点

这是
ParseCrashReporting
库的一个问题。版本1.8.2没有此问题。在撰写本文时,该问题出现在1.8.3、1.8.4和1.8.5(当前版本)中

如果您可以从6.4升级到Xcode 7,则不会出现此问题

如果您仍然必须使用6.4,那么它似乎与在测试目标中包括Pods.xcconfig以及为设备构建时有关

具体而言,链接器错误包括:

duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(GTMLogger.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(GTMLogger.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(HTTPMultipartUpload.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(HTTPMultipartUpload.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(uploader.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(uploader.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(BreakpadController.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(BreakpadController.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(ParseCrashReporting.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(ParseCrashReporting.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReportingAnalytics.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReportingAnalytics.o)
duplicate symbol _llvm.cmdline in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReport.o)
duplicate symbol _llvm.embedded.module in:
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReporter.o)
    [redacted]/ParseCrashReporting/libParseCrashReportingLib.a(PFCrashReport.o)
ld: 14 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
它们都与
libParseCrashReportingLib.a

我在这里向Parse提交了一个问题,其中包括一个指向复制它的示例项目的链接。但是,步骤很简单:

  • 在Xcode 6.4中,创建一个新的单视图iOS应用程序项目
  • 创建一个
    pod文件
    ,其中包括
    ParseCrashReporting

     source 'https://github.com/CocoaPods/Specs.git'
     platform :ios, '8.0'
     pod 'ParseCrashReporting', '~> 1.8'
    
  • 执行
    pod安装

  • 打开生成的
    xcworkspace
    ,并将Pods.xcconfig添加到测试目标。
  • 为设备构建
  • 生成失败,测试目标出现上述链接器错误

  • 我也看到了。具体来说,问题在于
    ParseCrashReporting
    而不是直接
    Parse
    。我测试了
    parsecrashreporting1.8.2
    (链接很好)。1.8.3和1.8.4似乎对我有这个问题。我提交了一个bug:是的,我对ParseCrashReporting(1.8.4)和ParseFacebookUtilsV4(1.8.4)@Gomines有问题,我不知道你在说什么
    PFQuery.h
    是其中的
    -(void)findobjectsinbackgroundithblock:(PF_NULLABLE pfqueryarray resultblock)块已声明。没有定义
    任何对象
    符号。此外,至少在我的例子中,所有链接器错误都是
    libParseCrashReportingLib.a
    中的
    duplicate symbol\u llvm.cmdline
    (不是
    Parse
    (其中定义了
    PFQuery
    ,而是在
    ParseCrashReporting
    库中)。