nsexception

libc++abi.dylib: terminating with uncaught exception of type NSException running emulator for Ionic 4 app

孤人 提交于 2020-04-30 08:47:29
问题 I have an Ionic 4 app that was working fine until I installed cordova firebase analytics plugin. After uninstalling that plugin I had to remove the ios and android platform then re-add. The project build successfully inside of Visual Studio Code. I then attempt to run the emulator in xCode and I get the following error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance

libc++abi.dylib: terminating with uncaught exception of type NSException running emulator for Ionic 4 app

北城余情 提交于 2020-04-30 08:46:20
问题 I have an Ionic 4 app that was working fine until I installed cordova firebase analytics plugin. After uninstalling that plugin I had to remove the ios and android platform then re-add. The project build successfully inside of Visual Studio Code. I then attempt to run the emulator in xCode and I get the following error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryM cordovaSettingForKey:]: unrecognized selector sent to instance

Exception handling in entire application

大兔子大兔子 提交于 2020-01-23 02:33:09
问题 I have a few doubts regarding exception handling in iPhone. Here are they: Suppose I have a chain of methods which are being called one after the other, that is, method A calls method B, which in turn calls method C, which calls method D. Which is the best place to put my try-catch block (is it method A or B or C or D or all of them). Also, I need to display an alert to user that an exception has occured and then, I want to log this exception to my server. So, if I am writing my try - catch

Cannot AddObject to NSMutableArray from Block

拈花ヽ惹草 提交于 2020-01-22 01:59:05
问题 I have a feeling that my problem here is really with blocking, but maybe it's something else too. I am trying to forward geocode an address and place the coordinates into an array to use later. An exception is raised down at the bottom when I try to call on one of the objects I tried added to the array in the block. The exception also gets raised before any of the NSLogs ever print out within the block text. What's the proper way to handle this? Thanks. - (NSMutableArray *

Objective-c Try/Catch not catching

浪子不回头ぞ 提交于 2020-01-16 04:56:05
问题 Is there a reason why the following wouldn't work? @try { CFGetTypeID( NULL ); } @catch (NSException * e) { NSLog(@"Exception: %@", e); } @finally { NSLog(@"finally"); } Similar to the try/catch question, only it seems the above block crashes everytime. I know my debugger is setup correctly, as I setup a try/catch above from the other question: // Test working try catch NSString* test = [NSString stringWithString:@"ss"]; @try { [test characterAtIndex:6]; } @catch (NSException * e) { NSLog(@

Is it a good practice to subclass from NSException for app-specific exceptions?

为君一笑 提交于 2020-01-11 07:09:23
问题 Is it a good practice to subclass from NSException for app-specific exceptions? That way everything is centralized one class for easier management. e.g. @interface AppException : NSException + (AppException *)InvalidSomething; + (AppException *)InvalidSomething2; @end 回答1: No, it's not good to subclass NSException because it's a class that doesn't need to be any more specific than it already is. In addition, subclasses, as is noted in the documentation, may not receive proper call stack

Is it a good practice to subclass from NSException for app-specific exceptions?

只愿长相守 提交于 2020-01-11 07:09:10
问题 Is it a good practice to subclass from NSException for app-specific exceptions? That way everything is centralized one class for easier management. e.g. @interface AppException : NSException + (AppException *)InvalidSomething; + (AppException *)InvalidSomething2; @end 回答1: No, it's not good to subclass NSException because it's a class that doesn't need to be any more specific than it already is. In addition, subclasses, as is noted in the documentation, may not receive proper call stack

UIWebView throwing NSUnknownKeyException iPad

萝らか妹 提交于 2020-01-06 22:43:07
问题 I have a tab bar application. Everything works normally, and I can switch between tabs fine and everything, except when I switch to my second tab ProductViewClass the view doesn't update and it spits out the console output below. I have nothing in this view except for a UIWebView and a UILabel. When I delete the UIWebView it runs successfully, and when I add another it still works. It only stops working when I connect the IBOutlet from my File's Owner to the UIWebView. Besides synthesizing

How to present view controller properly?

丶灬走出姿态 提交于 2020-01-06 02:16:05
问题 I have a pretty simple application with a couple of UIViewControllers (say VC_A and VC_B ). Every screen has a button that allows to switch to another screen (no UINavigation is used). App schedules a local notification, which, when expired, should present another view controller ( VC_N - no matter what screen is active at the moment). The problem is that sometimes application throws: 'NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from <VC_A: 0x2021e0> to

Alamofire sending a request to an API 'NSInvalidArgumentException'

*爱你&永不变心* 提交于 2019-12-24 21:33:33
问题 i am using this code to send an image and text to an api: func uploadImageAndData(_ url:String,parameters1:Parameters,headers1:HTTPHeaders,images:[UIImage]){ Alamofire.upload(multipartFormData: { multipartFormData in // import image to request var i=0 for imageData in images { // multipartFormData.append(self.resizeImage(image: uploadedProfileImage, targetSize: CGSize(width: 200, height: 200) multipartFormData.append(imageData.pngData()!, withName: "profilePic", fileName: "profileimage"+"