I would like a simple way for users of my app to send content to each other. This content will be a single recipe, with a name, list of ingredients, and some instructions. Maybe one day it will include some images.
I am drawn to the simplicity of using a custom URL scheme to achieve this, and relying on emails for communication. My app would be able to compose the email, and embed a link using this url scheme. The person receiving the recipe, would click this link in the email and it would open my app (if installed). The link would include the details of the recipe to be added.
I am not sure how best to construct the URL so that it contains the details of the recipe. Whichever convention I employ to identify the recipe name vs ingredients vs instructions, is likely to be flakey. For example, if I decide to construct something like:
`myApp://name=salsa&ing=tomatoes&ing=garlic...
if a user has created a recipe using '&' in an ingredient name, I will parse the url incorrectly.
How might I avoid this? Is there someway to package the contents first, or maybe include a checksum at least (so the receiving app can abandon anything that doesn't look right). And if not, is there a best practice for constructing a URL to contain data like this?