0
votes

I am currently using Realm for storing local data and suddenly my app is crashing with the error: could not load any Objective-C class information and this will significantly reduce the quality of type information available.

I tried searching answers and many suggested to delete and re run the app or re run the Xcode but I am still stuck.

App is currently crashing on loading and returns nil for path and bundle Identifier. Below is the line where it hits:

NSString *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];

With Error: Thread 1: Exc_bad_access

Please if someone can help me with this it will be really good. Thank you!

1

1 Answers

0
votes

Based on the error message you've shared about the Objective-C runtime failing to load classes, you may be experiencing the SR-1055 Swift bug, which was recently fixed in Swift.

If you reorder your fields so that a non-empty type is the first declared stored property, it will work around the issue.

This bug & workarounds are further documented in several places: