• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSSharingService and default mail client
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSharingService and default mail client


  • Subject: Re: NSSharingService and default mail client
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 21 May 2013 09:30:43 -0500

[I'd accidentally posted my reply off-list. Bringing it back.]

The times I've autogenerated emails, I did so without thinking of alternate clients. On MacOS, I used -[NSWorkspace openURL:], which can be funky for a long or non-ASCII body, but could be made to work. The system should honor the user's choice for mailto: handlers.

But that may be hard to integrate with NSSharingService. Perhaps you could fall back on mailto: in the didFail… delegate method.

	— F


On 21 May 2013, at 12:52 AM, Martin Hewitson <email@hidden> wrote:

> Hi Fritz,
>
> I did take a look at the delegate callbacks, and -sharingService:didFailToShareItems:error: is called when the default client is anything other than Mail.app, but the error is 'empty' so presenting it to the user doesn't reveal what's wrong.
>
> More importantly, this sharing by email doesn't seem to work for any other app I tried when the default mail client is not Mail.app. Seems strange to me. Do you have experience of sharing my mail working for, say, Thunderbird? With any app at all?
>
> Cheers,
>
> Martin
>
>
>
> On May 20, 2013, at 05:00 PM, Fritz Anderson <email@hidden> wrote:
>
>> On 19 May 2013, at 8:29 AM, Martin Hewitson <email@hidden> wrote:
>>
>>> I'm exploring the use of NSSharingService for emailing (sharing) documents from within my app. It's working fine if the system's default mail client is set to Mail.app. But if it's set to, for example, Thunderbird, nothing happens.
>>>
>>> I also confirmed the same behavior from the Share menu in Pages.app. Works fine for Mail.app, but not for any other mail client I tried. The user is not notified, just nothing happens.
>>>
>>> Is this a bug or a feature?
>>>
>>> I really wish there was a solid way to send a mail from within an app on OS X. With the whole sandbox/applescript debacle, I was hoping that NSSharingService would at least work well on 10.8, but, apart from the 'bug' described above, there seems to be no way to set the recipients or subject of the mail.
>>
>> You've described the user-visble behavior, but not the actual behavior of your code.
>>
>> Have you registered a delegate and examined the content of -sharingService:willShareItems:, -sharingService:didShareItems:, and -sharingService:didFailToShareItems:error:? Do they get called? With the expected items? If didFail…, what was the error?
>>
>> 	— F
>>
>> --
>> Fritz Anderson
>> Xcode 4 Unleashed: 4.5 supplement for free!
>> http://www.informit.com/store/xcode-4-unleashed-9780672333279
>>
>
>
>
>
>

--
Fritz Anderson
Xcode 4 Unleashed: 4.5 supplement for free!
http://www.informit.com/store/xcode-4-unleashed-9780672333279


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSSharingService and default mail client
      • From: Martin Hewitson <email@hidden>
References: 
 >NSSharingService and default mail client (From: Martin Hewitson <email@hidden>)

  • Prev by Date: Re: Running event loop while showing non-standard popup
  • Next by Date: Re: NSSharingService and default mail client
  • Previous by thread: NSSharingService and default mail client
  • Next by thread: Re: NSSharingService and default mail client
  • Index(es):
    • Date
    • Thread