The assertion evaluates a condition that, if the condition is false, invokes the breakpoint handle of the current thread. Each thread has its own breakpoint handle, which is an object of the Nsasserttionhandler class. When invoked, an assertion handle prints an error message that contains the method name, class name, or function name. Then, it throws a Nsinternalinconsistencyexception exception.
assertions evaluate a condition and, if the condition evaluates to False, call the assertion handler for the current Threa D, passing it a format string and a variable number of arguments. Each of the thread has its own assertion handler, which are an object of Classnsassertionhandler. When invoked, an assertion handler prints a error message that includes method and class names (or the function name). It then raises annsinternalinconsistencyexception exception.
This macro is used to confirm the validity of a objective-c method. Simply provide the parameters as a condition on the line. The macro evaluates this parameter and, if False, prints an error log message that contains the parameter and throws an exception.
This macro validates a parameter for an objective-c method. Simply provide the parameter as the condition argument. The macro evaluates the parameter and, if it is false, it logs a error message that includes the parameter and then raise s an exception.
If you define a preprocessing macro, the Ns_block_assertions assertion is forbidden. All the breakpoint macros return void.
Assertions is disabled if the preprocessor macro ns_block_assertions is defined. All assertion macros return void.
An official explanation of what IOS Nsparameterassert is doing