Andreas Prang
Andreas Prang

Reputation: 2217

mirroring iPad screen to VGA

I tried mirroring the screen of a simple new TabBarApplication with iphoneos-screen-mirroring for iPad:

http://code.google.com/p/iphoneos-screen-mirroring/

Everytime (also without including the code) if I try to activate the TV-out in Simulator mode the app crashes without errors.

If the external TV-out is activated it staies black (code includet).

appDelegate:

#import "iPadVGAAppDelegate.h"
#import "UIApplication+ScreenMirroring.h"


@implementation iPadVGAAppDelegate

@synthesize window;
@synthesize tabBarController;


#pragma mark -
#pragma mark Application lifecycle

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    [[UIApplication sharedApplication] setupScreenMirroringWithFramesPerSecond:20.0];

    // Add the tab bar controller's current view as a subview of the window
    [window addSubview:tabBarController.view];
    [window makeKeyAndVisible];

    return YES;
}

Upvotes: 2

Views: 1582

Answers (2)

epinom
epinom

Reputation: 11

Take a look here http://www.touchcentric.com/blog/archives/123

Rob Terrell's TVOutManager is the solution.

The next line is all your need: [[TVOutManager sharedInstance] startTVOut];

Upvotes: 0

Chris Miles
Chris Miles

Reputation: 7516

I saw the same behaviour. I think the technique it uses means you have to test on a real device. The same code on a real device (iPad) for me worked fine.

Upvotes: 1

Related Questions