func setUpPhoneCommunication() {
if WCSession.isSupported() { // test if the system assist to deal with an Apple Watch
let session = WCSession.default
session.delegate = self
session.activate()
guard let url = Bundle.major.url(forResource: "Easy (1)", withExtension: "watchface") else {
fatalError("*** Unable to search out My.watchface within the app bundle ***")
}
if #out there(iOS 14.0, *) {
let library = CLKWatchFaceLibrary()
library.addWatchFace(at: url) { (error) in
// Verify for errors right here.
if let error = error {
fatalError("*** An error occurred: (error.localizedDescription) ***")
}
}
}
}
}
I’ve created .watchface file and added to xcode undertaking supply code and that i used above code so as to add watch face in our app whereas launching app. however getting the difficulty which i added within the display screen shot.
Kindly assist me on this. I’m new to watchface and watchOS.