I had created an Xcode project without unit testing. I have added cocoa pods when I try to create a new unit testing and try to import @testable import 'ProjectName' it gives an error Failed to load module 'ProjectName'. can u please help me out to solve the problem
@testable import 'ProjectName' Failed to load module
Update Podfile like this and check
target 'App' do
pod 'Alamofire'
target 'Demo AppTests' do
inherit! :search_paths
end
target 'Demo AppUITests' do
inherit! :search_paths
end
end
If your problem is not solved after trying @Naveen's answer and you have Obj-c bridging-header in your main target, you should create another briding-header with the same values for your tests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With