Sending contact over bluetooth - ios

Hello i was wondering how to send a contact over bluetooth to another device. I used this code but its from an image. I just want to know how to send the contact.
https://github.com/unixpickle/ImageTransfer
Thanks in advance!

Look at the Project BTLE Transfer Bluetooth of Apple Doc
It is a demo Project that transfers Text whatever you write on Peripheral Device to Central Device.
In same manner you can transfer your Contact in place of Text with encoding
I hope this will solves your problem.

Related

iOS - CoreBluetooth

Is there a way to find out what type of device it is that I have scanned?
After iOS 7?
For instance, APPLE, DELL, LENOVO, ect.
Thanks
You can check to see if the device you have connected to implements the Device Information service. If it does then you can read the Manufacturer Name characteristic.
There is no way of determining this information without actually connecting to the peripheral.
This would only be possible if the product developer included this in the advertisement data or within a GATT service.
You can observe advertisement data when CBCentralManager discovers peripherals, see documentation here.
Information like this might be found under the CBAdvertisementDataManufacturerDataKey dictionary key.

How to ask for authentication before connect to devices using bluetooth?

I want to make demo application, which contains following features.
search and show device list in my device Bluetooth range.
connect(pair) selected devices.
then share string data.
For doing that I am using core Bluetooth framework(Central and peripheral classes). using that I am able to search devices, connect devices and transfer string data also.
but I am not able to authenticate devices before pairing(when I call connect method it is directly shown me connected status). how is it handled in ios?
also please suggest me I am on the right path or I need to use another library to implement this functionality.
For anyone else beating their head against a wall, I have the solution to this issue. It's as simple as setting the AUTHENTICATION required flag for a characteristic on your BLE device. Once that flag is set, you need to attempt a READ from that service / characteristic using the iOS device. Once the read is requested, the BLE device will send back a failure message which then prompts iOS to display the PAIRING / BONDING popup. After that, you're golden.
Here is an example of a Cypress BLE device permission group. The settings are similar for most BLE embedded devices out there.
yes it is possible to ask pairing request from BLE device to ios.
I followed below steps to make ios app to ask for pairing.
edited my ble app to return error code 'RBLE_ATT_ERR_INSUFF_AUTHEN' using gatt write response function.
attempted a write from ios app then i got a prompt to enter pairing key.
used the randomly generated pairing key by BLE device to pair.
Paulw11's comment also helped me to solve that problem,
Regards
Bharath GK

How to Send Live Sensor Data to iOS with BLE

I am looking for a BLE that could send live sensor data from arduino to iOS custom apps, not the app that is already in the app store. I would like to create my own apps to receive the sensor data.
Or are there any other ways to achieve it?
Please help. Thank you.
You want to use Core Bluetooth. It's a fairly low-level API that lets you set up one device as a "central" and another device as a "peripheral". You can then transfer data back and forth. Do a search on "Core Bluetooth Overview" in the Xcode docs to get started.
As Computer_ACE suggested you should also check out the Arduino Stack Exchange, or you might want to go to the Arduio forums at https://www.arduino.cc.
EDIT
A quick google search on "iOS Arduino BLE example" found this link:
https://www.google.com/search?client=safari&rls=en&q=ios+arduino+BLE+example&ie=UTF-8&oe=UTF-8

Communicating using Core Bluetooth

I am new to Objective c and I want to send simple strings from an iPhone to an arduino an vice versa with Bluetooth. I have read apples information about Core Bluetooth, but I am having trouble understanding it. As I said, all I need the iPhone to do is: 1) connect to the BLE device of the arduino. 2) Send instructions (in the form of strings) 3)get a response from the arduino when the instructions have been carried out, so that the next set of instructions can be sent. I would be very happy if somebody is able to help me with this project
Thanks
You should follow the wwdc presentation on core bluetooth.
You should probably start here
I suggest operate your device with YMSCoreBluetooth.
The basic step to operation bluetooth device is:
Search all nearby device by blue tooth scan, you will find all nearby device.
Stop your scan. Connect one of the devices found in response.
Discover all services on the device.
Discover all character in service found by service discover action.
Write your content into character found in 4.
You can read character value from device.
YMSCoreBluetooth let you write your logic in one code block instead of separate delegate.

How do I program a bluetooth module to broadcast a text string to an iOS device?

I'm trying to figure out how to send a simple text string from a BlueGiga BLE112 bluetooth module to an iOS device using BGScript. Is this possible? If so, what steps do I need to take to get this to work. Any help will be greatly appreciated.
One way would be to create a custom GATT service with a characteristic containing your string. Then the iOS device could connect and read it. There is also the standard Device Information service which contains various string characteristics such as manufacturer name, serial no., device id etc. Maybe you could use that if it is suitable for your application. Your BGSript code among other things could set the value of the characteristic at run time if it is not constant. You can create the service using Bluegiga's Profile Development Kit. Documentation can be found here BLE112 Documentation and Software.

Resources