0

I am new to iOS development, I want to write an iOS app that can exchange images between two devices. Can anybody direct me to good tutorial/sample code?

Khawar Ali
  • 3,462
  • 4
  • 27
  • 55
Jhondoe
  • 109
  • 2
  • 7

1 Answers1

1

IOS 7 introduces a great feature AirDrop. With AirDrop, you can easily share data with other nearby iOS devices. Also this feature allows you to share photos, videos, contacts, URLs, Passbook passes, app listings on the App Store, media listings on iTunes Store, location in Maps, etc. You can also programatically share photos with the help of AirDrop. Here is an example for displaying the AirDrop activity

UIActivityViewController *controller = [[UIActivityViewController alloc] initWithActivityItems:objectsToShare applicationActivities:nil];

NSArray *excludedActivities = @[UIActivityTypePostToTwitter, UIActivityTypePostToFacebook,
                                UIActivityTypePostToWeibo,
                                UIActivityTypeMessage, UIActivityTypeMail,
                                UIActivityTypePrint, UIActivityTypeCopyToPasteboard,
                                UIActivityTypeAssignToContact, UIActivityTypeSaveToCameraRoll,
                                UIActivityTypeAddToReadingList, UIActivityTypePostToFlickr,
                                UIActivityTypePostToVimeo, UIActivityTypePostToTencentWeibo];
controller.excludedActivityTypes = excludedActivities;

[self presentViewController:controller animated:YES completion:nil];

See the tutorial here

manujmv
  • 6,450
  • 1
  • 22
  • 35
  • 1
    If you want to go deeper into that, there are the Multipeer connectivity APIs https://developer.apple.com/library/ios/documentation/MultipeerConnectivity/Reference/MultipeerConnectivityFramework/Introduction/Introduction.html – Andrea May 13 '14 at 07:16
  • I appreciate the answers but, I am looking for images sending and receiving via socket programming – Jhondoe May 14 '14 at 06:32