3

I have been developing an app the works with the apple watch's workouts and an iPhone. The app is written in swift and communication has been working properly for weeks while I add features. I am suddenly getting the following error code when I try to run my app on my iPhone.

[WCFileStorage loadAppContextDataFromInbox] error loading in application context from inbox NSFileReadNoPermissionError -> EACCES

This error is being generated on a program that was working fine using the same code. I believe the error is coming from the following line of code:

WCSession.default.updateApplicationContext(dictionary)

in the func shown below.

func sendAppStateToWatch(appState : String?) {

    if WCSession.isSupported() {

        if let appStatus = appState {

            do {

                let dictionary = ["iOSAppState" : appStatus]
                try WCSession.default.updateApplicationContext(dictionary)
            } catch {

                print("sendActiveTimeToPhone() ERROR: \(error)")
            }
        }

    }
}

This function has been working without problem for at least a month. Suddenly, I am getting the error shown above. I have rebooted the watch, phone and Xcode without effect. I suspect the error comes from some privacy setting on the phone or watch that flipped, but looking around I cannot find the problem. Any help is appreciated.

Delph2
  • 119
  • 1
  • 9
  • I was able to fix this error by uninstalling the app on my iPhone and installing it fresh. – Delph2 Oct 31 '19 at 21:42
  • After uninsatlling and installing ,i am still getting this issue. do you find any other solution for this issue. it is not a proper way to install it again and again – vishnu anilkumar Sep 19 '20 at 06:31

0 Answers0