sooon sooon - 1 year ago 86
iOS Question

iMessage game - send hidden value

I follow this tutorial to learn iMessage app.
Everything seems ok.

However, I want to develop a game like

kind of game.
That means I need to send in the value which is hidden from the other player.

How can I do that?

Answer Source

You could put the hidden parameters as part of the URL, like

message.url = URL(string: "")!

Note that the URL cannot be more than 5000 characters long (i.e. at most about 3.5 KiB of data after base-64.)

You may want to checkout the tutorial on

To prevent cheaters from easily modifying the URL parameters, you might want to encrypt and/or sign the URL parameters.