-
-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShareItems - sharing files #187
Comments
For my reference, and for anyone else interested in how this may be approached: |
Having said that, can you indicate the reasons for wanting support for this? This is just to clarify the requirement |
I am trying to send files via share sheet on Mac with OS Ventura 13.3. The ShareItems demo seems to work with texts and images, but not with files. An empty share sheet appears when I try to share file. I think the problem is in unit DW.ShareItems.Mac in procedure Share in line LActivityItems.addObject(TNSFileWrapper.Alloc.initWithURL(LURL, 0)); |
OK, thanks.. I'll look into it |
Thank you ... also, it would be great to be be able to use share sheet in Microsoft Windows as well. |
Regarding Windows, please see this. If you know of a close equivalent, please let me know |
It seems to me that Windows.ApplicationModel.DataTransfer could do the similar thing on MS Windows, i.e. access share sheet panel. It initiates the user interface for sharing content with another app programmatically. Where IDataTransferManagerInterop is alternative for desktop applications and static class DataTransferManager is for UWP apps |
I think the problem on macOS may be that TNSFileWrapper is not needed, i.e. the line instead of
should be:
I'll test later this evening, but you might also like to try |
I have just found out that this works for me: LActivityItems.addObject(TNSitemProvider.Alloc.initWithContentsOfURL(LURL)); the share sheet appers correctly |
Thanks.. I'll incorporate the change |
If possible, I would also suggest to replace line FPicker.showRelativeToRect(MakeNSRect(0,,0,0,0), LView, CGRectMinYEdge); // <----- Might need to adjust the values in MakeNSRect with this code mR.TopLeft:=aControl.LocalToAbsolute(pointf(0,0)); where mR is TRectF to position the share sheet below the aControl |
Closing as the requirements have been met, other than the request for Windows support, which is now in this issue. |
need NSPreviewRepresentingActivityItem and NSPreviewRepresentableActivityItem for sharing files on MacOS Venture 13.3 with NSSharingServicePicker
The text was updated successfully, but these errors were encountered: