swift-snapshot-testing
swift-snapshot-testing copied to clipboard
Cannot use Scene methods for URL, NSUserActivity, and other External Events without using SwiftUI Lifecycle Warning
Describe the bug
When running snapshot tests, if the view being tested uses the SwiftUI .onOpenURL modifier, a warning is produced that reads:
Cannot use Scene methods for URL, NSUserActivity, and other External Events without using SwiftUI Lifecycle. Without SwiftUI Lifecycle, advertising and handling External Events wastes resources, and will have unpredictable results.
To Reproduce Zipped up a very basic project that reproduces the behavior:
Expected behavior We should not receive any warning
Environment
- swift-snapshot-testing version:
1.9.0 - Xcode:
13.2.1 (13C100) - Swift:
5 - OS:
iOS 15
This doesn't appear to be an issue with the library that we can control, so I am going to convert this to a discussion.