Post

Replies

Boosts

Views

Activity

How to refresh my iOS-App regularly?
Hi, I tried to figure out how I can get my iOS-App to refresh regularly if it is in the background. I thought about WhatsApp. Even if it is closed it updates itself in the background and checks for new messages. But how does it do this? I would like to observe the battery charging level. But my app should also observe it when I switched the screen off (locked my iPhone). I don't know how to do this. A Timer will not work, it is not available if the app is in the background. To clarify: I know how to read the battery level but I don't know how to observing the battery level when the app is in the background. I tried to learn something about the Background App Refresh function but I had no success.
1
0
379
Jul ’23
Permission to read a local file
I have a question about the file system of macOS and iOS. I tried to play an audio from the local download folder. But I failed because my application seems not to have the permission to read it. I get the error Error Domain=NSOSStatusErrorDomain Code=-54 "permErr: permissions error (on file open)". So I think it's something different from other systems like Windows. How are these permissions handled and how can I get the permission to read a file? I read something about Sandboxing but my app doesn't even start when I turn on "App Sandbox" in the settings.
4
0
1k
Jul ’23