Capture iPhone Screen From My App and record Video

纵饮孤独 提交于 2019-12-04 06:14:28

问题


I am just curious to create an app which records video of iphone screen or capture images of iphone screen. I know that Apple doesn't allow such kinds of apps on the app store and I have no intention of doing that. I can upload my app on Cydia if I want, but my current objective is just to develop an app with the capabilities of capturing video of the iphone scree n or taking screen shot of device.

Let's say that I am playing a game and I want to record it so I can show my friend how well I can play. If the game itself has some option to record video (which generally is not available) than that would be great. I want to develop that kind of feature.

I am interested to know how to do this in jailbreak devices. Similar to the Display Recorder app from Cydia.

EDIT:

I want to capture the screen with a 5 sec delay.. I minimize my app and enter a game, then the screen shot will be of that game. Regardless which app is running it just needs to capture a screenshot of the iDevice's screen.


回答1:


hi you can take screenShot using this code..

UIGraphicsBeginImageContext(self.view.window.frame.size);
    [BackView.layer renderInContext:UIGraphicsGetCurrentContext()];

UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil);



回答2:


I have done for my client who wanted. I also recorded video for Facebook screenCast for app review.

All your need is:

An iOS device running iOS 8 or later A Mac running OS X Yosemite or later Lightning cable (the cable that comes with iOS devices)

No need for jailbreak, a third party app or additional hardware.

Here are the steps to do it:

  1. Connect your iPhone or iPad to your Mac via the lightning cable
  2. Open QuickTime player
  3. Click File then select ‘New Movie Recording’
  4. A recording window will appear (with you in it, most likely). Click the little arrow of the drop down menu in front of the record button, then select your iPhone or iPad
  5. Click the Record button. Now perform the tasks on your iOS device that you want to record. AND SAVE.

Here is the link for more ways:




回答3:


@Kapil.. To achieve this, privates apis can be used. But obviously, apple does not allow it. So your app will get Rejected. If you are doing this for personal use, then you can use apis like IOSurface. Hope my answer will help you.




回答4:


Just simply hold the power button and home button at the same time and you can see the captured screen inside your photo album.



来源:https://stackoverflow.com/questions/11928810/capture-iphone-screen-from-my-app-and-record-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!