accessing signature content from apple iOS email

I am trying to access the signature content that is set up in the apple iOS email. I tried with below code using private API


NSBundle *b = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/Message.framework"];

BOOL success = [b load];

Class FTDeviceSupport = NSClassFromString(@"MFSignatures");

id si = [FTDeviceSupport valueForKey:@"sharedInstance"];

NSString *emailID = @"scentest@icloud.com";

NSLog(@" %@", [si performSelector:@selector(signatureForSendingEmailAddress:) withObject:emailID]);

NSLog(@"-- %@", [si valueForKey:@"signature"]);



it is throwing error as "accessing preferences outside an application's container requires user-preference-read or file-read-data sandbox access, detaching from cfprefsd"



Is it possible to get the signature content setup in Apple Mail app?



Replies

No, there is no API for doing this. You can certainly file a bug report requesting that this be exposed via an API. But today this is not possible.