David,
From the documentation:
“If your app uses push notifications to notify the user of the availability of new content, you can use those push notifications to trigger the download of that content in iOS 7 and later. You enable support for remote notifications from the Background modes section of the Capabilities tab in your Xcode project. (You can also enable this support by including the UIBackgroundModes key with the remote-notification value in your app’s Info.plist file.) When this value is present and a push notification arrives on a device, the system sends the notification to your app (launching it if needed) and gives it a few moments to process the notification before displaying anything to the user. You can use those few moments to download content related to the push notification and be ready to display it to the user."
“When this method is called, your app has up to 30 seconds of wall-clock time to perform the download operation and call the specified completion handler block. In practice, your app should call the handler block as soon as possible after downloading the needed data. If you do not call the handler in time, your app is suspended. More importantly, the system uses the elapsed time to calculate power usage and data costs for your app’s background downloads."
Your use case is interesting. I highly doubt that this would be an “abuse” of policy as when you fire this method you could theoretically retrieve a new CBUUID from a server and then do a reset the services you are scanning for at that point. If you implement the persisting bluetooth methods that are available in iOS 7 as well, it should pick up on these new services and continually search for them even when your app gets suspended again.
The point of these new methods is to retrieve new data and update UI in the background so when a user returns to their app they already have the latest and greatest. Your issue is that you’ll depend on the user APPROVING the notifications in order to run in the background and update your Central Manager.
- Steve Jablonski p. (814) 720-9067
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|