I have a strange problem. Xcode 12.5 In one of my project I cannot use 'import EventKitUI'. When I use this it says 'Could not build Objective-C module 'EventKitUI'' However, when I create a new swift project I can add import EventKitUI without any problem. For some reason the problem exists in this particular project only. Maybe I mess up with settings but I have no idea where to look at.
Cannot import EventKitUI. Error Could not build Objective-C module
OK. I found out that EventKitUI can not be used with widget. Took me a while to learn about this.
More detail. In one of my file in my main app, I use EventKitUI. And I also check the widget target in the Target Membership of this file. When I remove the checkmark everything works fine. So, in my situation I have to create another swift file in the main app and move the EventKitUI part out of my main file and put it in the newly created file. Everything is working now.
Thank you.