Adding the ViewInspector package
ViewInspector is an open source library that you can find on GitHub: https://github.com/nalexn/ViewInspector. To add it to our project, follow these steps:
- Select the File | Add Packages menu item in Xcode.
- Type into the search field the URL of the package,
https://github.com/nalexn/ViewInspector
:
Click Add Package.
- Xcode presents a new window in which we can set the target to which the package should be added. Select the ToDoTests target. Then click Add Package again.
The package is now added to the ToDoTests target and we can use it in our unit tests.