简体   繁体   中英

Show iPhone lock screen with seconds (own usage)

Note : this is not intended to be published by Apple - it's for my own usage


Looking at having seconds shown on the lock screen of my iPhone (iOS 11).
There doesn't seem to be any setting that reaches that goal.

So I'm contemplating doing this via a program.

Now: 在此输入图像描述

Goal: 在此输入图像描述


edit

The lock screen is protected, for good reasons, but again the app will not be published.

This answer ( how-to-set-lock-screen-wallpaper-and-ringtone-programmatically-in-iphone ) addresses static data of the lock screen (and is quite old).

Is there a plist , not directly accessible from the UI, where a property could be changed programmaticaly, in order to show seconds?

Or is there a way to achieve this thanks to an API, change the View behavior to include seconds?

I know this is probably a suggestion you don't want to hear but I think is probably your best option. Jailbreaks are coming out for iOS 11 (right now there is Electra) and will probably be the easiest way. You'd also encounter the issue of your app not being certified for more than a week unless you have a developer account with Apple. Regardless, I found a decent tutorial by LaughingQuoll (he has made some fairly popular tweaks for Cydia) to get started with Theos. Once you've got started, you can look into the Theos docs and iPhonedevwiki to see how to modify the lock screen. In my opinion it'd be a lot of work but worth it once you're able to mod your phone how you want ;).

Alternatively, jailbreak and look for an already made tweak.

Edit: While I don't know where exactly it is, if you're looking to edit a file that's on yor device internally, you can use Filza . It's an app available for Jailbroken devices that allows for browsing and modification of your device's files. The link provided can be opened in the Cydia app if you have it installed and just incase it doesn't work the repo it's in is BigBoss (a default repo). The best I could find is modifying the lock screen "Touch ID to Unlock" text. You can find this in /System/Library/CoreServices/Springboard.app/en.lproj/SpringBoard.strings , although I think anywhere in /System/Library/CoreServices/Springboard.app/ could have what you want hidden away. Maybe not, I'm unsure. Let me know where abouts it is if you find what you need. Good luck.

I can think of a "cheater method" that would be much easier than coding but could solve your issue depending on the purpose . (If your "end goal" is to be able to "time things" without unlocking your phone this could suffice.)

You could create an Animated GIF for your lock screen image, showing the seconds counting (or optionally higher resolution like tenths of a second) in digital, analog or whatever other format you wanted.

  • With a jailbroken iPhone you can use an app like GifLock to use an Animated GIF for your lock screen image. ( Source )

  • With a non-jailbroken iPhone I think you can use an app like Giphy to convert an Animated GIF into a Live Photo which can be set as a lock screen image. ( Source )

As for creating the Animated GIF to your liking, I use ScreenToGIF for all my GIF-animating needs. It's meant for PC screen recording, so this wouldn't be within it's "intended purpose", but outside of that there are numerous tools for building Animated GIF's.


sample gif I slapped this together in 2 minutes for testing at my cell's resolution.
(Obviously you would need to include more than 4 frames.)


Image from one of the links: (It made me LOL so I had to include it) weird dancing guy


...and just since we're on the topic of Clocks & GIF's , here's one I just added to my SO profile page, for no constructive purpose whatsoever: clock
(Click the image to view a mesmerizing 'large version' while you ponder your lock screen options.)


PS - I realize this isn't solution isn't following the criteria set in the question and therefore I don't expect the bounty . Honestly I didn't even realize there was a bounty until just now, I'm just trying to think out-of-box for alternative solutions.

Make a Today extension (aka Widget). The biggest downside is that you'll need to swipe right in order to see it. I've made the complete code available here . I don't think posting the code in this answer brings a lot of value because it is ultimately very trivial. It's just a timer that updates a label (aka a clock).

Today extensions let you run a tiny app on the lock screen. So you can show a clock, and while it is visible you can update the view live. (Whenever the view is not completely visible, the system shows the last snapshot.) But, the page with the widgets is "to the left" of the notifications/clock page so you have to swipe right if you want to see it widget. So long as you can go the extra distance of waking up the screen and then swiping right, this solution may work for you.

The gif doesn't capture the sub-second updating very well, but it looks nice on my phone. If I ever have the need to see the time like this, I'll be glad to have solved the problem already.

在此输入图像描述

Notes: * It seems like on Xcode 9.3 you'll need to run the project 2 times to get it to show up. I read that in the release notes a dozen times but never knew what it meant until now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM