iosswiftstringsegueimessage-extension

How can I pass a large string to an iMessage Extension?


I am creating an iMessage extension that converts an image to ASCII art (~60,000 chars) and sends it as a scrollView. I currently have an if statement that seques to a different view controller if the message was opened within the transcript. I then tried to send the ASCII art string over through the URL, but the string is too long to send over a URL. Is there any way to receive a string in an iMessage bubble without using a URL?


Solution

  • Using CloudKit or Firebase to store the string works. Upload the string to the respective service's public key-value database and then send the key of the entry as a property of the iMessage extension message.