I have an object which is forwarding receiving messages. It does not implement forwarding them to other objects using forwardInvocation. However, methodSignatureForSelector will not always return a valid method signature at certain times because of the way the program is organized. How can I swallow the exception generated from the missing method signature? Overriding doesNotRecognizeSelector does not work. Thanks.
Swallow doesnotrecognizeselector exception from an NSInvocation forwardInvocation call
567 Views Asked by user26691 At
1
There are 1 best solutions below
Related Questions in OBJECTIVE-C
- How to control the volume of an iPhone programmatically in objective-c
- Occasional crash at NSURLSessionDataTask dataTaskWithRequest:completionHandler:
- How to set value the descriptor of iOS BLE in Objective-C?
- Unexpected #selector() Behavior in Swift-Objective-C Interop?
- In what context can we use an unqualified #selector() expression in Swift?
- AVPictureInPictureController crashes during initialization
- How to use pow() in Objective-C?
- How to change the image on the MGSwipeButton in MGSwipeTableCell
- Using sort descriptors in Outline View
- Why is my Swift function not printing from inside the dataTask closure?
- Using UICollectionViewCell with IBOutlet
- Undefined symbol: _OBJC_CLASS_$_ only on simulator
- Why can't I receive a notification sent from Camera Extension(Swift) to an observer application (obj-c++)
- Behavior of __block modifier in objc
- Inserting subview into view where I've added subviews and sublayers
Related Questions in OBJECTIVE-C-RUNTIME
- Swift 2.0 replicate OBJC_ASSOCIATION_RETAIN
- How to detect if a property is an IBOutlet programmatically at runtime?
- Too many arguments to function call, expected 0 method_invoke
- Is it possible to introspect the array's type in Objective-C Generics -- Xcode 7+
- Crash when processing __NSAtom class object
- Can't subclass DispatchGroup - "only visible via the Objective-C runtime"?
- Unity Project Convert in iOS
- How to decipher "objc_method_description" from protocol method description list?
- How can I force a protocol to be linked in a library when no class in the library adopts it?
- Objective-c runtime - get property list of NSObject protocol returning nil
- Condition of using objc_setAssociated and objc_getAssociated
- Objective-C Method invocation & Messaging clarification
- Automatically running a selector on instance creation
- Swizzling NSBundle for reskinnable demo
- Why the objc runtime function `class_addMethod()` adds the implementation as instance and class method when the target class is `NSObject`?
Related Questions in NSINVOCATION
- How to get performSelector to work with NSInvocation?
- NSInvocation: unrecognized selector though it is set
- NSInvocation; variable is not a CFString
- Make NSInvocation invoke a specific IMP
- How to pass an argument to a method called in a NSTimer
- NSInvocation needing NSMethodSignature
- NSInvocation and ARC (Automatic Reference Counting)
- getArgument of NSInvocation of current method always returns null
- NSInvocation pass C-arrays to Objective-C method
- NSTimer + NSInvocation causing crash on iOS 7
- NSInvocation invoke giving bad access in iOS 8
- objc variadic arguments with primary type and objects
- Why creating NSInvocation has to specify selector twice
- iOS - Cannot use 'super' as a reference?
- Accessing forwardInvocation'd methods with ARC?
Related Questions in MESSAGE-FORWARDING
- Forwarding messages coming from Kafka Topic
- Message Forwarding is not working (Objective-C)
- Get the true responder to an ObjC method when it is being forwarded
- I have a class I want some method transfer to an array's object
- Maintain order of messages while forwarding messages between two ActiveMQ brokers
- iOS Message Forwarding methodSignatureForSelector
- Get object array argument from NSInvocation with ARC
- iOS message forwarding - negotiate a CLASS method and forward
- Defining a class that uses different classes depending on the platform
- Message forwarding chain
- How to forward an HttpRequestMessage to another server
- RabbitMQ Shovel basic example
- How does Objective-C messaging work? Where is `super`? How to make sure a class has an implementation from its super before method swizzling?
- ARC and Message Forwarding
- Swallow doesnotrecognizeselector exception from an NSInvocation forwardInvocation call
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You must generate some signature (even if a dummy one, e.g.
v@:, a signature of a method that returnsvoidand takes no arguments) and then remember to do nothing when it gets toforwardInvocation:.