简体   繁体   English

Swift Realm Simulator权限被拒绝

[英]Swift Realm Simulator Permission Denied

I have been using RealmSwift for a while with no issues. 我使用RealmSwift已有一段时间了,没有任何问题。 However I have just started to get the following error when running Simulator with a Realm Swift Project 但是,当我使用Realm Swift Project运行Simulator时,我刚刚开始出现以下错误

xcode: 8.2.1 (I am on El Capitain so this is the latest I can go) xcode:8.2.1(我在El Capitain上,所以这是我可以去的最新版本)

RealmSwift: 3.0.2 RealmSwift:3.0.2

Swift: 3.0.2. 斯威夫特:3.0.2。

Error: Domain=io.realm.unknown Code=13 "Permission denied" 错误:Domain = io.realm.unknown代码= 13“权限被拒绝”

file:///Users/michaelmoulsdale/Library/Developer/CoreSimulator/Devices/B83BA287-5365-4048-A813-042D63A194A6/data/Containers/Data/Application/78F3500D-975E-4A60-A674-203325588F3F/Documents/default.realm fatal error: 'try!' 文件:///Users/michaelmoulsdale/Library/Developer/CoreSimulator/Devices/B83BA287-5365-4048-A813-042D63A194A6/data/Containers/Data/Application/78F3500D-975E-4A60-A674-203325588F3F/Documents/default.realm致命错误:“尝试!” expression unexpectedly raised an error: Error Domain=io.realm.unknown Code=13 "Permission denied" UserInfo={Category=system, Error Code=13, NSLocalizedDescription=Permission denied}: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-800.0.63/src/swift/stdlib/public/core/ErrorType.swift, line 178 表达式意外引发错误:Error Domain = io.realm.unknown Code = 13“权限被拒绝” UserInfo = {Category = system,错误代码= 13,NSLocalizedDescription =权限被拒绝}:文件/Library/Caches/com.apple.xbs /Sources/swiftlang/swiftlang-800.0.63/src/swift/stdlib/public/core/ErrorType.swift,第178行

I have tried the following things update Cocoa Pods for RealmSwift I am in the progressing of re-installing Xcode from the developer downloads. 我尝试了以下操作,以更新RealmSwift的Cocoa Pods。我正在从开发人员下载中重新安装Xcode。

Any other thoughts? 还有其他想法吗?

I finally deleted the CoreSimulator directory (file:///Users/michaelmoulsdale/Library/Developer/CoreSimulator/Devices) 我终于删除了CoreSimulator目录(文件:/// Users / michaelmoulsdale / Library / Developer / CoreSimulator / Devices)

When I ran the next simulation, this directory was recreated and all was well. 当我运行下一个模拟时,重新创建了该目录,一切顺利。

Odd little behaviour, no idea what caused it. 奇怪的小行为,不知道是什么原因造成的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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