Bluetooth LE and ANCS in iOS - ios

Can I develop a service on iOS to register with ANCS so that when iPhone gets a notification the service go through my device BT LE protocol to notify the band?
And I read at http://blog.punchthrough.com/post/63658238857/the-apple-notification-center-service-or-wtf-is. I see "ANCS is managed automatically by the iOS device, or “Notification Provider” as its known in ANCS parlance. What this means for you as a developer is that you won’t need to write code to manage ANCS on the iOS side." It means i don't need write code in iOS side that have to implement in my device BT LE ? Thanks for any answer.

Correct. As the link mentions, you use "service solicitation" to get the iOS device's attention while it is passively scanning.
You don't need to have an app running on the iOS device, you don't need to submit anything to the App Store--you don't even need to pay to become a developer.
Also, I should mention, your hardware design does not need to be submitted to the Apple MFi program.

Related

Would I be able to pair my iOS device with a custom bluetooth device if it gets MFI license?

The plan is to have a custom built Bluetooth device, which is not part of the standard bluetooth profiles (https://support.apple.com/en-us/HT204387), and also we can't go the BLE way (not my decision) and pair it with either an android or an iOS phone. It works OK for android of course, but cannot be connected to from an iOS phone, due to restrictions of Apple.
I understand we should enroll to the MFI program and have a license for our device so an iphone can be paired with it and a connection can be established. My concern is that how can I be sure that it will work as there seems to be no opportunity to try it without enrollment to MFI program.
Any help would be appreciated as I'm quite a rookie in this topic. Thanks a lot.
You must apply for MFi program just to get access to the Bluetooth APIs that you need. There is no other way without bypassing Apple's legal requirements.

Connect iOS device to Bluetooth device with SPP

I'm working on one watch which shows iOS device notification like..
Display Installed app notification
Display Call notification
Display Message notification.. etc
I have read some articles and came to know about GATT and ANCS, and this two itself enough to display iOS device notification on other bluetooth device.
Generic Attribute(GATT) Profile : https://developer.bluetooth.org/TechnologyOverview/Pages/GATT.aspx
Apple Notification Center Service(ANCS):
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Introduction/Introduction.html
Is that mean I do not need any iOS application to handle iOS device notification?
Currently my watch is built up with SPP, do I need to make any modification in that?
I also came to know that I have to apply for MFi Program(https://developer.apple.com/programs/mfi/).
is MFi necessary for My watch with the idea I have mentioned above?
Any suggestion will be appreciated.
Thanks in advance
SPP is classic BT whereas ANCS uses BTLE.
ANCS is free to use.
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Specification/Specification.html#//apple_ref/doc/uid/TP40013460-CH1-SW18

Test Bluetooth on iOS

I'd really like to start testing my iOS apps Bluetooth capabilities, but have run into a few problems:
I have a device made with a RN-42 module, but it's not the Apple version and I don't have the Apple authentication module at the moment (I ordered it, but shipping from China can take a while). I know what the messages will look like, but can't send them to my iPhone!
I can use the module with my Macbook, but not in the iOS simulator! Apple has taken down all of the documentation related to getting the iOS < 7.0 to use a separate bluetooth dongle, and my efforts have left my 6.1 simulator endlessly spinning on the bluetooth screen.
I'm new to using Bluetooth, so this may be a dumb question...
Is there a way of getting a bluetooth client device (I have a Mac, another iPhone, and an Android tab) to act as a server module that can send (and receive) Bluetooth data to my iPhone?
Client/Server as per developer.bluetooth.org
Thanks!
Not 100% sure your meaning of "server module". But in CoreBluetooth, you can use CBPeripheralManager to broadcast data to other iOS or Mac apps.
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/CBPeripheralManager_Class/Reference/CBPeripheralManager.html
If you're using standard Bluetooth (i.e. not Bluetooth LE or Bluetooth Smart or whatever you want to call it), you'll need to enroll in the MFI program or work with an MFI certified device (such as a Redpark cable) and use the External Accessories library provided by Apple. If you're using Bluetooth LE, you can use the Core Bluetooth library provided by Apple. If you fall into neither of those cases, sorry, you can't use Bluetooth on iOS.

Connecting to a Bluetooth device from iOS, no MFi

The vibe I'm getting from Stackoverflow and the internet at large is that unless I'm using an LE device, any Bluetooth device I make for an iOS app must be MFi certified.
However, on the MFi FAQ page, I found this line:
...developers of accessories that rely solely on standard technology
(e.g., Bluetooth Low Energy or standard Bluetooth profiles) do not
need to join the MFi Program.
My device will be able to use the standard Bluetooth profile File Transfer Protocol (FTP).
Now this sounds like some conflicting advice to me, or perhaps I'm just not understanding correctly. So, having provided the above evidence, I'm just going to ask outright: Can I write and publish an iOS app that connects to a proprietary Bluetooth device using the standard Bluetooth profile FTP without certifying my device as MFi? And if so, what details, caveats, etc do I need to know?
The new Bluetooth 4.0 Low Energy (hereafter BLE 4.0) specification which is implemented in Apple's latest iOS devices does allow one to create app-specific profiles and connect to BLE 4.0 devices without jailbreaking, using an approved Bluetooth 2.1 profile, or becoming part of Apple'd MFI program and using the previously required MFI cryptographic chips.
In other words with the proper BLE 4.0 compatible bluetooth radios you can create wireless devices that connect to iOS apps without having the device pre-approved by Apple. However, you must write a custom app for the device, and Apple still holds the ability to reject that app if they want to. So they still control this to a great degree. This is essentially Apple's answer to the Android ADK, while not fully relinquishing the ability to shut down apps and devices they don't like.
Your app must include specific XML schema for your app's bluetooth profile, and use CoreBluetoothFramework APIs, so it's very obvious to Apple during the app approval process that your app connects to a device. If your app does not work without the device present, then it's likely to be rejected if you are not part of the MFI program, as Apple cannot test the app without your device. The apps that appear to be successful in passing this test use the device as an accessory to app functionality, rather than a requirement. For instance an exercise app might connect to a BLE 4.0 heart rate monitor, but the app doesn't depend on it.
Some apps seem to be getting around this by displaying simulated, or online information in place of the device information when no device is present. Thus the app can be tested without the device, and functionally works when the device is present.
You can find out some successful efforts online:
http://blog.makezine.com/2012/03/19/bluetooth-4-0-from-arduino-to-iphone-no-jailbreaking-no-mfi/
BlueGiga in particular has been pushing their devices specifically for this use, so there are probably forums and support for this elsewhere.
Keep in mind that the devices that currently support BLE 4.0 are limited, and currently only include
iPhone 4S and later iPhones
recent MacBook Air, Mac Mini
iPad (3rd generation and later, and iPad mini)
Macbook Pro Retina
There may be other Apple devices that support this standard, it's something Apple is advertising openly on each product's technical specifications page so it's easy to find for current products.
That line is referring to standard profiles supported natively by ios devices, such as HFP or A2DP. If you build a headset device that does HFP, the iphone will be able to connect to it and route your call to the headset without the headset being part of MFi.
If you want to write an app that does other things with bluetooth, inlcuding FTP, you would have to use MFi.

Is it possible to implement this bluetooth feature in iOS

I am considering implementing in an app the bluetooth feature to read and display the battery life of a connected bluetooth peripheral (i.e. keyboard, headset...)
Is there an API or objects that can implement this in the iOS SDK or can someone tell me how this can be done, if it can be done ?
Yes, but more than likely you will need to be a member of the Made for iOS program. You can connect to a device that is Bluetooth Low Energy without being part of the MFi program but it only available for peripherals that support and the iOS device must be the iPhone 4S or the new iPad. Also reference this stackoverflow question.

Resources