Swift Realm Simulator Permission Denied - ios

I have been using RealmSwift for a while with no issues. However I have just started to get the following error when running Simulator with a Realm Swift Project
xcode: 8.2.1 (I am on El Capitain so this is the latest I can go)
RealmSwift: 3.0.2
Swift: 3.0.2.
Error: Domain=io.realm.unknown Code=13 "Permission denied"
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!' 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
I have tried the following things
update Cocoa Pods for RealmSwift
I am in the progressing of re-installing Xcode from the developer downloads.
Any other thoughts?

I finally deleted the CoreSimulator directory (file:///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.

Related

Can't get Firebase Crashlytics to work - not connecting to dashboard

I cannot get Firebase crashlytics to work on iOS with swift. I have created a new app and a new Firebase project. (The app-server connection is succefull - I have checked it by creating a dummy firestore and read from it)
I have followed all the steps as detailed in the Firestore docs:
Added the Firebase/Crashlytics pod
Added the "${PODS_ROOT}/FirebaseCrashlytics/run" script in the project build phases
Selected the dwarf-with-dsym configuration
Forced a crash with fatalError
Run the app with no debugger attached
From the Firebase dashboard Crashlytics page I can only see the the rotating wheel and I do not get the successful installation.
This is XCode error stack when I launch the app:
2021-02-07 20:09:09.672258+0100 crashlyticsTest[43062:2323253] [Firebase/Crashlytics] Version 7.4.0
2021-02-07 20:09:09.874008+0100 crashlyticsTest[43062:2323510] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2021-02-07 20:09:09.918388+0100 crashlyticsTest[43062:2323514] 7.4.0 - [Firebase/Crashlytics][I-CLS000000] Failed to remove file /Users/lucasfragara/Library/Developer/CoreSimulator/Devices/73D5BD20-51E0-4346-8474-375D5018108E/data/Containers/Data/Application/47F2BB34-CB6D-4E08-93B3-CCFC00788DA4/Library/Caches/com.crashlytics.data/com.sfra.crashlyticsTest/v5/reports/prepared/ad561f8c3ef74f6fb5cdf1eadb3bae7d: Error Domain=NSCocoaErrorDomain Code=4 "“ad561f8c3ef74f6fb5cdf1eadb3bae7d” couldn’t be removed." UserInfo={NSUserStringVariant=(
Remove
), NSFilePath=/Users/lucasfragara/Library/Developer/CoreSimulator/Devices/73D5BD20-51E0-4346-8474-375D5018108E/data/Containers/Data/Application/47F2BB34-CB6D-4E08-93B3-CCFC00788DA4/Library/Caches/com.crashlytics.data/com.sfra.crashlyticsTest/v5/reports/prepared/ad561f8c3ef74f6fb5cdf1eadb3bae7d, NSUnderlyingError=0x600002b294a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
2021-02-07 20:09:09.918775+0100 crashlyticsTest[43062:2323514] 7.4.0 - [Firebase/Crashlytics][I-CLS000000] Unable to remove packaged submission
Fatal error: file crashlyticsTest/ViewController.swift, line 14
2021-02-07 20:09:09.926357+0100 crashlyticsTest[43062:2323253] Fatal error: file crashlyticsTest/ViewController.swift, line 14
(lldb)

Xcode not opening after updating to MacOS Catalina [duplicate]

This question already has answers here:
MobileDevice.pkg untrusted, cannot open Xcode after OS X update
(11 answers)
Closed 3 years ago.
I updated to MacOS Catalina and now my Xcode is not opening. I get this prompt:
Which leads to this error after getting root access:
There is a huge log but the key errors are:
2019-11-04 12:39:48+05 tk_lpt_0141_wifi Xcode[1214]: Package:
PKLeopardPackage
Failed to verify with error: Error Domain=PKInstallErrorDomain
Code=102 "The package “MobileDeviceDevelopment.pkg” is untrusted."
UserInfo={NSLocalizedDescription=The package
“MobileDeviceDevelopment.pkg” is untrusted.,
NSURL=MobileDeviceDevelopment.pkg --
file:///Applications/Xcode.app/Contents/Resources/Packages/,
PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment,
NSUnderlyingError=0x7fe07012cad0 {Error Domain=NSOSStatusErrorDomain
Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5,
PKTrustLevel=PKTrustLevelExpiredCertificate,
NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}} 2019-11-04
13:01:20+05 tk_lpt_0141_wifi Xcode[1306]: Package: PKLeopardPackage
Failed to verify with error: Error Domain=PKInstallErrorDomain
Code=102 "The package “MobileDeviceDevelopment.pkg” is untrusted."
UserInfo={NSLocalizedDescription=The package
“MobileDeviceDevelopment.pkg” is untrusted.,
NSURL=MobileDeviceDevelopment.pkg --
file:///Applications/Xcode.app/Contents/Resources/Packages/,
PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment,
NSUnderlyingError=0x7fd230cb1ae0 {Error Domain=NSOSStatusErrorDomain
Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5,
PKTrustLevel=PKTrustLevelExpiredCertificate,
NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}} 2019-11-04
13:29:51+05 tk_lpt_0141_wifi Xcode[1377]: Package: PKLeopardPackage
Failed to verify with error: Error Domain=PKInstallErrorDomain
Code=102 "The package “MobileDeviceDevelopment.pkg” is untrusted."
UserInfo={NSLocalizedDescription=The package
“MobileDeviceDevelopment.pkg” is untrusted.,
NSURL=MobileDeviceDevelopment.pkg --
file:///Applications/Xcode.app/Contents/Resources/Packages/,
PKInstallPackageIdentifier=com.apple.pkg.MobileDeviceDevelopment,
NSUnderlyingError=0x7f8ab8ba9380 {Error Domain=NSOSStatusErrorDomain
Code=-2147409654 "CSSMERR_TP_CERT_EXPIRED" UserInfo={SecTrustResult=5,
PKTrustLevel=PKTrustLevelExpiredCertificate,
NSLocalizedFailureReason=CSSMERR_TP_CERT_EXPIRED}}}
I have already tried:
xcode-select --install
and
xcode-select --reset
Has anyone else run into this issue? How to fix it?
First, try updating Xcode through the app store
As a last resort, you can change your MacOS Date to
1st October 2019
I set my system time to 1st October 2019, the date when the certificate was still valid. Then, I opened Xcode and followed the component install. This went well, and now Xcode works again.
Edit and set the date of your Mac as 1st October 2019.
What worked for me was updating Xcode in the App Store. After that I was able to install the additional components successfully.

XCode 9.1 CFNetwork Internal Error URLConnectionLoader spam in swift project

I'm looking at the console log of my project and see the following sequence of error messages. They are all the same.
How can I find the source or remove URLConnectionLoader errors from the XCode console log?
2017-12-12 10:10:00.604139+0700 Project[6386:929833] 6386: CFNetwork internal error
(0xc01a:/BuildRoot/Library/Caches/com.apple.xbs/Sources/CFNetwork/CFNetwork-889.9/Loading/URLConnectionLoader.cpp:315)

getting error on ionic emulate?

I am new to Mac and Ionic. Creating my first ionic application is not working for me. Getting this error on ionic emulate ios
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
Error: ENOENT: no such file or directory, stat '/Users/{USER}/Library/Logs/CoreSimulator/AD8136DB-9E63-4298-918D-561520165B83/system.log'

Unable to "apportable load". Give NoneType error

Trying to use apportable for the first time. Keep getting this error:
TypeError: 'NoneType' object is not subscriptable
and also
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
And then the script terminates.
xcode-select --switch /Applications/Xcode.app/Contents/Developer
Background: This can occur if you've updated to Xcode 5. It seems Xcode 5 has a bug that it can generate incorrect output when running xcodebuild.

Resources