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

最后都变了- 提交于 2020-01-05 09:14:10

问题


I am going to update my customised sample based on Build a home assistant mobile application with Watson and IoT Platform services

I did:

  1. carthage update --platform iOS
  2. did the pod install
  3. Using the autofix for the API Changes of the Watson Conversation Parameter inside xCode
  4. Asking a question about: How to handle a concrete situation with a parameter, here on Stack Overflow

And now I got a linker error and I do not now is the error related to the update of the API or is it related to a newer xCode version, or the RestKit?

In this code I get the message:

d: framework not found RestKit clang: error: linker command failed with exit code 1 (use -v to see invocation)'

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

I followed some hits here in stackoverflow 1. linker command failed with exit code 1 (use -v to see invocation), build app in xcode-Cocoapods

But I was not able to find a solution which helped to fix the problem.


回答1:


If you are using the latest release of the Watson Swift SDK, it no longer builds RestKit as a separate framework, but instead links it directly into each service. So you should be able to just remove the RestKit framework from your project.

In your particular case, you need to select the Home Assistant Project in Xcode and then the Home Assistant target.

In Build Phases, open "Link Binary with Libraries" item and delete RestKit.framework.

Then in the "Run Script" phase, delete RestKit.framework from the input files list.

With these two changes your app should build.



来源:https://stackoverflow.com/questions/48277430/how-is-the-restkit-related-to-the-new-watson-conversation-sdk-linker-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!