Can Poyrazoğlu
Can Poyrazoğlu

Reputation: 34810

Apple Watch app not starting, console logs "SandboxViolation: MyApp(183) deny(1) file-read-times /var"

I am trying to run my Apple Watch app on my Apple Watch and it is stuck at the loading spinner forever (the new one where the indicator turns around the app icon). I went to Xcode/Devices to inspect the logs on my watch, and the moment I tap my app icon it says:

Nov 29 22:34:40 Cans-AppleWatch kernel(Sandbox)[0] <Notice>: SandboxViolation: MyWatchApp(183) deny(1) file-read-times /var

It just waits forever. I've tried deleting/reinstalling app the restarted all devices (Mac, iPhone, Apple Watch) but the problem persists.

Upvotes: 1

Views: 346

Answers (1)

Can Poyrazoğlu
Can Poyrazoğlu

Reputation: 34810

After investigating, I've realized that the parent app and the WatchKit extension can't share data, as WatchKit app + Watch app physically live on the Apple Watch (and the files are physically on the watch), whereas the parent app lives on iPhone.

App groups (apparently) can only share data on the same device. Watch app can share with WatchKit app on the same device and iPhone app can share data with other apps or extensions on the same device (yeah, iPhone).

I've ended up writing files locally, and using the watch session to send files between devices on demand.

Upvotes: 1

Related Questions