I am trying to print a simple NSString value. But It gives me a dialog saying:
"Printing Now Allowed
This application is not allowed to print.
Please contact your application vendor for an update."
The code I use is:
-(void)printText:(NSString*)text
{
NSTextView *printView = [[NSTextView alloc] initWithFrame:NSMakeRect(0, 0, 468, 648)];
[printView setString:text];
[[NSPrintOperation printOperationWithView:printView] runOperation];
}
Any ideas?
Go to Capabilities and to app Sandbox and then find under Hardware the checkmark for "PRINTING"
Found the answer!
I needed to check "Allow printing" under Entitlements under Summary under my target in project settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With