How to modify the content shown in the lock screen when Passbook is nearby

非 Y 不嫁゛ 提交于 2019-12-22 13:50:08

问题


I want to modify what is shown in the lock screen when a passbook location is nearby. At present it give me a logo, "nearby" and app name. How can I show other content?


回答1:


The degree to which you can customise lock screen messages for location alerts is somewhat limited. The format will always be icon, organizationName (taken from pass.json and displayed in bold) on the first line and a customisable message on the second line.

The space for the message is small meaning that messages over 30 characters or so are cropped with an ellipsis (...).

To specify the message text, use the relevantText key in the locations array.

This example is taken from a 'offer of the week' pass.

"locations": [{
    "latitude": 49.282742271408,
    "longitude": -123.11837009769,
    "relevantText": "Slide to see our latest deal at iDaburn"
}, {
    "latitude": 49.27581030326,
    "longitude": -123.12110917249,
    "relevantText": "Slide to see our latest deal at iDaburn"
}],

There's more info in Apple's Passbook Package Format Reference document.



来源:https://stackoverflow.com/questions/14335159/how-to-modify-the-content-shown-in-the-lock-screen-when-passbook-is-nearby

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!