I want to send a small message from my iOS app to my server.
However, I want to have a high degree of assurance that the data was in fact: (1) generated on the device, and (2) by my app.
Is there way to achieve this? I care more about (1) than (2).
Roku has had such a feature for a long time: http://sdkdocs.roku.com/display/sdkdoc/Channel+Packaging+And+Publishing#ChannelPackagingAndPublishing-37ContentSecurityModel
Each Roku box has a unique client certificate that is signed by Roku as the Certificate Authority. The firmware also supports a special header, x-roku-reserved-dev-id, that always sends the developer id of the currently running application. Since this is authoritative and can't be forged, the developer's web server can only accept connections from a Roku Streaming Player running their application. Likewise, the Roku Streaming Player can enforce that it is talking to the developer's web server by including the CA certificate of the authority that issued their web server certificate in their channel application.