AppAuth
Macros
OIDDefines.h File Reference

AppAuth iOS SDK. More...

Go to the source code of this file.

Macros

#define OIDIsEqualIncludingNil(x, y)   (((x) == (y)) || [(x) isEqual:(y)])
 Returns YES if x and y are equal by reference or value. @discussion NOTE: parameters may be evaluated multiple times. Be careful if using this check with expressions - especially if the expressions have side effects. More...
 
#define OID_UNAVAILABLE_USE_INITIALIZER(designatedInitializer)
 Provides a template implementation for init-family methods which have been marked as NS_UNAVILABLE. Stops the compiler from giving a warning when it's the super class' designated initializer, and gives callers useful feedback telling them what the new designated initializer is. More...
 

Detailed Description

AppAuth iOS SDK.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Macro Definition Documentation

◆ OID_UNAVAILABLE_USE_INITIALIZER

#define OID_UNAVAILABLE_USE_INITIALIZER (   designatedInitializer)
Value:
{ \
NSString *reason = [NSString stringWithFormat:@"Called: %@\nDesignated Initializer:%@", \
NSStringFromSelector(_cmd), \
NSStringFromSelector(designatedInitializer)]; \
@throw [NSException exceptionWithName:@"Attempt to call unavailable initializer." \
reason:reason \
userInfo:nil]; \
}

Provides a template implementation for init-family methods which have been marked as NS_UNAVILABLE. Stops the compiler from giving a warning when it's the super class' designated initializer, and gives callers useful feedback telling them what the new designated initializer is.

Remarks
Takes a SEL as a parameter instead of a string so that we get compiler warnings if the designated intializer's signature changes.
Parameters
designatedInitializerA SEL referencing the designated initializer.

◆ OIDIsEqualIncludingNil

#define OIDIsEqualIncludingNil (   x,
 
)    (((x) == (y)) || [(x) isEqual:(y)])

Returns YES if x and y are equal by reference or value. @discussion NOTE: parameters may be evaluated multiple times. Be careful if using this check with expressions - especially if the expressions have side effects.

Parameters
xAn object.
yAn object.