NSUnknownKeyException? statusBarManager - swift

I'm getting this error whenever I run my app and then the app crashes.
Thread 1: "[<UIApplication 0x161704080> valueForUndefinedKey:]: this class is not key value coding-compliant for the key statusBarManager."
I've tried googling this and it seems people have had the problem before, but either I don't understand the solution whatsoever, or the solution they present doesn't work for me. Any ideas?
Also here are the files for the project in google drive https://drive.google.com/drive/folders/1TzQgwC_CgEC_wertNmyF0ZrL_vKFgILS?usp=sharing

Related

Cannot find type 'INUIAddVoiceShortcutViewControllerDelegate' in scope

I have recently begun designing an app extension. I mention that because all of a sudden my Siri Setup View Controller within my main app has been throwing me a "Cannot Find type 'INUIAddVoiceShortcutViewControllerDelegate' in scope" error as well as "Cannot find type 'INUIAddVoiceShortcutViewController' in scope."
I have been trying to figure this one out for a while. I am unsure what to do or even where to begin.
Any ideas?
(Yes I have tried cleaning the build folder and deleting derived data)
Forgot IntentsUI import. Dumb mistake. Will leave it up just in case anyone else wondering...

NSInvalidUnarchiveOperationException?

The current app I have been working on has been running fine with no issues and suddenly, what seems like out of the blue as I hadn't made any changes, crashes at launch with an NSInvalidUnarchiveOperationException.
I made zero code changes and the only thing I did was to run the app on my Mac to see how it would look on MacOS. I then ran it again on my iPhone and that's when the problem started to occur. I use CoreData and CloudKit so decided to delete all data to see if that would solve the issue (not thinking it would based on the console log) and it still crashes.
The console states the following:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (NSFontDescriptor) for key (UIFontDescriptor) because no class named "NSFontDescriptor" was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target). If the class was renamed, use setClassName:forClass: to add a class translation mapping to NSKeyedUnarchiver'
The thing is, although I use attributed strings I clearly haven't created a class named NSFontDescriptor. NSFontDescriptor is part of the SDK so I have no idea what's going on and how to fix this issue.
Any help would be much appreciated.

Google Maps API v2 used to work on Android, now getMyLocation returns always null

I believe I did everything correct because my app used to work before. Then suddenly stop working. I am not able to get current location from Google Map object, it returns always null.
I checked if my api key works on api console, request can be seen so I think it works
I tried uninstalling app, then installing again, it did not help
I tried to create a new key but this did not help neither.
I didn't post my code because I think it is correct, otherwise it wouldn't work at the beginning.​
Logcat-Errors
09-05 19:28:30.222: E/dalvikvm(5179): Could not find class 'gpq', referenced from method gpr.a
09-05 19:28:30.222: E/dalvikvm(5179): Could not find class 'gpq', referenced from method gpr.a
09-05 19:28:30.222: E/dalvikvm(5179): Could not find class 'gpq', referenced from method gpr.a
09-05 19:28:30.342: E/dalvikvm(5179): Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method gls.a
Logcat: http://pastebin.com/RPJLr6F2
EDIT: I found out that cause of the problem is my device (nexus 5,Kitkat 4.4.4), it worked properly on another device(Jelly Bean 4.1)
Looking at your logcat it is clear that your app is using a lot of memory. getMyLocation() is depreciated so use LocationClient instead.
From the documentation of getMyLocation():
Returns the currently displayed user location, or null if there is no location data available.
Null is valid data returned by getMyLocation so you will need to handle it. Just check if the value returned is null.

App crashing, help needed understanding the error [duplicate]

This question already has answers here:
Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?
(79 answers)
Closed 7 years ago.
After changing "something, i can't trace back", my app is crashing with the following error:
2011-10-29 15:31:50.842 UnblockMe[6900:f803] *** Terminating app due to uncaught exception
'NSUnknownKeyException', reason: '[<UIApplication 0x6e551b0> setValue:forUndefinedKey:]:
this class is not key value coding-compliant for the key goBackButton.'
Only 1 class references the "goBackButton". I rebuilt the relationships to and from this button since (Yet the problem persists)
Other then this, project contains no errors or warnings. "Clean" did not seem to help. Removing app and reinstalling it on the simulator produced no results.
The strange thing about that error is it's supposed to tell you what the affected object is. See this link where somebody has a similar problem. What that makes me think is you have an overreleased object. That results in a pointer to nonsense memory. When you try to send a selector to it, strange things can happen.
The error means that something is not properly connected in IB!
Check your xib connections, you could have renamed an outlet and you forgot to change the connections!

Error compiling for unit test using google toolbox for mac

Hi my application runs fine but when I try to run the unit tests I am getting this error...
2010-10-19 00:27:49.919 AssignmentUnitTest[27988:903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
'*** -[NSURL initFileURLWithPath:]: nil string parameter'
Irony is I have searched the whole project & I dont have any similar line of code that uses **[NSURL initFileURLWithPath:]**
I have pretty much wasted half of my day on it without any success.
I am using coredata in the project & below is the screen shot with stack trace.
Can anyone please guide me to the right direction.
Thanks
**EDIt : ** The solution to this problem is to add not only the .xcdatamodel file but the root file .xcdatamodeld. Core Data was having trouble finding my model so was displaying this error. Hope it helps somebody someday.
Read the call stack in your screenshot. It says your managedObjectModel method sent [NSURL fileURLWithPath:], and that called initFileURLWithPath:. So, find the point where you sent [NSURL fileURLWithPath:] and fix your argument to that message.
The argument you passed being invalid suggests that either you passed nil for the path (perhaps you tried to find the file in your bundle but it isn't there or has a different name than you looked for), or you passed a pointer to an object that isn't a string (perhaps you had a string but under-retained it and a different object was created in its place).
There is a bug in some version(s) of the SDK that broke exception handling in the simulator.
Can you run the tests on a device?