First up, don’t ship an app and a screen saver with the same bundle ID. The bundle ID is meant to uniquely identify your code , and using it for two different things is generally a bad idea.
Second, you wrote:
I have a screen saver … which load an html file from
How does it load that HTML file? In a web view? If so, I recommend that you start this investigation by cutting the web view out of the equation. Web views, and especially the modern
WKWebView, are a tricky prospect with regards file system access.
Instead, use a normal file system API (for example,
dataWithContentsOfURL:options:error:) and see if that’s able to access this shared file. When doing that, consider the following;
Make sure the URL is the same in both cases. It’s possible that you might be getting different URLs in different contexts.
If it fails, it should return an error. What is that error?
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
 Indeed, the bundle ID becomes your code signing identifier (unless you explicitly override that) and that value, along with your Team ID, is what the OS uses to actually identify your code.