Hi!
I have created a service on a cocoa application, though this is my first cocoa app, I do have experience with iOS.
After testing it I was let known that this application does not work when selecting text from Apple Mail.
It will give an error: Report bug to Mantis (nl.uncinc.Mantis-bugreporter) is disqualified because its send and/or return types cannot be handled by the requestor (null).
Output of /System/Library/CoreServices/pbs -dump_pboard is the following:
{
NSBundleIdentifier = "nl.uncinc.Mantis-bugreporter";
NSBundlePath = "/Users/techwolf12/Library/Developer/Xcode/DerivedData/Mantis_bugreporter-csymyhiyhrzpkoaahasfxwenzzoa/Build/Products/Debug/Mantis bugreporter.app";
NSKeyEquivalent = {
default = B;
};
NSMenuItem = {
default = "Report bug to Mantis";
};
NSMessage = menuReportBug;
NSPortName = "Mantis bugreporter";
NSRequiredContext = {
};
NSRestricted = 0;
NSReturnTypes = (
NSStringPboardType
);
NSSendTypes = (
NSStringPboardType,
NSRTFPboardType,
"public.plain-text"
);I think the issue is with the fact I had a return type in the past. However, /System/Library/CoreServices/pbs -flush, clean builds etc. do not work.
I also tried rm -rf /Users/techwolf12/Library/Developer/Xcode/DerivedData/* and a reboot of my machine already.
The part of my Info.plist is like this:
<key>NSServices</key>
<array>
<dict>
<key>NSMessage</key>
<string>menuReportBug</string>
<key>NSKeyEquivalent</key>
<dict>
<key>default</key>
<string>B</string>
</dict>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>Report bug to Mantis</string>
</dict>
<key>NSPortName</key>
<string>Mantis bugreporter</string>
<key>NSRequiredContext</key>
<dict/>
<key>NSRestricted</key>
<false/>
<key>NSSendTypes</key>
<array>
<string>NSURLPboardType</string>
<string>NSFilenamesPboardType</string>
<string>NSStringPboardType</string>
<string>NSRTFPboardType</string>
<string>NSRTFDPboardType</string>
</array>
<key>NSReturnTypes</key>
<array/>
<key>NSTimeout</key>
<string>600000</string>
</dict>
</array>And in my AppDelegate.m
- (void)applicationDidFinishLaunching:(NSNotification*)aNotification {
ServiceHandler* handler;
handler = [[ServiceHandler alloc] init];
[NSApp setServicesProvider:handler];
NSUpdateDynamicServices();
}If someone would be able to help me, it will be very much appreciated!
Thanks!