Recently I have started writing test case for one old static library. I have loaded the library to Xcode 5,Since Static Library is old , I have to manually add TestProject w
Turning off the pod configuration for the test target fixed the problem for me, it had something to do with the pod configuration messing with it.
For me, we had just turned on CloudKit entitlement. For some reason that broke building.
Had a similar issue:
FrameworkA imports FrameworkB
FrameworkA-Tests also imports FrameworkB
What solved the issue was to remove(comment) all references to FrameworkB in FrameworkA-Tests, then Run Tests once and uncomment the references.
FrameworkA-Tests now imports FrameworkB and runs fine.
Check if you forgot to add your test target in your Podfile
:
target 'MyProject' do
# Add test target
target 'MyProjectTests' do
inherit! :search_paths
end
pod 'SomePodLibrary'
end
The bundle UITests couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle
Verify if all your targets are using the same iOS version in: Build Settings -> iOS Deployment Target
If other readers are getting this error, and you're using Carthage to add a framework, ensure the Copy Files
phase is with Destination: Frameworks.
If you accidentally add the frameworks to a Copy Files
phase with a different target (other than Frameworks), or Copy Bundle Resources
, this will also produce the damaged / invalid bundle error message.