[HN Gopher] Preventing app removal on iOS
       ___________________________________________________________________
        
       Preventing app removal on iOS
        
       Author : logistra
       Score  : 69 points
       Date   : 2024-09-24 05:01 UTC (3 days ago)
        
 (HTM) web link (tinycoder.pika.page)
 (TXT) w3m dump (tinycoder.pika.page)
        
       | yjftsjthsd-h wrote:
       | Okay, not so bad as I initially worried:
       | 
       | > The key is using Screen Time API of iOS.
       | 
       | > After getting approval from the user, the developer can set a
       | flag to deny app removal.
       | 
       | > This feature must be opt-in. To enable the flag, you should
       | explicitly get approval from the user.
        
         | naltroc wrote:
         | but also, like, it only runs in certain conditions it sounds
         | like here.
         | 
         | Can this line of code be always running? What if the app
         | launches itself as a background process?
         | 
         | For a feature I just learned about so many questions, but it's
         | Apple in their store so hedges betting it isn't as dangerous as
         | it sounds. But perks your ears up
        
           | throwanem wrote:
           | By design, apps run in background on iOS only as the system
           | permits. Mostly they don't, except for a limited time in
           | response to notifications, and in some other such sharply
           | circumscribed situations.
           | 
           | I strongly doubt an app asserting this flag would pass review
           | without giving the user a way to opt freely back out in the
           | app's settings.
           | 
           | That goes double for the flag being entitlement-gated, one
           | social reason for which requirement would be that it
           | structurally signals a need for closer review. (I don't have
           | an inside source at Apple, but my experience of their review
           | process prompts the inference.)
           | 
           | The intent is to offer a user the option to strengthen a
           | precommitment, not to offer an app dev the option to
           | permanently infest a device. You can play games in app
           | review, but only up to a point. Trying something like that
           | seems like a good way to get deservedly permabanned.
           | 
           | Granted, I still wouldn't use the app, because I don't need
           | it. But if I did, I'd feel pretty OK about enabling that
           | feature. I might expect it to annoy me enough and aid me so
           | little I'd turn it off again, but I'd see no need whatsoever
           | to worry about being stuck with it.
        
       | andai wrote:
       | Do I understand correctly that bleary eyed users were
       | uninstalling the alarm rather than turning it off? (Because by
       | design it's a hassle to turn it off, i.e. to ensure user stays
       | awake for at least some length of time?) That's pretty funny.
       | 
       | My friend (an absolute bear of sleepiness) had a "wifi alarm
       | clock" back in the day: he had to actually stumble over to his
       | router (get a certain wifi signal level) for the alarm to switch
       | off!
        
         | neilv wrote:
         | Clever.
         | 
         | A student once made a whimsical motorized alarm clock that
         | could drive around the bedroom, the idea being that the drowsy
         | person would wake up in course of chasing it.
         | 
         | Another student made an alarm clock on the computer, which
         | would require them to be alert enough to solve a differential
         | equation.
        
           | koolba wrote:
           | > Another student made an alarm clock on the computer, which
           | would require them to be alert enough to solve a differential
           | equation.
           | 
           | That seems like it'd end badly after a rough night. Not only
           | can you not keep sleeping, you can't function enough to shut
           | off the alarm so you just lie in bed without actually
           | resting. Worst of all worlds. I love it!
        
             | neilv wrote:
             | It might've done long-term psychological damage to the
             | student. They went on to become CEO for a very prominent
             | company. :)
        
           | teddyh wrote:
           | > _whimsical motorized alarm clock that could drive around
           | the bedroom_
           | 
           | It's called "Clocky": <https://en.wikipedia.org/w/index.php?t
           | itle=Clocky&oldid=1221...>
        
         | StableAlkyne wrote:
         | > Do I understand correctly that bleary eyed users were
         | uninstalling the alarm rather than turning it off?
         | 
         | A legitimate reason to do this would be if you're on a red-eye
         | flight somewhere, and your alarm goes off. You can't turn it
         | off because your special object or QR code or whatever is in
         | your checked bag. Your only option is to either turn off your
         | phone or uninstall.
        
           | andai wrote:
           | >turn off your phone
           | 
           | I was wondering about this, smartphones don't turn on when
           | your alarm goes. (So you could just turn it off to bypass the
           | "super alarm"?)
           | 
           | I have vague memories that older cell phones used to turn on
           | when the alarm would ring, but I might be imagining it.
        
             | sebtron wrote:
             | Yes, older phones would turn on to ring the alarm. At least
             | the 3 I owned did, and they were all different brands.
        
             | vesinisa wrote:
             | You're absolutely correct. At least Nokia Symbian phones
             | had this feature.
        
         | Semaphor wrote:
         | I used to have issues walking up during university, leaving my
         | phone on the other side of the room, taking it and turning it
         | off and falling asleep again without memory if it.
         | 
         | I got an alarm app that required solving math questions to do
         | more than snooze. I had set it to three digit numbers +/-
         | another. Worked great. Until I partied a bit too hard, and had
         | to repeatedly snooze it, because even on the bus to university,
         | I was too hungover to figure out the answer ;)
         | 
         | But in general, I was very grateful for the app.
        
           | Habgdnv wrote:
           | There were not many such apps. Probably I used the same app
           | about 10+ years ago. And also I was leaving my phone
           | somewhere in the room where I must walk to, so I can actually
           | get out of the bed. On many occasions if someone ring me I
           | can answer and talk to them, assure them that I'm on my way
           | and continue to sleep without even remembering. I listened to
           | recordings, it is funny because I try to change my voice to
           | sound like I am fully awake without even remembering. Btw, it
           | turns out it was because of my unmanaged t2 diabetes. Now as
           | it is under control, things are kind of normal.
        
             | heraldgeezer wrote:
             | >unmanaged t2 diabetes
             | 
             | Diabetes causes sleepwalking? Or mega tiredness?
        
         | dylan604 wrote:
         | There's nothing worse than having a roommate that sleeps
         | through their alarm that can be heard every where with no
         | escaping it.
        
       | playingalong wrote:
       | Funny. Stallman wouldn't be happy to allow software which you
       | cannot overrule.
        
         | m463 wrote:
         | This is a case of magnificent mindful past you overruling lazy
         | negligent present you.
        
         | micromacrofoot wrote:
         | Stallman isn't allowed to be in the same room as an iPhone
        
         | ipsento606 wrote:
         | It's really a matter of perspective. On the one hand, it's
         | creating a situation where a user cannot uninstall the app. On
         | the other hand, it's _allowing_ a user to prevent themselves
         | from being able to uninstall the app under some circumstances.
         | Whether this is ultimately a net increase or decrease in user
         | freedom is an exercise in judgement.
        
           | josephcsible wrote:
           | IMO, it's a net decrease, because past owners shouldn't be
           | able to bind future owners. The fact that it's your past self
           | binding your future self, rather than the usual case of the
           | manufacturer binding the end-user, is irrelevant.
        
         | DistractionRect wrote:
         | But really, this isn't about overruling software, it's about
         | overruling yourself.
         | 
         | Past self has implemented a mandate that future self get up at
         | this time. Future self is a sleepy, lazy, point of sale that
         | can't be trusted.
         | 
         | Sample size of 1. I used to "wake up" and turn off my alarm and
         | have zero recollection of it. I got the most annoying
         | mechanical clock and packed it in a box that I had to unpack
         | before I could turn it off. It got louder as I removed the
         | packaging. The prolonged activity in order to shut off the
         | alarm is ultimately what helped me fully wake up.
        
       | jtbayly wrote:
       | But... then how do you delete it if you _actually_ want it gone?
       | 
       | Surely there is a workaround, right?
        
         | atrus wrote:
         | As stated in the article, that flag is only flipped while the
         | alarm is going off. Also the feature in general is opt-in,
         | _and_ you have to be approved by apple for that feature.
        
           | jtbayly wrote:
           | Thanks. Somehow I missed that it is only enabled while the
           | alarm is going off. I did see that it was opt-in and needed
           | approval. But then I was worried about opting in.
        
       | paxys wrote:
       | Neat hack, but there's zero chance their app actually gets
       | approval to use that API.
        
         | kassner wrote:
         | It got, about a month ago:
         | https://apps.apple.com/se/app/superalarm-alarm-clock-sleep/i...
         | 
         | v2.5.1
        
       | cobertos wrote:
       | Never could I have imagined users wanting apps to have more
       | control of them, but here we are with a pretty compelling use
       | case for not letting them remove an app. Neat
        
       | EGreg wrote:
       | So this is a real thing? As long as your app qualifies for that
       | entitlement, you can do this?
       | 
       | Also, what about force-quitting the app? Couldn't users just do
       | that?
        
       | benatkin wrote:
       | I like the idea of apps and components being able to have wide
       | ranges of privileges and those being communicated to the user. I
       | like what the author is doing and everything I don't like about
       | it - the unfairness of Apple's gatekeeping and the lack of
       | involvement of the user - is from Apple.
       | 
       | It makes me think of this article I recently read about web
       | components as machines. Perhaps it's only loosely related, but I
       | feel like it's worth the tradeoff for the system to create the
       | illusion of components being in charge, even though everything
       | goes through the system, whether it be a web server, a web page,
       | or an operating system.
       | https://www.abeautifulsite.net/posts/component-machines/
       | 
       | What this app attempts to do is to make the alarm be a little bit
       | more like clocky which could do what it did because it was a
       | physical machine. https://en.m.wikipedia.org/wiki/Clocky
        
       | StableAlkyne wrote:
       | Is there any malware exploiting this feature? I can imagine "can
       | never be uninstalled" would be a desirable quality.
       | 
       | Especially if the flag doesn't expire, a bad actor could upload a
       | flashlight app with this requirement, let the 20% or whatever
       | tech savvy users balk at the permission, then update later to
       | constantly serve ads or spy or whatever to the remaining 80%, who
       | are now unable to uninstall.
       | 
       | Alternatively, a standard skinner-box inspired mobile game that
       | refuses to uninstall after you've become addicted and traded the
       | ability to uninstall for 500 PremiumBucks or whatever.
       | 
       | I'm legitimately surprised this is a permission that exists
       | outside of the root user
        
         | HnUser12 wrote:
         | You can always disable screen time permission and uninstall it.
         | Also apps must get a special permission for using this API from
         | Apple, if that's any consolation.
        
         | pityJuke wrote:
         | I'd assume that's why there is a separate review process to
         | gain entitlement to this API, no?
         | 
         | (Don't know how this works outside of the App Store, which is
         | an interesting question.)
        
       | rolph wrote:
       | "since users cannot exit from the app to the home screen while
       | the alarm is going off."
       | 
       | i hope they can dial 911 or hit the link to security cams.
        
         | bdavbdav wrote:
         | You can always mash the power button 5 times
        
           | rolph wrote:
           | i hope it works that way
        
       | nesk_ wrote:
       | I had something like that nearly 10 years ago on my Android. I
       | had to walk to my kitchen and scan a QR code on my fridge.
       | 
       | Really effective!
       | 
       | When I didn't power off the phone.
        
       | prmoustache wrote:
       | > The most frequent complaint from users was that they could
       | easily turn off alarms by simply removing the app.
       | 
       | Why would people do that? And why should we prevent this it if
       | that is what they want. I don't understand.
        
         | greyface- wrote:
         | People are not always completely lucid immediately upon their
         | alarm clock going off. Have you ever woken up several hours
         | late, only to find that your alarm clock did go off at the
         | scheduled time, but you disabled it and resumed sleeping before
         | fully waking up?
        
       | littke wrote:
       | You can still uninstall the app after you go to Settings > Screen
       | Time and then remove permissions for the app.
       | 
       | Once you know, it's easy to do.
       | 
       | Most people don't know, so this probably does what the author is
       | intending.
        
       | UniverseHacker wrote:
       | It seems like this could have some awful unintended
       | consequences... e.g. you setup an alarm that can only be
       | deactivated by scanning a QR code in the next room to force
       | yourself out of bed, but forget to disable it on a business trip-
       | and it goes off during an important early morning meeting and
       | cannot be silenced as you aren't home.
       | 
       | I suspect this is almost always not a great solution to this
       | problem. When I was a young adult I used aggressive alarm
       | measures to get out of bed on time, such as having a very loud
       | alarm clock on the far end of the room, where I had to actually
       | get out of bed to silence it.
       | 
       | I discovered realized needing to do this was caused by a number
       | of fixable health/lifestyle issues: going to bed too late, not
       | getting enough daylight and exercise to sync my circadian rhythm
       | correctly, too much screen time and bright lights before bed, too
       | much coffee late in the day, etc. Nowadays I go to bed by ~8pm
       | everyday, fall asleep quickly, and am up early. I haven't needed
       | an alarm even for important very early events in almost a decade.
        
         | sunaookami wrote:
         | >and it goes off during an important early morning meeting and
         | cannot be silenced as you aren't home
         | 
         | Couldn't you just forcefully turn the phone off?
         | https://support.apple.com/guide/iphone/iph8903c3ee6/ios
        
       | turtlebits wrote:
       | While this solves app installation, does this prevent users from
       | killing the app, or even easier, just restarting the device?
        
       ___________________________________________________________________
       (page generated 2024-09-27 23:00 UTC)