I'm creating my first UI Test for my iOS app. Every time I run the test I get the error:
UI Testing Failure - App accessibility isn't loaded
(please see attached image)
plus an error message in the debug console:
dyld: Library not loaded: @rpath/RestKit.framework/RestKit
Referenced from: /Users/Claus/Library/Developer/CoreSimulator/Devices/<code>/data/Containers/Bundle/Application/<code>/MyApp.app/MyApp
Reason: image not found
I would like to point out that the RestKit (installed using CocoaPods) library doesn't give any problem when I build and run my app on the simulator or real device.
Do you have RestKit specified in your Podfile for the UI Test target?
at the moment I have no targets specified in the pod file. Should I create them and clone the pods?
that'd be the issue. If you want to use the pods in your UI Testing target, you need to specify that in your Podfile.
Ok I created two targets in the Podfile with the same pods. I also added
${inherited} to the "Other Linker flags: in the MyAppUITests target
when I run pod install I get this message:
CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target MyApp to Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig or include the Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig in your build configuration.
I checked my configuration and it's:
Project > Info > Configuration > Debug
MyApp -> Pods.debug
MyAppUITests -> Pods-MyAppUITests.debug
so it should be ok, but now the project doesn't build anymore

Change MyApp to Pods-MyApp.debug.xcconfig.
I have done it but now I have a new error when I run the tests

btw was the change '${inherited} to the "Other Linker flags: in the MyAppUITests target' ok?
all broken. Isn't there a step-by-step tutorial for running UI Tests on project using CocoaPods?
¯_(ツ)_/¯ we'd need an example project we could debug to really know for sure. I've never used Xcode's UI Testing.
strangely on the test project is working but on my main project is not. Unfortunately I cannot share the source code.
I have:
but I have still the same error. Here's my podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
inhibit_all_warnings!
target 'MyApp' do
pod 'ECSlidingViewController'
pod 'GoogleAnalytics'
pod 'SwipeView'
pod 'ChameleonFramework'
pod 'SDWebImage'
pod 'UIActivityIndicator-for-SDWebImage'
pod 'RestKit'
pod 'FontAwesomeKit'
pod 'RMMapper'
pod 'Heap'
pod 'TTTAttributedLabel'
pod 'SVProgressHUD'
pod 'DZNEmptyDataSet'
pod 'iRate'
pod 'Fabric'
pod 'Crashlytics'
end
target 'MyAppUITests' do
pod 'ECSlidingViewController'
pod 'GoogleAnalytics'
pod 'SwipeView'
pod 'ChameleonFramework'
pod 'SDWebImage'
pod 'UIActivityIndicator-for-SDWebImage'
pod 'RestKit'
pod 'FontAwesomeKit'
pod 'RMMapper'
pod 'Heap'
pod 'TTTAttributedLabel'
pod 'SVProgressHUD'
pod 'DZNEmptyDataSet'
pod 'iRate'
pod 'Fabric'
pod 'Crashlytics'
end
I have also de-integrated the project and run pod install again but I keep on getting the same error.
I have the same bug since I download XCode 7.2.1...
The bundle “projectUITests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
.../projectUITests.xctest/projectUITests): Library not loaded: @rpath/libswiftAVFoundation.dylib
Referenced from: .../Debug-iphonesimulator/RSBarcodes_Swift.framework/RSBarcodes_Swift
Reason: image not found)
This issue has been inactive for a long time and will be closed because we want to move forward with a clean slate after our 1.0 release. If you believe this is still relevant, please retest with the 1.0 release candidate and comment with a reproducible project in order for this to become actionable again. Thanks!
issue is till relevant, just tested it with 1.0. It is really important to get this fixed for the UI tests.
I'm still experiencing this issue with cocoapods 1.0
We are having the exact same problem and are looking forward for a solution. Thank you!
I'm getting this issue and I am not using Cocoapods at all. It looked like I had 'dragged and dropped' a dependency into the Xcode folder navigation panel before repeating the same thing again, at a later date, resulting in a duplicate dependency. Interestingly, out of the pair, one of them was highlighted red.
I removed all of my dependencies, cleared derived data, then re-added all the files and that solved the issue.
Most helpful comment
We are having the exact same problem and are looking forward for a solution. Thank you!