Hi
Since i added Siri Shortcuts, my app doesn't work as expected, i found why :
I have NSDate+Tools with different methods like
- (NSDate*) startOfDay
I found that INVoiceShortcutCenter add/rewrite many methods
Example : NSDate responds differently to selector "startOfDay" before / after using sharedCenter
NSLog( @"NSDate startOfDay : %d" , [[NSDate date] respondsToSelector:NSSelectorFromString(@"startOfDay")] );
INVoiceShortcutCenter* center = [INVoiceShortcutCenter sharedCenter];
if( center )
{
NSLog( @"NSDate startOfDay : %d" , [[NSDate date] respondsToSelector:NSSelectorFromString(@"startOfDay")] );
....
It display :
NSDate startOfDay : 0
NSDate startOfDay : 1
You can find all methods added with
NSLog( @"%@", [[NSDate date] performSelector:@selector(_methodDescription)] );
Many methods are added and can overwrite yours if they have the same signature
What I do not understand is that it only happens on a real device and not in the simulator.
Thanks for any information