Search code examples
ios6passbook

How to display image on lock screen for the pass


On lock screen, I can show text. What about image ? How to show it ? I try "relevantText": "CamMob\uD83D\uDE1C\uD83D\uDE4B", but only text displays!


Solution

  • You cannot display regular images, but you can encode emoji characters into any of the pass fields and Passbook will display them.

    To include emoji, you need to find the utf-8 representation of the character(s) that you want.

    You can get this by right clicking the character in the character viewer and copying the Character info.

    Character Viewer Character Viewer Emoji

    Another quick and easy way would be with a PHP file containing the following:

    <?php
    echo json_encode(array("relevantText" => "πŸ˜ƒπŸ˜œπŸ˜πŸ’€πŸ’©πŸ™†πŸ™πŸ‘»πŸΊπŸΈπŸ·πŸΉ"));
    

    Note: the above will only look cool in Safari on a Mac! Don't bitch if you see lots of ?????

    Just make sure that your php file is saved with utf-8 encoding.