James
James

Reputation: 2999

How to transfer NSdata from one iphone to another

How can I go about transferring a NSData object from 1 iphone to another? (It is an audio which I am looking to play out of iphone #2)

Upvotes: 1

Views: 460

Answers (3)

Coder404
Coder404

Reputation: 742

Options: 1. Gamekit Framework 2. Look at the open source application "Bump"

Upvotes: 1

Mat
Mat

Reputation: 7633

You could use the GameKit framework, you can use bluetooth to send data between iOS devices. Take a look at the Game Kit Programming Guide.

Upvotes: 1

isaac
isaac

Reputation: 4897

Of course there are various ways to achieve this.

My suggestion would be to look at Apple's GameKit library. This makes it trivial to establish a connection to another iOS device. You may connect via Bluetooth or Wifi (if all you need to do is 'trigger' a sound that already exists in the application bundle on both devices, bluetooth will work fine - if you actually need to transfer a sound file, you probably want to use a Wifi connection). You will have to implement the actual transmission mechanism/protocol yourself in either case.

Another option is to use Bonjour and pass your data over TCP/IP.

You may find this tutorial helpful: Networking and Bonjour on iPhone

Upvotes: 1

Related Questions