HomeiOS Developmentios - Not ready so as to add .watchface file in xcode...

ios – Not ready so as to add .watchface file in xcode undertaking


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.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments