Core Bluetooth Overview
https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothOverview/CoreBluetoothOverview.html#//apple_ref/doc/uid/TP40013257-CH2-SW1iOS 7 SDK: Core Bluetooth - Theoretical Overview
http://code.tutsplus.com/tutorials/ios-7-sdk-core-bluetooth-theoretical-overview--mobile-20728http://code.tutsplus.com/tutorials/ios-7-sdk-core-bluetooth-practical-lesson--mobile-20741http://www.raywenderlich.com/52080/introduction-core-bluetooth-building-heart-rate-monitorCore Bluetooth Background Processing for iOS Apps
Use Background Execution Modes Wisely
Although declaring your app to support one or both of the Core Bluetooth background execution modes may be necessary to fulfill a particular use case, you should always perform background processing responsibly. Because performing many Bluetooth-related tasks require the active use of an iOS device’s onboard radio—and, in turn, radio usage has an adverse effect on an iOS device’s battery life—try to minimize the amount of work you do in the background. Apps woken up for any Bluetooth-related events should process them and return as quickly as possible so that the app can be suspended again.
Any app that declares support for either of the Core Bluetooth background executions modes must follow a few basic guidelines:
-
Apps should be session based and provide an interface that allows the user to decide when to start and stop the delivery of Bluetooth-related events.
-
Upon being woken up, an app has around 10 seconds to complete a task. Ideally, it should complete the task as fast as possible and allow itself to be suspended again. Apps that spend too much time executing in the background can be throttled back by the system or killed.
-
Apps should not use being woken up as an opportunity to perform extraneous tasks that are unrelated to why the app was woken up by the system.
For more-general information about how your app should be behave in the background state, see Being a Responsible Background App in App Programming Guide for iOS.
Although declaring your app to support one or both of the Core Bluetooth background execution modes may be necessary to fulfill a particular use case, you should always perform background processing responsibly. Because performing many Bluetooth-related tasks require the active use of an iOS device’s onboard radio—and, in turn, radio usage has an adverse effect on an iOS device’s battery life—try to minimize the amount of work you do in the background. Apps woken up for any Bluetooth-related events should process them and return as quickly as possible so that the app can be suspended again.
Any app that declares support for either of the Core Bluetooth background executions modes must follow a few basic guidelines:
- Apps should be session based and provide an interface that allows the user to decide when to start and stop the delivery of Bluetooth-related events.
- Upon being woken up, an app has around 10 seconds to complete a task. Ideally, it should complete the task as fast as possible and allow itself to be suspended again. Apps that spend too much time executing in the background can be throttled back by the system or killed.
- Apps should not use being woken up as an opportunity to perform extraneous tasks that are unrelated to why the app was woken up by the system.
For more-general information about how your app should be behave in the background state, see Being a Responsible Background App in App Programming Guide for iOS.
Heart Rate Monitor(Sample Code)
https://developer.apple.com/library/mac/samplecode/HeartRateMonitor/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011322-Intro-DontLinkElementID_2
Temperature Sensor(Sample Code)
https://developer.apple.com/library/ios/samplecode/TemperatureSensor/Introduction/Intro.html#/http://code.tutsplus.com/tutorials/ios-7-sdk-core-bluetooth-theoretical-overview--mobile-20728
댓글 없음:
댓글 쓰기