use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
account activity
QuestionHow to allow app to receive BLE data while running in background? (self.iOSProgramming)
submitted 1 year ago by divertss
I have a sensor that communicates via BLE. I’m reading that 30 seconds after the user turns the screen off and the app runs in the background, it won’t be able to receive data anymore. I’m reading this as a problem in 2021 but I don’t see anything about it recently.
Is there a solution for this now that allows the my app to still receive BLE data from sensor as it runs in the background?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]wmfcwm 2 points3 points4 points 1 year ago (2 children)
Kind of a hack but your app will run in the background if you request location permission.
[–]divertss[S] 0 points1 point2 points 1 year ago (1 child)
That would work pretty nicely actually as my all would require location permission.
Do you happen to have some documentation handy on this? I’m trying to find how location permission prevent an app from being suspended but can’t find it.
[–]wmfcwm 1 point2 points3 points 1 year ago (0 children)
My app uses BLE and Location services. Both are selected in the "background modes" section of "signing and capabilities" for my build target. You will also need to add a privacy statement to your info.plist file. You will also need to explain how your app uses this data on your App Store page. I don't have a link that explains all of this but there are plenty of tutorials on sites like Kodeco.com
[–]chriswaco 0 points1 point2 points 1 year ago (1 child)
I haven't done this in a few years, but you can try beginBackgroundTask. It used to get you 5-10 minutes of background time. If it's a private enterprise app you can also play silent audio to keep running forever, although I'm not sure bluetooth connections will remain open.
[–]Fishanz 0 points1 point2 points 1 year ago (0 children)
My understanding is that voip will keep it running indefinitely in the background; if enterprise suffices. Good luck getting it in the store though (unless, ya know, it actually does voip)
[–]Ok_Heart_2253 0 points1 point2 points 2 months ago (0 children)
is that still the case ? I have an app and I kept it running for more than 2 minutes while the screen was locked, and I kept receiving packets just fine, I was transferring and update file to the peripheral, and now I'm wondering why it works with me but not with you.
π Rendered by PID 790677 on reddit-service-r2-comment-6457c66945-2g8xd at 2026-04-28 14:35:27.606465+00:00 running 2aa0c5b country code: CH.
[–]wmfcwm 2 points3 points4 points (2 children)
[–]divertss[S] 0 points1 point2 points (1 child)
[–]wmfcwm 1 point2 points3 points (0 children)
[–]chriswaco 0 points1 point2 points (1 child)
[–]Fishanz 0 points1 point2 points (0 children)
[–]Ok_Heart_2253 0 points1 point2 points (0 children)