问题
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