<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>254545</bug_id>
          
          <creation_ts>2023-03-27 13:35:08 -0700</creation_ts>
          <short_desc>New Wake Lock API does not work in Home Screen Web Apps</short_desc>
          <delta_ts>2025-12-10 13:51:25 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=303885</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="siim">webkit</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>af</cc>
    
    <cc>bedney</cc>
    
    <cc>boris.brudnoy</cc>
    
    <cc>cdumez</cc>
    
    <cc>clshortfuse</cc>
    
    <cc>cryze92</cc>
    
    <cc>detheuss</cc>
    
    <cc>drmoerkerke</cc>
    
    <cc>dwaynemac</cc>
    
    <cc>echrs</cc>
    
    <cc>ehsan.herai</cc>
    
    <cc>ggaren</cc>
    
    <cc>ik</cc>
    
    <cc>jensimmons</cc>
    
    <cc>jesperbendtsen83</cc>
    
    <cc>marcosc</cc>
    
    <cc>me</cc>
    
    <cc>pierre-etienne.lord</cc>
    
    <cc>robert.gergeo</cc>
    
    <cc>sbehrens1414</cc>
    
    <cc>tomac</cc>
    
    <cc>vincent.tremblay-lavoie</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkit</cc>
    
    <cc>wiedemann.m</cc>
    
    <cc>zazi.dx</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1944349</commentid>
    <comment_count>0</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-03-27 13:35:08 -0700</bug_when>
    <thetext>New Wake Lock API works in Safari browser but does not work when web page is added to home screen.


https://whatpwacando.today/wake-lock</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944379</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-27 14:25:40 -0700</bug_when>
    <thetext>Thank you for filing the bug and the reproduction case. I&apos;ll investigate when I have some spare cycles.

I have no idea why Home Screen web apps would behave differently than MobileSafari here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944380</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-03-27 14:25:53 -0700</bug_when>
    <thetext>&lt;rdar://problem/107284303&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944381</commentid>
    <comment_count>3</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-03-27 14:28:12 -0700</bug_when>
    <thetext>Wake lock works:
iOS Safari in browser
iOS MS Edge in browser

Wake lock does not work:
iOS Safari added to home screen
iOS MS Edge added to home screen


iOS 16.4
iPhone 13</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944382</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-03-27 14:29:24 -0700</bug_when>
    <thetext>(In reply to siim from comment #3)
&gt; Wake lock works:
&gt; iOS Safari in browser
&gt; iOS MS Edge in browser
&gt; 
&gt; Wake lock does not work:
&gt; iOS Safari added to home screen
&gt; iOS MS Edge added to home screen
&gt; 
&gt; 
&gt; iOS 16.4
&gt; iPhone 13

One difference I can think of is WKWebView vs SafariViewController.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1944650</commentid>
    <comment_count>5</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-03-28 09:32:21 -0700</bug_when>
    <thetext>I have experienced the same thing, it works in Safari browser, but not in installed PWA.

iPhone 11 - iOS 16.4
iPad prod 2020 - iOS 16.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1945224</commentid>
    <comment_count>6</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2023-03-29 19:13:10 -0700</bug_when>
    <thetext>Came up here to:
https://bugs.webkit.org/show_bug.cgi?id=205104#c8

With another test case:
https://pelord.github.io/wakeLockApiAddHomeScreen/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948311</commentid>
    <comment_count>7</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-04-12 13:37:01 -0700</bug_when>
    <thetext>Also Wake Lock API does not work with &quot;visibilitychange&quot; event.

Unable to re set wake lock api after user goes to home screen and back to Safari.

NotAllowedError: Permission was denied

https://github.com/mdn/dom-examples/blob/main/screen-wake-lock-api/script.js

This example works fine in Android &amp; Windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948312</commentid>
    <comment_count>8</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-04-12 13:38:00 -0700</bug_when>
    <thetext>(In reply to siim from comment #7)
&gt; Also Wake Lock API does not work with &quot;visibilitychange&quot; event.
&gt; 
&gt; Unable to re set wake lock api after user goes to home screen and back to
&gt; Safari.
&gt; 
&gt; NotAllowedError: Permission was denied
&gt; 
&gt; https://github.com/mdn/dom-examples/blob/main/screen-wake-lock-api/script.js
&gt; 
&gt; This example works fine in Android &amp; Windows.

Please file a separate bug since this is a separate issue (please cc me).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1948321</commentid>
    <comment_count>9</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-04-12 14:05:33 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #8)
&gt; Please file a separate bug since this is a separate issue (please cc me).

https://bugs.webkit.org/show_bug.cgi?id=255363</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951101</commentid>
    <comment_count>10</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-04-25 10:24:48 -0700</bug_when>
    <thetext>We rely on the following code to keep the screen awake on iOS:
```
[UIApplication sharedApplication].idleTimerDisabled = YES;
```

This likely does&apos;t work in Home Screen Web Apps because they are not UIApplications but ViewServices. Looks like we need to find an alternate way to make this work for such apps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951206</commentid>
    <comment_count>11</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-04-25 16:58:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/13179</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1951373</commentid>
    <comment_count>12</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-04-26 10:59:54 -0700</bug_when>
    <thetext>Committed 263419@main (bf7f0d4d340b): &lt;https://commits.webkit.org/263419@main&gt;

Reviewed commits have been landed. Closing PR #13179 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956568</commentid>
    <comment_count>13</comment_count>
    <who name="PE Lord">pierre-etienne.lord</who>
    <bug_when>2023-05-19 13:09:44 -0700</bug_when>
    <thetext>The fix do not seem to have landed into iOS 16.5 ... :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956569</commentid>
    <comment_count>14</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-05-19 13:15:42 -0700</bug_when>
    <thetext>(In reply to PE Lord from comment #13)
&gt; The fix do not seem to have landed into iOS 16.5 ... :(

This is true. I should also mention that the fix isn&apos;t in WebKit. We added API to WebKit to allow the Safari team to fix this (and thus closed this WebKit bug report). However, the issue won&apos;t be resolved until Safari actually adopts the new WebKit API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1968198</commentid>
    <comment_count>15</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-07-26 00:10:24 -0700</bug_when>
    <thetext>in iOS 16.6 it doesn&apos;t work either :( fingers crossed for iOS 17...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1972911</commentid>
    <comment_count>16</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-08-22 22:56:16 -0700</bug_when>
    <thetext>Still not fixed in iOS 17 beta 7.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977232</commentid>
    <comment_count>17</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-13 00:34:56 -0700</bug_when>
    <thetext>Still not fixed in iOS 17 RC</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1977342</commentid>
    <comment_count>18</comment_count>
    <who name="Vince">vincent.tremblay-lavoie</who>
    <bug_when>2023-09-13 12:47:30 -0700</bug_when>
    <thetext>Just installed iOS 17 Beta on iPad, and still doesn&apos;t work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979766</commentid>
    <comment_count>19</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 04:12:17 -0700</bug_when>
    <thetext>Still not fixed in iOS 17.0.1.


I guess it will be never fixed.

What a waste of time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979897</commentid>
    <comment_count>20</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-09-25 12:02:49 -0700</bug_when>
    <thetext>WebKit is providing API for Safari to adopt. No further code change is expected in WebKit so there is no point in keeping this WebKit bug open.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979899</commentid>
    <comment_count>21</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-09-25 12:05:04 -0700</bug_when>
    <thetext>Please report this https://feedbackassistant.apple.com for better visibility within Apple.

You are also welcome and encouraged to comment here, however that&apos;s not as good as reporting feedback in the right place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979903</commentid>
    <comment_count>22</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 12:18:40 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #21)
&gt; Please report this https://feedbackassistant.apple.com for better visibility
&gt; within Apple.
&gt; 
&gt; You are also welcome and encouraged to comment here, however that&apos;s not as
&gt; good as reporting feedback in the right place.

This website does not work with other browsers:

VM95:1  Uncaught (in promise) SyntaxError: Unterminated string in JSON at position 993 (line 1 column 994)

https://i.imgur.com/Ml5VgKU.png</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979904</commentid>
    <comment_count>23</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 12:23:45 -0700</bug_when>
    <thetext>Also broken in Safari.(In reply to Alexey Proskuryakov from comment #21)
&gt; Please report this https://feedbackassistant.apple.com for better visibility
&gt; within Apple.
&gt; 
&gt; You are also welcome and encouraged to comment here, however that&apos;s not as
&gt; good as reporting feedback in the right place.

Also broken in Safari.

Please test your links before recommending them here...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979906</commentid>
    <comment_count>24</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-09-25 12:28:27 -0700</bug_when>
    <thetext>(In reply to siim from comment #23)
&gt; Also broken in Safari.(In reply to Alexey Proskuryakov from comment #21)
&gt; &gt; Please report this https://feedbackassistant.apple.com for better visibility
&gt; &gt; within Apple.
&gt; &gt; 
&gt; &gt; You are also welcome and encouraged to comment here, however that&apos;s not as
&gt; &gt; good as reporting feedback in the right place.
&gt; 
&gt; Also broken in Safari.
&gt; 
&gt; Please test your links before recommending them here...

This site is working fine for me both in Safari and Chrome. The issue you&apos;re seeing could be caused by a browser extension. If not, I&apos;m unsure what the issue is.

https://feedbackassistant.apple.com is the main Apple website to file bugs and we do get a lot of bugs report from this site.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979907</commentid>
    <comment_count>25</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 12:35:17 -0700</bug_when>
    <thetext>I do not have any extensions on Safari.

I guess they do not want regular users feedback :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979908</commentid>
    <comment_count>26</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 12:39:59 -0700</bug_when>
    <thetext>https://i.imgur.com/RgU2eNC.png

Same JSON parse error in Safari:
Unhandled Promise Rejection: SyntaxError: JSON Parse error: Unterminated string
SyntaxError: JSON Parse error: Unterminated string</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979909</commentid>
    <comment_count>27</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2023-09-25 12:42:03 -0700</bug_when>
    <thetext>(In reply to siim from comment #26)
&gt; https://i.imgur.com/RgU2eNC.png
&gt; 
&gt; Same JSON parse error in Safari:
&gt; Unhandled Promise Rejection: SyntaxError: JSON Parse error: Unterminated
&gt; string
&gt; SyntaxError: JSON Parse error: Unterminated string

At what step do you get this error?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979913</commentid>
    <comment_count>28</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 12:52:22 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #27)

&gt; At what step do you get this error?

2 seconds after login and I can see unread iOS beta news and then it crashes to blank page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979938</commentid>
    <comment_count>29</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 13:58:36 -0700</bug_when>
    <thetext>Managed to get screenshot before crash.

I guess untitled feedback is corrupted.

https://i.imgur.com/A39si4s.png</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1979956</commentid>
    <comment_count>30</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-09-25 14:35:30 -0700</bug_when>
    <thetext>This feedback website is broken in iOS 17 iPhone 13 also.
Managed to add new feedback and choose iOS/iPad and after that it crashes to blank screen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1980198</commentid>
    <comment_count>31</comment_count>
    <who name="Jen Simmons">jensimmons</who>
    <bug_when>2023-09-26 09:51:06 -0700</bug_when>
    <thetext>rdar://108573133</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1980237</commentid>
    <comment_count>32</comment_count>
    <who name="Jen Simmons">jensimmons</who>
    <bug_when>2023-09-26 11:33:35 -0700</bug_when>
    <thetext>Closing this again, because the work needed in the WebKit engine is in fact complete. 

Web apps are interesting because they involve both the browser engine and other kinds of browser technology / operating system technology. 

Wake Lock API does not yet work in Home Screen Web Apps. We are aware; this is not unexpected. The work that&apos;s still needed for a complete fix _is_ being tracked and discussed — just not in the WebKit project, since the WebKit portion is done. 

Stay tuned.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1999622</commentid>
    <comment_count>33</comment_count>
    <who name="PE Lord">pierre-etienne.lord</who>
    <bug_when>2023-12-14 10:02:01 -0800</bug_when>
    <thetext>Does this fix in webkit has landed in iOS 17.2?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1999841</commentid>
    <comment_count>34</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2023-12-15 00:49:30 -0800</bug_when>
    <thetext>No

Still broken</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2000261</commentid>
    <comment_count>35</comment_count>
    <who name="Jesper Bendtsen">jesperbendtsen83</who>
    <bug_when>2023-12-17 00:06:28 -0800</bug_when>
    <thetext>I&apos;m really waiting for this to work in web apps, have been playing hidden video for years as a workaround. The downside with this method is that the video title and play and pause buttons appear on the front on iOS devices. Not cool. So Apple please prioritize this, been waiting since iOS 16.4 for a fix for web apps. The WebKit team has done their work a long time ago…</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003922</commentid>
    <comment_count>36</comment_count>
    <who name="Danny Moerkerke">drmoerkerke</who>
    <bug_when>2024-01-09 13:44:40 -0800</bug_when>
    <thetext>How can we report this to Apple? Otherwise this will probably never be fixed :-(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003962</commentid>
    <comment_count>37</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2024-01-09 17:16:44 -0800</bug_when>
    <thetext>Reopening... and don&apos;t don&apos;t worry, Apple people (e.g., me) do monitor these things. I&apos;ll check to see what&apos;s going on as this has possibly regressed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003985</commentid>
    <comment_count>38</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2024-01-09 18:34:43 -0800</bug_when>
    <thetext>@Marcos: There is no issue to fix on WebKit side, therefore there is no reason to have a WebKit bugzilla bug. There is already a radar and it is already assigned to the correct team at Apple. This issue was not forgotten.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003986</commentid>
    <comment_count>39</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2024-01-09 18:35:14 -0800</bug_when>
    <thetext>(In reply to Danny Moerkerke from comment #36)
&gt; How can we report this to Apple? Otherwise this will probably never be fixed
&gt; :-(

feedbackassistant.apple.com is how people report bugs to Apple.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2003987</commentid>
    <comment_count>40</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2024-01-09 19:09:18 -0800</bug_when>
    <thetext>Oh yeah, oops. Sorry, Chris. Forgot we’d already suggested that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2005775</commentid>
    <comment_count>41</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2024-01-17 23:30:22 -0800</bug_when>
    <thetext>Still not fixed in iOS 17.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2011686</commentid>
    <comment_count>42</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2024-02-08 02:37:41 -0800</bug_when>
    <thetext>It is fixed in iOS 17.4 by removing PWA support entirely...

No PWA, no problem.

https://www.theregister.com/2024/02/08/apple_web_apps_eu/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2014064</commentid>
    <comment_count>43</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2024-02-15 12:14:37 -0800</bug_when>
    <thetext>It is official now. Home Screen Apps are just bookmarks in iOS.

Thanks all @apple.com developers here for helping to kill open web.

https://open-web-advocacy.org/blog/apple-on-course-to-break-all-web-apps-in-eu-within-20-days/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2023666</commentid>
    <comment_count>44</comment_count>
    <who name="PE Lord">pierre-etienne.lord</who>
    <bug_when>2024-03-25 08:37:06 -0700</bug_when>
    <thetext>They finally changed their mind.

https://bugs.webkit.org/show_bug.cgi?id=268643#c50</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2025399</commentid>
    <comment_count>45</comment_count>
    <who name="siim">webkit</who>
    <bug_when>2024-04-02 09:04:39 -0700</bug_when>
    <thetext>The bug had its one-year anniversary last month.

Thanks Apple</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2043838</commentid>
    <comment_count>46</comment_count>
    <who name="Dwayne Macgowan">dwaynemac</who>
    <bug_when>2024-06-30 07:44:11 -0700</bug_when>
    <thetext>i&apos;m having this issue on iPhone 14, iOS 17.5.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2057566</commentid>
    <comment_count>47</comment_count>
    <who name="Sean Ray Dvir">zazi.dx</who>
    <bug_when>2024-09-04 06:10:53 -0700</bug_when>
    <thetext>This bug still exists in the latest version of iOS.
Any updates?
Something to let us at least hope for a future where we can ship web apps properly on iOS?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2063439</commentid>
    <comment_count>48</comment_count>
    <who name="">ik</who>
    <bug_when>2024-09-26 11:47:37 -0700</bug_when>
    <thetext>&quot;There is already a radar and it is already assigned to the correct team at Apple. This issue was not forgotten.&quot;
https://bugs.webkit.org/show_bug.cgi?id=254545#c38

That was 9 months ago. iOS 16.4 was released 18 months ago.

Would be nice if someone could send a memo or something to that team? I mean, I imagine WebKit folks who worked on this feature would like their colleagues to take their work seriously and fix this?

&lt; Sorry for sounding snarky, but it would be a shame to have this take 3 years like fixing background audio in web apps did. &gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2065456</commentid>
    <comment_count>49</comment_count>
    <who name="William J. Edney">bedney</who>
    <bug_when>2024-10-04 07:37:12 -0700</bug_when>
    <thetext>Looks like this is still not fixed in iOS 18.0

Can others verify?

Continuing to use the &apos;video element&apos; hack for now, but its hacky and leaves detritus on the lock screen.

Any update Apple folks?

Cheers,

- Bill</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2066171</commentid>
    <comment_count>50</comment_count>
    <who name="Carlos Lopez">clshortfuse</who>
    <bug_when>2024-10-08 07:53:40 -0700</bug_when>
    <thetext>Video playback no longer works as a suitable fallback. An iPad will dim and lock regardless.  This has completely degraded the state of our application. I have about 40 upset users who will need to migrate to Android devices.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2073871</commentid>
    <comment_count>51</comment_count>
    <who name="">webkit</who>
    <bug_when>2024-11-08 10:09:48 -0800</bug_when>
    <thetext>I&apos;m also encountering this issue in a PWA that I am developing. I need the screen to stay awake because the user is reading a document while operating an instrument with both hands with no opportunity to send input that would keep the screen at normal brightness.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2073878</commentid>
    <comment_count>52</comment_count>
    <who name="">webkit</who>
    <bug_when>2024-11-08 10:23:51 -0800</bug_when>
    <thetext>This bug is still present in iOS 18.1 for installed PWA apps / bookmarked sites. The wakelock works when the page is running in Safari, but does not work when the app / page was opened from the home screen.

A simple way to confirm this is to try the &apos;Enable Wake Lock&apos; button on this page:
  https://progressier.com/pwa-capabilities/screen-wake-lock

from safari (works) and from a page opened from the home screen (does not work).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2084150</commentid>
    <comment_count>53</comment_count>
    <who name="Maximilian Wiedemann">wiedemann.m</who>
    <bug_when>2024-12-28 05:16:20 -0800</bug_when>
    <thetext>The bug still seems to be present in iOS 18.2 for PWAs.

Working fine in Safari. In PWA, even though it gives you a proper WakeLockSentinel object and rejection reason, it still goes to sleep.

Tested using the previously mentioned https://progressier.com/pwa-capabilities/screen-wake-lock and my own web app.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2086950</commentid>
    <comment_count>54</comment_count>
    <who name="Sam Behrens">sbehrens1414</who>
    <bug_when>2025-01-13 18:38:12 -0800</bug_when>
    <thetext>This bug seems to be fixed with 18.2.1. Can someone else on 18.2.1 confirm?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2086953</commentid>
    <comment_count>55</comment_count>
    <who name="Sam Behrens">sbehrens1414</who>
    <bug_when>2025-01-13 18:44:06 -0800</bug_when>
    <thetext>(In reply to Sam Behrens from comment #54)
&gt; This bug seems to be fixed with 18.2.1. Can someone else on 18.2.1 confirm?

Nevermind. I’m sorry to give anyone a false sense of hope. I hadn’t realized that I had changed my phone settings. WebKit team/Apple, please address this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2087988</commentid>
    <comment_count>56</comment_count>
    <who name="">ehsan.herai</who>
    <bug_when>2025-01-17 00:26:02 -0800</bug_when>
    <thetext>Has anyone got any workaround?
btw I&apos;ve already tried video-playing solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2088026</commentid>
    <comment_count>57</comment_count>
    <who name="Dwayne Macgowan">dwaynemac</who>
    <bug_when>2025-01-17 05:55:15 -0800</bug_when>
    <thetext>i&apos;m using @scottjgilroy/no-sleep and it works on iphone</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2098239</commentid>
    <comment_count>58</comment_count>
    <who name="Nikki Bernobic">echrs</who>
    <bug_when>2025-02-26 06:45:12 -0800</bug_when>
    <thetext>Issue still present on 18.3.1...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2098240</commentid>
    <comment_count>59</comment_count>
    <who name="Danny Moerkerke">drmoerkerke</who>
    <bug_when>2025-02-26 06:51:31 -0800</bug_when>
    <thetext>(In reply to Dwayne Macgowan from comment #57)
&gt; i&apos;m using @scottjgilroy/no-sleep and it works on iphone

Please read the issue description, this doesn&apos;t work for web apps that have been added to the Home Screen.

The library you mentioned uses the native wakeLock under the hood so it will work in the browser but not when the web app is added to the Home Screen.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2098684</commentid>
    <comment_count>60</comment_count>
    <who name="Nikki Bernobic">echrs</who>
    <bug_when>2025-02-27 00:52:55 -0800</bug_when>
    <thetext>(In reply to Danny Moerkerke from comment #59)
&gt; (In reply to Dwayne Macgowan from comment #57)
&gt; &gt; i&apos;m using @scottjgilroy/no-sleep and it works on iphone
&gt; 
&gt; Please read the issue description, this doesn&apos;t work for web apps that have
&gt; been added to the Home Screen.
&gt; 
&gt; The library you mentioned uses the native wakeLock under the hood so it will
&gt; work in the browser but not when the web app is added to the Home Screen.

FWIW, I&apos;ve found a demo page that showcases multiple libraries (https://sgilroy.github.io/nosleep.page) and the library mentioned above seems to work in PWA mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2098689</commentid>
    <comment_count>61</comment_count>
    <who name="Danny Moerkerke">drmoerkerke</who>
    <bug_when>2025-02-27 01:21:19 -0800</bug_when>
    <thetext>(In reply to Nikki Bernobic from comment #60)
&gt; (In reply to Danny Moerkerke from comment #59)
&gt; &gt; (In reply to Dwayne Macgowan from comment #57)
&gt; &gt; &gt; i&apos;m using @scottjgilroy/no-sleep and it works on iphone
&gt; &gt; 
&gt; &gt; Please read the issue description, this doesn&apos;t work for web apps that have
&gt; &gt; been added to the Home Screen.
&gt; &gt; 
&gt; &gt; The library you mentioned uses the native wakeLock under the hood so it will
&gt; &gt; work in the browser but not when the web app is added to the Home Screen.
&gt; 
&gt; FWIW, I&apos;ve found a demo page that showcases multiple libraries
&gt; (https://sgilroy.github.io/nosleep.page) and the library mentioned above
&gt; seems to work in PWA mode.

On iOS 18.3.1 this works, except for the first library.

But comment #50 suggests this no longer works on iPadOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2098737</commentid>
    <comment_count>62</comment_count>
    <who name="Carlos Lopez">clshortfuse</who>
    <bug_when>2025-02-27 06:26:01 -0800</bug_when>
    <thetext>&quot;Where this API isn&apos;t supported, an empty silent video is played to emulate this behaviour (using NoSleep.js).&quot;

Video playback is hit or miss and doesn&apos;t work when the page actually uses audio/video stream like WebRTC. I mentioned this before, and I ultimately ended up losing the client and the $200K/yr contract that came with it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107270</commentid>
    <comment_count>63</comment_count>
    <who name="">detheuss</who>
    <bug_when>2025-03-30 10:30:56 -0700</bug_when>
    <thetext>Hey folks, any updates on this? It&apos;s been a couple of years now... it’s starting to feel like yet another case of Apple quietly sabotaging PWAs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107272</commentid>
    <comment_count>64</comment_count>
    <who name="">ik</who>
    <bug_when>2025-03-30 10:41:41 -0700</bug_when>
    <thetext>🙄

https://webventures.rejh.nl/blog/2024/history-of-safari-show-stoppers/#anchor--2023-new-wake-lock-api-does-not-work-in-home-screen-web-apps</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107484</commentid>
    <comment_count>65</comment_count>
    <who name="Jen Simmons">jensimmons</who>
    <bug_when>2025-03-31 11:33:32 -0700</bug_when>
    <thetext>The Screen Wake Lock API now works in Home Screen Web Apps on iOS and iPadOS 18.4 — which just shipped today.

https://developer.apple.com/documentation/safari-release-notes/safari-18_4-release-notes#Home-Screen-Web-Apps</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107516</commentid>
    <comment_count>66</comment_count>
    <who name="">af</who>
    <bug_when>2025-03-31 12:37:13 -0700</bug_when>
    <thetext>(In reply to Jen Simmons from comment #65)
&gt; The Screen Wake Lock API now works in Home Screen Web Apps on iOS and iPadOS
&gt; 18.4 — which just shipped today.
&gt; 
&gt; https://developer.apple.com/documentation/safari-release-notes/safari-18_4-
&gt; release-notes#Home-Screen-Web-Apps

It works! Hallelujah!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107533</commentid>
    <comment_count>67</comment_count>
    <who name="">detheuss</who>
    <bug_when>2025-03-31 13:07:43 -0700</bug_when>
    <thetext>(In reply to af from comment #66)
&gt; (In reply to Jen Simmons from comment #65)
&gt; &gt; The Screen Wake Lock API now works in Home Screen Web Apps on iOS and iPadOS
&gt; &gt; 18.4 — which just shipped today.
&gt; &gt; 
&gt; &gt; https://developer.apple.com/documentation/safari-release-notes/safari-18_4-
&gt; &gt; release-notes#Home-Screen-Web-Apps
&gt; 
&gt; It works! Hallelujah!

Well, I kid you not – I contacted Apple yesterday through this form: 
https://www.apple.com/feedback/iphone/

I was pretty much BEGGING them to fix this, because people are losing clients and it&apos;s been reported over 2 years ago.
I also sent them a link to this thread and this blog:
https://webventures.rejh.nl/blog/2024/history-of-safari-show-stoppers/#anchor--2023-new-wake-lock-api-does-not-work-in-home-screen-web-apps

So if there&apos;s a problem like this with iOS, try that contact form – seems like someone is actually reading the reports. Or maybe it was just a coincidence. We&apos;ll never know.

Cheers guys, and happy hacking!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2107555</commentid>
    <comment_count>68</comment_count>
    <who name="Danny Moerkerke">drmoerkerke</who>
    <bug_when>2025-03-31 13:49:13 -0700</bug_when>
    <thetext>I can confirm this finally works on iOS 18.4 public beta. Demo: https://whatpwacando.today/wake-lock 

Thanks everyone!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2163363</commentid>
    <comment_count>69</comment_count>
    <who name="">af</who>
    <bug_when>2025-12-04 13:53:08 -0800</bug_when>
    <thetext>(In reply to Jen Simmons from comment #65)
&gt; The Screen Wake Lock API now works in Home Screen Web Apps on iOS and iPadOS
&gt; 18.4 — which just shipped today.
&gt; 
&gt; https://developer.apple.com/documentation/safari-release-notes/safari-18_4-
&gt; release-notes#Home-Screen-Web-Apps

I just installed iOS 26.1, and this seems to have regressed.  It no longer appears to be supported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2163374</commentid>
    <comment_count>70</comment_count>
    <who name="">af</who>
    <bug_when>2025-12-04 14:38:28 -0800</bug_when>
    <thetext>(In reply to af from comment #69)
&gt; (In reply to Jen Simmons from comment #65)
&gt; &gt; The Screen Wake Lock API now works in Home Screen Web Apps on iOS and iPadOS
&gt; &gt; 18.4 — which just shipped today.
&gt; &gt; 
&gt; &gt; https://developer.apple.com/documentation/safari-release-notes/safari-18_4-
&gt; &gt; release-notes#Home-Screen-Web-Apps
&gt; 
&gt; I just installed iOS 26.1, and this seems to have regressed.  It no longer
&gt; appears to be supported.

Please disregard - the issue was with our browser detection library.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>