Screen sharing in iOS app? [closed]

2019-03-16 20:33发布

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.

3条回答
再贱就再见
2楼-- · 2019-03-16 20:43

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];
    
查看更多
再贱就再见
3楼-- · 2019-03-16 20:58

Ok, what you need to do basically is to record the screen (you can use this iOS Screen Capture View) and stream it to the other device.

查看更多
Anthone
4楼-- · 2019-03-16 20:58

you can do this exchange the image stream(Current screen image context / Captured current screen) for both device vice-versa. Means transfer current context of your screen to connected device and make this process like continues sending/receiving like live stream of data.

Screen sharing working you get idea from following links.

1) Desktop sharing
2) Remote access of device

查看更多
登录 后发表回答