I've had same issue. my case was occured in an UI Module.
I solved the issue by importing PhotoUI Framework to the module.
Reference by https://developer.apple.com/forums/thread/737847
Topic:
Programming Languages
SubTopic:
Swift
Tags: