Note that there are some explanatory texts on larger screens.

plurals
  1. POApp works in simulator, white screen on device
    text
    copied!<p>My app had the default MainWindow.xib with a NavigationController in it. Now I recently switched it to a xib-less main window and RootViewController (subclass of UIViewController) similar to the example provided at the bottom of <a href="http://monotouch.net/Tutorials/HelloiPhone" rel="nofollow">HelloiPhone</a>:</p> <p>My Main.cs:</p> <pre><code>namespace MyApp { public class Application { static void Main(string[] args) { UIApplication.Main(args, null, "MyApp.AppDelegate"); } } public class AppDelegate : UIApplicationDelegate { UIWindow window; // This method is invoked when the application has loaded its UI and its ready to run public override bool FinishedLaunching(UIApplication app, NSDictionary options) { RootViewController rootViewController = new RootViewController(); UINavigationController navigationController = new UINavigationController(rootViewController); navigationController.LoadView(); navigationController.NavigationBar.BarStyle = UIBarStyle.Black; window = new UIWindow(UIScreen.MainScreen.Bounds); window.AddSubview(navigationController.View); window.MakeKeyAndVisible(); return true; } // This method is required in iPhoneOS 3.0 public override void OnActivated(UIApplication app) { } public override void WillTerminate(UIApplication app) { //Save data here } } } </code></pre> <p>My Info.plist:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;UILaunchImageFile&lt;/key&gt; &lt;string&gt;images/logo_320x480.png&lt;/string&gt; &lt;key&gt;UIStatusBarStyle&lt;/key&gt; &lt;string&gt;UIStatusBarStyleBlackOpaque&lt;/string&gt; &lt;key&gt;UISupportedInterfaceOrientations&lt;/key&gt; &lt;array&gt; &lt;string&gt;UIInterfaceOrientationPortrait&lt;/string&gt; &lt;string&gt;UIInterfaceOrientationPortraitUpsideDown&lt;/string&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/plist&gt; </code></pre> <p>On the simulator, everything seems well. At first, the launching image is displayed and finally the rootView appears after a few seconds.</p> <p>However, when deploying to the device (iPod touch), the rootView won't display. Instead, the screen turns to white after the launching image. (Status bar at the top is still there)</p> <p>Is there something wrong with that approach? Am I missing something?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload