作者:黄晓敏3023 | 来源:互联网 | 2023-05-19 04:44
I'm doing Unit Tests in Swift, and am running into a problem. Every time I run the tests, I get the error:
我在Swift中进行单元测试,遇到了问题。每次运行测试时,都会收到错误消息:
Could not cast value of type 'app.AppDelegate' to 'app_Tests.AppDelegate'
I made sure that the AppDelegate was unchecked from the tests bundle, and the view controllers cannot access the app delegate anymore. Does anyone have a solution to this problem. Thanks in advance!
我确保从测试包中取消选中AppDelegate,并且视图控制器无法再访问应用程序委托。有没有人有解决这个问题的方法。提前致谢!
1 个解决方案