nalexn / clean-architecture-swiftui

SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
MIT License
5.73k stars 697 forks source link

UnitTests compile error #57

Closed markych96 closed 3 years ago

markych96 commented 3 years ago

can't run unit tests:

'init()' is unavailable in SystemEventsHandlerTests.swift:167:9

clean-architecture-swiftui/UnitTests/System/SystemEventsHandlerTests.swift:167:9: 'init()' is unavailable

/UIKit.UIOpenURLContext:6:12: 'init()' has been explicitly marked unavailable here

markych96 commented 3 years ago

found some workaround about that issue, ant don't know how implement this, may be this useful

https://developer.apple.com/forums/thread/29851

nalexn commented 3 years ago

@markych96 thanks for reporting this! Haven't used Obj-C for 5+ years, but had to appeal to it to work around the issue. The fix is pushed.