RestKit 与新的 Watson Conversation SDK 有什么关系?链接器错误?

How is the RestKit related to the new Watson Conversation SDK? Linker Error?

我将根据Build a home assistant mobile application with Watson and IoT Platform services

更新我的定制样本

我做到了:

  1. carthage update --platform iOS
  2. 做了pod install
  3. 对 API 内部 Watson 对话参数的更改使用自动修复 xCode
  4. 问一个问题:How to handle a specific situation with a parameter,

现在我得到一个 链接器错误 我现在不知道这个错误是与 API 的更新有关还是与更新的 xCode版本,还是RestKit?

在这段代码中我得到消息:

d: 未找到 RestKit 框架 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)'

Ld /Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/Home\ Assistant.app/Home\ Assistant normal x86_64
    cd /Users/tsuedbroecker/Documents/tsuedbro/MobileBluemix/dev/temp/custom-home-assistant/HomeAssistant/ios/Home_Assistant_5
    export IPHONEOS_DEPLOYMENT_TARGET=10.2
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.2.sdk -L/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/BMSAnalyticsAPI -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/BMSCore -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/BMSPush -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/BluemixAppID -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/BluemixObjectStorage -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/CocoaMQTT -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/JSQMessagesViewController -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/JSQSystemSoundPlayer -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/SwiftCloudant -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/SwiftyJSON -F/Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/SwiftyTimer -F/Users/tsuedbroecker/Documents/tsuedbro/MobileBluemix/dev/temp/custom-home-assistant/HomeAssistant/ios/Home_Assistant_5/Carthage/Build/iOS -filelist /Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Intermediates.noindex/Home\ Assistant.build/Debug-iphonesimulator/Home\ Assistant.build/Objects-normal/x86_64/Home\ Assistant.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=10.2 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Intermediates.noindex/Home\ Assistant.build/Debug-iphonesimulator/Home\ Assistant.build/Objects-normal/x86_64/Home\ Assistant_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Intermediates.noindex/Home\ Assistant.build/Debug-iphonesimulator/Home\ Assistant.build/Objects-normal/x86_64/Home_Assistant.swiftmodule -framework BMSAnalyticsAPI -framework BMSCore -framework BMSPush -framework BluemixAppID -framework BluemixObjectStorage -framework CocoaAsyncSocket -framework CocoaMQTT -framework JSQMessagesViewController -framework JSQSystemSoundPlayer -framework SwiftCloudant -framework SwiftyJSON -framework SwiftyTimer -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker /Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Intermediates.noindex/Home\ Assistant.build/Debug-iphonesimulator/Home\ Assistant.build/Home\ Assistant.app.xcent -framework ConversationV1 -framework RestKit -framework SpeechToTextV1 -framework TextToSpeechV1 -framework Pods_Home_Assistant -Xlinker -dependency_info -Xlinker /Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Intermediates.noindex/Home\ Assistant.build/Debug-iphonesimulator/Home\ Assistant.build/Objects-normal/x86_64/Home\ Assistant_dependency_info.dat -o /Users/tsuedbroecker/Library/Developer/Xcode/DerivedData/Home_Assistant-fffsnixwzzrxidcacfmmnvhqvfxr/Build/Products/Debug-iphonesimulator/Home\ Assistant.app/Home\ Assistant

我在 Whosebug 中关注了一些点击 1. linker command failed with exit code 1 (use -v to see invocation), build app in xcode-Cocoapods

但我找不到有助于解决问题的解决方案。

如果您使用的是最新版本的 Watson Swift SDK,它不再将 RestKit 构建为单独的框架,而是直接将其链接到每个服务中。所以你应该能够从你的项目中删除 RestKit 框架。

在您的特定情况下,您需要 select Xcode 中的 Home Assistant 项目,然后是 Home Assistant 目标。

在构建阶段中,打开 "Link Binary with Libraries" 项并删除 RestKit.framework。

然后在"Run Script"阶段,从输入文件列表中删除RestKit.framework。

通过这两项更改,您的应用应该可以构建。