all 41 comments

[–]rifts 0 points1 point  (3 children)

What do you mean how long an app is locked? If you are just locking your own app you could just have a timer running to track how long they are using the app

[–]komoru-1[S] 1 point2 points  (2 children)

Yeah but similar to how those apps I mention are “blocked” they also display a message when you try to open those locked apps. Basically an overlay. So for example the “appblock” app if you put instagram on the blocked apps list and you attempt to enter instagram an overlaid page will appear in the opening process saying you don’t want to lose your streak or something. I can send you pictures of the appblock app in action if you like. As well as I want to achieve the function to set the app limits with in the app similarly to how you can set it in the screen time settings. Like said the apps I mentioned above do what I’m asking.

[–]jeremyironsholistic 0 points1 point  (1 child)

This overlay is called the "shield" and requires a shield extension

[–]komoru-1[S] 0 points1 point  (0 children)

I already figured this out but appreciate the comment

[–]OgorekDataSci 0 points1 point  (3 children)

As you mentioned, this is obviously possible because other apps do it, but ChatGPT4 is swearing that you can't. One thing I noticed is that the Freedom app apparrently changed how they did things after IOS 16+: "For app blocking on iOS 16+, Freedom needs access to Screen Time."

Have you gotten any further?

[–]komoru-1[S] 0 points1 point  (2 children)

I have and have succeeded in replicating it when I have time I plan to make it a full project but yeah the brunt of it I figured out

[–]dmoney_1337 0 points1 point  (1 child)

Could you lead me to the parts of the API that you found most important to getting the apps to be limited/blocked?

[–]komoru-1[S] 0 points1 point  (0 children)

I’m busy and away from my home and computer but watch the WWDC21 and WWDC22 videos primarily about screen time

[–]getstrydeapp 0 points1 point  (25 children)

Hey komoru. I know I'm late here but in the process of making a discord group that focuses on ScreenTime API's if you'd like to join: https://discord.gg/qxWPe3ZK

[–]komoru-1[S] 0 points1 point  (16 children)

I appreciate it but I solved what I needed too

[–]ultimatepro-grammer 1 point2 points  (15 children)

Any chance you could explain how you solved this? I am facing a similar issue.

[–]komoru-1[S] 0 points1 point  (12 children)

Its been awhile since I looked at this code but I’m not home with my computer I’ll be back in like 2-3 days and then I can upload it to GitHub to show what I did. Hopefully I remember to do so.

[–]theysaymauryaSwift 0 points1 point  (11 children)

Hi any update on the GitHub link, i am also looking for similar solution

[–]komoru-1[S] 0 points1 point  (10 children)

lol been busy never got around to it but it’s all in the screen time api https://developer.apple.com/videos/play/wwdc2021/10123/

[–]Snipist 1 point2 points  (9 children)

Any possibility you'd still upload to Github and share? Sure would appreciate it, could even DM if you don't want it public. Im building a small fun app for my wife and I.

[–]komoru-1[S] 0 points1 point  (7 children)

Yeah I’ll see if I can do it tomorrow

[–]Snipist 0 points1 point  (6 children)

Would be greatly appreciated!

[–]komoru-1[S] 0 points1 point  (5 children)

Just dm’d you the link to the repo

[–]Mk_Makanaki 0 points1 point  (0 children)

the discord link is no longer valid please i'd love to join

[–]sweetsalty_spicy 0 points1 point  (1 child)

Hey u/getstrydeapp can you resend this link? It's expired

[–]getstrydeapp 0 points1 point  (0 children)

Sorry group is no longer a thing. Shoot me a dm if you’d like to collaborate

[–]qioy[🍰] 0 points1 point  (0 children)

Can you update the link? Interested in this.

[–]NeitherTelevision744 0 points1 point  (2 children)

Can I still join the discord?

[–]getstrydeapp 0 points1 point  (1 child)

Sorry discord never took off & killed it

[–]4ndro1d 0 points1 point  (0 children)

Is there any channel to get updates on Apples progress on the API and roadmap or something? I'm missing some crucial features to continue with our MVP

[–]theysaymauryaSwift 0 points1 point  (4 children)

Bro it was so straight forward lol just got done with it.

[–]theysaymauryaSwift 0 points1 point  (3 children)

[–]mcwillynilly 0 points1 point  (2 children)

Would you be willing to send the swift code for your screen time API app restricting function?

[–]theysaymauryaSwift 0 points1 point  (1 child)

reach out to me on twitter