2

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;
}
Andreas Prang
  • 2,187
  • 4
  • 22
  • 33

2 Answers2

1

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.

Chris Miles
  • 7,346
  • 2
  • 37
  • 34
0

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];

epinom
  • 11
  • 2