error solved

How to solve terminating with uncaught exception of type nsexception


In this article, you will learn few ways to solve terminating with uncaught exception of type nsexception error in Swift.

One of the common causes of this error is IOS pasting the file into the directory that doesn’t automatically add to the iOS project.

To fix this issue you need to manually add it In the Xcode by following the steps below:

  1. Right-click on your project
  2. Click “Add files to ‘project name'”
  3. Select the .plist file
  4. Click ok

If the above method doesn’t fix your issue you can try the following Printing the exception stack to know the reason for the exception to do so follow the steps below:

  1. Go to show breakpoint navigator.
  2. Add (+) Add Exception Breakpoint.
  3. Select the new breakpoint, Control-Click, Edit Breakpoint.
  4. Add Action and Enter: po $arg1

You can also try Other steps to fix this issue:

  • Enable OS_ACTIVITY_MODE in the schemes if you have disabled it.
  • If you have renamed any action You need to delete the old name.
  • you can try turning off OS_ACTIVITY_MODE variable 

Share on social media

//