Screen sharing in iOS app?

Archana Chaurasia picture Archana Chaurasia · Dec 20, 2012 · Viewed 9.4k times · Source

I want share my application iPad screen with other devices which are running the same application.

More detail: My application is a meeting application. Now I want that those who are the participants of that particular meeting can my screen when I share my application screen.

Conclusion: I want to share my app screen with other devices which have running the same app, JUST like Skype screen share.

Answer

HDdeveloper picture HDdeveloper · Dec 20, 2012

You will be needing a server for this. Its a long process. Briefing you with the overall details

  • You get the information when users are loggedIn.
  • User will try to send the image to the server first.
  • Get the screenshots images continuously from the user screen.follow this link
  • convert the image to NSData.
  • From server detect the other user(to whom screen is to be shared.) send the data to that user. And convert the NSData into UIImage and update the UI accordingly.
  • Loop the process.

    // for taking screen shot

     UIGraphicsBeginImageContext(self.window.bounds.size);
        [self.window.layer renderInContext:UIGraphicsGetCurrentContext()];
        UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();
        NSData * data = UIImagePNGRepresentation(image);
        [data writeToFile:@"foo.png" atomically:YES];