將Nimble作爲git子模塊添加時出現問題。我已經在Quick/Nimble上解僱了issue,但問題似乎不太可能是一個敏捷問題,它可能更像是一個Xcode問題,因此我在這裏問。獲取「Library not loaded:@ rpath/libswiftSwiftOnoneSupport.dylib」錯誤
我按照Nimble安裝指南設置了一個簡單的項目,現在在github。基本上我創建了一個xcworkspace
和一個xcodeproj
(添加到工作區)。 Nimble作爲git子模塊和子項目添加到工作區中。然後,我將Nimble.framework添加到我的測試目標Build Phases中,並編寫了一些簡單的測試代碼,以查看Nimble是否正在運行。
當我運行測試時,Xcode給了此錯誤消息:
2017-02-20 23:41:29.482 xctest[52165:616190] The bundle 「MainProjTests」 couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2017-02-20 23:41:29.483 xctest[52165:616190] (dlopen_preflight(/Users/nandiin/Library/Developer/Xcode/DerivedData/NimbleIssue-fkhppktoktwpjodtarmzrjobszwv/Build/Products/Debug-iphonesimulator/MainProjTests.xctest/MainProjTests): Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /Users/nandiin/Library/Developer/Xcode/DerivedData/NimbleIssue-fkhppktoktwpjodtarmzrjobszwv/Build/Products/Debug-iphonesimulator/Nimble.framework/Nimble
Reason: image not found)
Program ended with exit code: 82
我已經嘗試了一些解決方案,我發現類似的問題,他們沒有工作:
- 設置
Embed Asset Packs In Product Bundle
至YES
(針對主要目標和測試目標都嘗試) - 設置
Always Embed Swift Standard Libraries
至YES
(嘗試了b OTH主要目標和測試目標)