views:

513

answers:

4

Hi,

I am new to iPhone development. I created an iPhone application, using which user can create a Business Card kind of UI in TableView. I want to know how can i send a Business Card(which i created programmatically) data into another iPhone via SMS? I want to know the technology which i should use to sending such thing from one iPhone to another via SMS or Email, i shouldn't use WiFi/Bonjour service which can send only upto nearest area.

thanks.

Calve/

+2  A: 

SMS wasn't designed for this, and so it probably won't work like you're describing. Here's what I would do:

You have your BusinessCard object. Upload it to your servers and give it a unique identifier. This identifier is what should be sent to the other person, whereupon they can use the identifier to download the appropriate card.

If you wanted to be super cool about it, you could maybe construct a URL like: "card://12345678890", where 1234567890 is the identifier. You could then set your app up to respond to "card://" urls. Then send the card URL around via SMS. When a user taps on the link in their SMS app, it'll automatically open up your app (providing that they have it downloaded and installed, and that nothing else has registered "card://").

For additional awesomeness, you can allow people to create "shortcuts" to their identifier (like bit.ly), so they can send around "card://my-cool-business" instead of "card://1234567890".

Dave DeLong
Or just re-implement the Bump™ app.
felideon
@felideon That's a cool app. However, it seems like Calve wants to support information exchange beyond the local network.
Dave DeLong
I'm sorry, i don't know how to reply for Mr.Dave DeLong using this forum as i didn't find Reply option anywhere, so i answered myself for replying Mr.Dave DeLong suggestion. Mr.Dave DeLong please respond to my message above as Answered.
Calve Martin
What do you mean by local network? I can bump with anyone who has an iPhone, anywhere I am.
felideon
@felideon I was unaware of that. =)
Dave DeLong
A: 

I don't want to upload my business card anywhere. I don't have server and all.

First device: Source device

User will create a business card(name, email etc) which may have existing some nice design pattern from my app.

Then he will type an Email address and press 'Send' to send to another person.

Second device: Destination device

The other person who is running my app, will receive email with the format that i sent and based on design chosen in source device, destination device(second person device) will also pick that same design from existing design pattern available from my app and show the business card.

I'll make the logic to co-ordinate the data in some way. But.. Just to say simply, can i send data from one iPhone device to another via Email or SMS? If, yes, what technology that i should use, for example for peer to peer we should use Bonjour service on iPhone development.

Calve Martin
+1  A: 

You could encode your business card data as a base64-encoded custom URL, assuming it isn't too large. An example of doing this kind of URL-driven data exchange (which does not require uploading anything to a server) can be found here.

I doubt that you'll be able to encode enough information in the tiny size of an SMS message (unless you were just sending compressed text, no images), but this approach would work well with email.

Brad Larson
Thanks Mr.Brad Larson.
Calve Martin
This is probably the simplest method to go with. Throw up a compose dialog with the contact details an an "Add to Contacts with <YourAppName>" link pointing to yourappname://base64encodeddata
rpetrich
A: 

Where MMS is available you can send a VCard formatted object attachment by that route. The receiving phone will detect the attachment format and allow you to manipulate it.

This will also work to non iPhone devices.

Kevin