I did a similar thing, but for Chrome. You will need 3 components:
- Browser extension
- Server Side Handlers
- iOS app
First you need to create an extension for Safari and, possibly, add a new option to the context menu or in any other accessible way to make it available to the user. Then, when the user selects your custom action, you send the data to your server. The server can then send a notification to your iOS application, and when the user opens the application, he can download recently copied messages.
Of course, when performing all these actions, you should think about creating a user database, authenticate users correctly and protect data transfer.
source share