Questions tagged [nsexception]

NSException is a Mac Developer Library class used to implement exception handling and contains information about an exception.

NSException is a Mac Developer Library class used to implement exception handling and contains information about an exception.

It is available in OS X v10.0 and later and is declared in NSException.h

259 questions
2
votes
1 answer

NSJSONSerialization error when encoding encodable struct in Swift 5, iOS 14: Invalid top-level type in JSON write

I have created a simple struct: struct CodePair: Codable { var userId: Int var code: String } I try to encode the struct into JSON using the code below: let id = 5 let code = "ABCDEF" let codePair = CodePair(userId: id, code: code) let…
2
votes
1 answer

Using NSSetUncaughtExceptionHandler in swift 4

I'm trying to use a global error handling in my project as follow: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { NSSetUncaughtExceptionHandler {…
Niloufar
  • 512
  • 1
  • 5
  • 24
2
votes
3 answers

Swift Firebase Notifications "libc++abi.dylib: terminating with uncaught exception of type NSException"

I am trying to add Firebase Notifications to my app. I am getting a error before my app even starts. Also, whats the difference between calling notifications from my app vs Firebase? Is it not possible to call notifications from my app which is why…
Lukas Bimba
  • 817
  • 14
  • 35
2
votes
1 answer

App crashing when instantiating ViewController from different storyboard

I'm writing in Swift 3 (latest Xcode) I'm controlling, if the user is logged in (async tasks checking parameters between device and database). If the response says, that the device is invalid, I'm showing the login screen. Looks like this: extension…
2
votes
2 answers

UITableViewDataSource causing libc++abi.dylib: terminating with uncaught exception of type NSException

I have a ViewController containing a UITableView: import UIKit import GoogleMaps class RestaurantMapViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet weak var mapView: GMSMapView! @IBOutlet weak var…
Saad Qureshi
  • 728
  • 2
  • 7
  • 21
2
votes
1 answer

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_.AppDelegate add:]: unrecognized selector

I created a storyboard called Main.storyboard and created a AddBtnViewController with storyboard ID "addBtnVC". In the App Delegate, I initialized a tab bar with three view controllers programmatically. For one of tab bar view controllers, I created…
Amanda
  • 153
  • 2
  • 2
  • 14
2
votes
2 answers

does iphone os framework throw NSException itself?

I know i can throw an NSException in my own code,does iphone os framework throw NSException itself? if it does,means that i should catch the NSExceptions from framework? I know Java throws Exceptions inner SDK,such as unchecked exceptions.
bigjava
  • 145
  • 2
  • 10
2
votes
1 answer

CoreData Error SIGABRT: keypath AttributeName not found in entity

I use core data in my iOS App. I have two entities, "Commit", with attributes "commitID", "completionStatus", "contents" and "repeatStatus" as well as an entity "ToDoList" with the attribute "dateID". The two are connected via a relationship that…
Jonas
  • 1,473
  • 2
  • 13
  • 28
2
votes
1 answer

Xcode Moving code to a new project

When renaming a project the project became corrupted and i could not recover it. when opening the workspace no files are visible only the .xcworkspace file in red and the pods project file in red. the swift files remained so i copied them to a new…
Lonergan6275
  • 1,938
  • 6
  • 32
  • 63
2
votes
1 answer

attempt to insert nil object from objects[1]

In my project, when I scroll too quickly, I get an error saying: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from…
jape
  • 2,861
  • 2
  • 26
  • 58
2
votes
1 answer

Adding child progress for multiple file download

I'm downloading multiple files using AFNetworking 3.0 in my project. I want to show single download progress of all files. I added each child progress of each file download to the parent progress. But it's not working, app crashed. I'm getting the…
Nuibb
  • 1,800
  • 2
  • 22
  • 36
2
votes
1 answer

CoreData: NSManagedObject does not respond to user defined message

Using CoreData (on an iPhone app) I generated my entity classes from the model and I added some more methods to some ones. It appears that sometimes I get an exception for calling one of those methods. The exception is not random but concerns only…
rano
  • 5,616
  • 4
  • 40
  • 66
2
votes
0 answers

iOS : App crashes with uncaught exception of type NSException (Auto-layout)

I'm working on an app which is almost complete. On one of the view controller (Detail view controller whose views are hide/show based on web service response) a random crash occur and I am unable to find the reason for this crash. You can find…
Muhammad Umair
  • 1,664
  • 2
  • 20
  • 28
2
votes
1 answer

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM itemName]: unrecognized selector sent to instance

This is my code for loading data from sqlite file - (void) loadInitialData{ // Form the query. NSString *query = @"select * from tasklist"; // Get the results. if (self.toDoItems != nil) { self.toDoItems = nil; } …
John Doe
  • 63
  • 1
  • 1
  • 6
2
votes
1 answer

Invalid update: invalid number of rows in section 0

i have problem when i try delete or add object a the list errror: 2014-09-04 10:59:03.815 DeleteListTest[2781:60b] *** Assertion failure in -[UITableView _endCellAnimationsWithContext:],…
Luca Briganti
  • 101
  • 2
  • 4
  • 12