SDK没有找到图片用的CocoaPods
问题描述:
运行OSX的UI测试时,我想我的第一个自动化UI测试添加到我的应用程序和正在运行到相当多的困难的。SDK没有找到图片用的CocoaPods
该应用程序将建立在其当前状态和主要应用程序本身运行良好。然而,当我尝试运行我的测试中,我得到以下错误:
2016-08-02 19:39:33.340 XCTRunner[17590:966857] Running tests...
2016-08-02 19:39:33.407 XCTRunner[17590:966857] The bundle “MYAPPUITests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2016-08-02 19:39:33.407 XCTRunner[17590:966857] (dlopen_preflight(/Users/username/Library/Developer/Xcode/DerivedData/MYAPP-bdpxtxtxmsobtreqnojvykobjlts/Build/Products/Debug/MYAPPUITests-Runner.app/Contents/PlugIns/MYAPPUITests.xctest/Contents/MacOS/MYAPPUITests): Library not loaded: @rpath/HockeySDK.framework/Versions/A/HockeySDK
Referenced from: /Users/username/Library/Developer/Xcode/DerivedData/MYAPP-bdpxtxtxmsobtreqnojvykobjlts/Build/Products/Debug/MYAPPUITests-Runner.app/Contents/PlugIns/MYAPPUITests.xctest/Contents/MacOS/MYAPPUITests
Reason: image not found)
我已经看到了有上这么几个相关的问题,但他们没有看到来帮助我。
本来我是执行我的测试中雨燕上的目标C应用程序之上,并认为可能是问题所在。但是,我做的是我遇到了一模一样的问题目的C.
感谢所有帮助一个Objective-C基于测试目标后发现的。
编辑
一些额外的信息:我一直在使用这两种的CocoaPods 0.39.0以及最新的非测试版本1.x的尝试这个。两者都导致相同的错误。
我podfile列出如下(为0.39.0)
platform :osx, '10.9'
link_with 'MYAPP', 'MYAPP MAS', 'MYAPPUITests'
pod 'AFNetworking', '~> 2.5.0'
pod 'ISO8601DateFormatter'
pod 'CDEvents', :git => 'https://github.com/rastersize/CDEvents'
pod 'MASShortcut', '1.3.1'
pod 'libPusher', '1.6'
pod 'NPReachability', :git => 'https://github.com/Abizern/NPReachability.git', :commit => 'e57753d'
pod 'CocoaLumberjack'
pod 'SocketRocket', :git => 'https://github.com/marianoabdala/SocketRocket.git'
pod 'HockeySDK-Mac'
pod 'INAppStoreWindow', '~> 1.4'
答
我能够加入一个不起眼的步骤,我的构建阶段愿意花2-3天之后,以解决这个问题。
我在Link Binary With Libraries
步骤之后和Embed Pods Frameworks
步骤之前创建了一个Copy Files
构建步骤。
我复制违规框架(“HockeySDK”),进入产品目录。这解决了这个问题!
最终,这可能与我的应用程序是一个状态栏应用程序,而不是一个普通的应用程序,作为最后的工作对我来说是关系到运行同样的漏洞一个命令行应用程序的解决方案。
Link to Github bug page with the solution that worked for me