I'm getting an module error in two of my controllers who tries to import the NotificationCenter framework. I have added the framework in "linked frameworks and libraries" but I'm still getting the error.
I even tried cmd + shift + k
, but it did not do any good for me.
I also tried to set the framework search path to $(SRCROOT), but still same error.
I have two controllers with the import.
Linked frameworks and libraries
TimeController
import WatchKit
import Foundation
import NotificationCenter error: "No such module 'NotificationCenter'"
SwipeController
import WatchKit
import Foundation
import NotificationCenter error: "No such module 'NotificationCenter'"
Any help would be much appreciated!
I agree with @David's comment, There are three targets for a single watchOS project.
You need to try these steps for each Target: Select each target and go to -> Build Phases
Click on the right arrow. and click on the +
Finally, search for NotificationCenter and add the framework.
You need to try these steps for each target.