App crashes when I click on side bar menu - ios

Before it worked, when I made the update iOS 13 and updated xCode to 11, I am not able to use the side bar. The application is using the pod SideMenuController and when I click on the icon of side menu to show it, it crashes and shows me this message:
Assertion failure in -[UIApplication _createStatusBarWithRequestedStyle:orientation:hidden:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3899.22.15/UIApplication.m:5311
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'App called -statusBar or -statusBarWindow on UIApplication: this code must be changed as there's no longer a status bar or status bar window. Use the statusBarManager object on the window scene instead.'

I will answer why didn't I show the code, because I didn't made it, the engineer that was before me made it with a pod named SideMenuController. So I'm not familiar with the project or the code inside. I did a lot of research and I fixed it and I wanted to share the solution with you. ( PS: I don't know how it worked ) in the description of the pod, I needed to comment this line:
SideMenuController.preferences.animating.transitionAnimator = FadeAnimator.self
and another line to change from :
SideMenuController.preferences.animating.statusBarBehaviour = .horizontalPan
To this line :
SideMenuController.preferences.animating.statusBarBehaviour = .showUnderlay
And it worked like magic, Thank you guys

Related

Xcode 8.2 simulator showing white screen and giving SIGABRT error

I'm new to app development and I'm learning as I go. I started a new project and set the image background via image view and a png. Before preceding with anything else, I wanted to make sure that at least my background would show in the simulator.
When I run the simulator it shows a white background for a few seconds then Xcode pops up in AppDelegate with a
[4904:767382] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard () doesn't contain a view controller with identifier 'DataViewController''
First throw call stack:
`
Can anyone explain what the problem maybe?
Try to add the Storybaord ID ( DataViewController ) to your view controller in storybaord
a line like this may cause the crash
let vc = self.storyboard?.instantiateViewController(withIdentifier:"DataViewController")
self.navigationController?.pushViewController(vc!, animated: true)

'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN' exception

My app throws the following exception error after I press a UIButton which changes from a 'play' image to a 'pause' image. It doesn't always happen immediately, sometimes it happens when I pop to my root viewcontroller.
Note: It only happens in iOS 9.x, while in iOS 10.x works perfectly
After hours of experimenting and searching, I discovered that the error was produced, because I was using vector pdf images in my project for that specific UIButton. As soon as I replaced them with their equivalent png files, the exception stopped occurring.
(Note: if someone finds out why this happens please post it)

iOS App crashes after migrating to swift3 during navigation

I have migrated my project to Swift3 and after conversion the app crashes whenever I click on any button which loads a new screen. The crash happens in the assembly code so am not able to figure out what's the issue. Control leaves the existing class then goes to assembly language and then crash just before loading the new screen.
This is the error message am getting
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_SwiftValue pointSize]: unrecognized selector sent to instance 0x61000005fb00'
Crash is not happening in any specific code so its difficult identify the error. Please help me to figure this out.
You maybe have a outlet from your storyboard (label, textfield, uiButton...) that is not map anymore in your controller. You should check each component to see if you didn't delete the reference in the controller and no in the storyboard...

Assertion failure with segues

I copied my project and renamed it - I've managed this before without too much incident.
This time I am getting the following error on any segue performed.
*** Assertion failure in -[UIStoryboardSegueTemplate segueWithDestinationViewController:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UIStoryboardSegueTemplate.m:90
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not create a segue of class '(null)''
I've cleaned the project, removed all DerivedData. All segues are correctly named and show on the storyboard. It seems to have nothing to do with main UI threads etc. The segue code worked fine before the conversion.
I'm thinking the solution might be to remove and re-establish every segue but would like to check before I start investigating that.
Thanks.
Try to open the storyboard as 'source code' and search for old project name.
Find this segue in Storyboard,
In Attributes Inspector select your new module (or check Inherit Module From Target)
This fixed it for me..
If you have just renamed your project, check in your Storyboard... Each of your Segues are probably still using the old Module. Click the little drop down and select the new Module...
You can view the module by clicking on the segue and looking at the info in the right panel, just like you would with a button, label etc.

Trying to create UIVibrancyEffect by calling +notificationCenterVibrancyEffect but an error is caused

I am trying to create the same effect that is in the Notification Centre using the following line but I keep getting an error:
UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:[UIVibrancyEffect notificationCenterVibrancyEffect]];
The Error:
2014-12-02 16:30:35.597 Trial[11543:1628621] +[UIVibrancyEffect notificationCenterVibrancyEffect]: unrecognized selector sent to class 0x10569ebe0
2014-12-02 16:30:35.602 Trial[11543:1628621] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[UIVibrancyEffect notificationCenterVibrancyEffect]: unrecognized selector sent to class 0x10569ebe0'
I have imported Notification Center Header Files, but nothing seems to solve this problem at run time:
#import <NotificationCenter/NotificationCenter.h>
Make sure you linked the NotificationCenter framework under Build Phases. To add the framework click on your project until you see the screen where you set the iOS deployment target. Once you see that screen click on the first option under targets, and you should see a screen with your app's identifier. From there click on "Build Phases" and you should see a pop down view called "Link Binary With Libraries". One you click on the pop down view, click the "+" where a search bar will popup and enter NotificationCenter. You should see the framework as an option and click on the framework so it can be added.

Resources