I am working with Unit Testing in Xcode using XCTest provided by Xcode in objective C. I know how to import Module in Swift like below.
@testable import AppName
Whats the alternative in objective C.
You do not need to include unit tests. Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application.
To add a unit test target to an existing Xcode project, choose File > New > Target. Select your app platform (iOS, macOS, watchOS, tvOS) from the top of the New Target Assistant. Select the Unit Testing Bundle target from the list of targets.
In Objective C you can simply #import
them, as there are no such "internal" method access limitations as in Swift.
Also, On Xcode 6 your main target should be already linked to the test target. If not, try to check the "Allow testing Host Application APIs" checkbox inside Your Test Target > General > Testing. Take a look at this question for more information.
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