简体   繁体   中英

SandboxViolation: WatchOS app crashes when running on device

I have an app for watchOS 3 that works perfectly fine and doesn't really do much. But when I try to launch and debug it on a real device the app crashes and the console logs this:

SandboxViolation: logd(46) deny(1) file-read-data /private/var/containers/Bundle/Application/*Identifier*/*appname*/Frameworks/libswiftos.dylib

I honestly have no clue what is going wrong. I remember it to work before but then on one point it stopped (can't remember changing anything relevant)

通常这是因为您请求了一些需要许可的内容(例如位置、联系人等)并且没有在Info.plist文件中提供许可原因。

In my case the solution was that the Watch app took too long to launch. I deleted all upfront initialisation and found out that it was somehow too much (In fact I wasn't doing that much but initialising a picker with images from an extension which took too much time).

After optimising this it worked as expected!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM