Closed TFinateri closed 8 years ago
I added the line "Application does not run in the background = "NO"
" to info.plist, but it seems that it didn't work. When I let the app execute in the background, it will still lose connect with other phones. I cannot figure out why right now, maybe we can talk about this tomorrow afternoon.
I found another site, this time Apple developer, and I am reading up on the documentation of Background Execution. If anybody wants to take a look, it is here:
A concern right now is that if the app supports Bluetooth communication in peripheral mode through the Core Bluetooth framework, then using this during background execution requires user authorization. (found in table 3-1 in that link). If I am incorrect and the app doesn't use Bluetooth communication in peripheral mode, then I don't see a UIBackgroundMode that allows our app to work.
Hmm. Multipeer Connectivity stuff is wrapping up quickly; once that is done, I'll jump on over to this issue with you. We may be able to get away with using the "background fetch" protocol, but more to come.
Who is on this now?
Good question. It'll probably be me.
Everything needs to run in the background
A first step on this issue was made with 7bca845c2bb5f7e4b5bd16ca45d73c99e0c622c1
All that is left to do is test the background functionality. It ain't perfect, but it is good.
I have found some ways to let the app continue to execute while in the background (apparently the default is to kill the app and reallocate all of its memory back to the phone), and it seems relatively simple. The info.plist must be changed (slightly), and I am not sure how to specify which methods should execute while in the background.
Here are a couple of links for it: http://stackoverflow.com/questions/30426117/running-ios-application-in-the-background-new-developer
https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
I can try to edit and test it tomorrow afternoon at the Dude or BBB, but I figure the solution might be simple enough that if someone has the free time, they can check what exactly happens when that line is added tonight.