[英]iOS display message on lockscreen
One of our clients asked for this functionality: "Permanently display a message (or image) on the iPhone lockscreen". 我们的一位客户要求使用此功能:“在iPhone锁定屏幕上永久显示消息(或图像)”。
Our initial ideas were: 我们最初的想法是:
Any ideea how we can accomplish this request. 任何想法我们如何完成此请求。 Please note that the app is NOT intended to be distributed via AppStore. 请注意,该应用程序不打算通过AppStore分发。 This is an internal app only. 这仅是一个内部应用程序。 It should work on NON-Jailbreak devices through . 它应通过,在非越狱设备上工作 。 The app will be enterprise distribuited. 该应用程序将由企业分发。
Kind regards, 亲切的问候,
If it's not intended for the app store, you could definitely use the artwork thing. 如果不打算用于应用商店,则可以使用艺术品。 Since you don't need to comply with the iOS guidelines, just warn your users that the lockscreen buttons won't work if you try using them. 由于您不需要遵守iOS准则,因此请警告您的用户,如果您尝试使用锁屏按钮,则锁屏按钮将无法使用。 This link and this one should help. 此链接 ,这一个应该有所帮助。
Using the iOS 7 background fetch can help you manage messages display, as long as the app has already been opened once. 只要应用程序已经打开一次,使用iOS 7 后台抓取就可以帮助您管理消息显示。 To know if the app is opened, you can send ping to your server saving the current app state every X minutes. 要知道该应用程序是否已打开,您可以每隔X分钟将ping发送到您的服务器,以保存当前应用程序状态。 If the server doesn't receive an update, it will just guess that the app is not running, he'll send emails or push notifications to the user until he does so. 如果服务器未收到更新,它将仅猜测该应用程序未在运行,他将向用户发送电子邮件或推送通知,直到他这样做为止。
Issues: 问题:
It could be a good option since a notification can stay on the lockscreen as long as the user or you doesn't clear the notification center (you have to set it). 这可能是一个不错的选择,因为只要用户或您不清除通知中心(必须进行设置),通知就可以保留在锁屏上。 And you can remotely display any message without the app being launched. 而且,您可以在不启动应用程序的情况下远程显示任何消息。
Issues: 问题:
You won't be able to change the device lockscreen image without a jailbroken device. 没有越狱的设备,您将无法更改设备的锁屏图像。
I'd go with the first one, if it's a client requirement it seems like a reliable one. 我会选择第一个,如果这是客户要求,那似乎是一个可靠的要求。 It all depends on how much control they have on the devices. 这完全取决于他们对设备的控制程度。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.