简体   繁体   English

application:didFinishLaunchingWithOptions:在iPad上没有被调用

[英]application:didFinishLaunchingWithOptions: not getting called on iPad

I have a project I am working on to get it ready for Retina 4. It used MainWindow.xib files (one for iPhone and one for iPad) previously, but I have removed those (and the references to them in the project settings) and replaced it with allocating the window in the application's application:didFinishLaunchingWithOptions: method. 我有一个项目正在为Retina 4做好准备。它以前使用MainWindow.xib文件(一个用于iPhone,一个用于iPad),但是我删除了这些文件(以及在项目设置中对它们的引用),并且替换为在应用程序的application:didFinishLaunchingWithOptions:方法中分配窗口。 Everything is working fine on iPhone at old and new resolutions however when I tried it on iPad (simulator and device) The application:didFinishLaunchingWithOptions: never gets called... I put an NSLog at the top of the method to make sure it wasn't just silently crashing some how but I never get the log output. 在旧的和新的分辨率下,iPhone上的一切都可以正常工作,但是当我在iPad(模拟器和设备)上尝试使用该应用程序时:didFinishLaunchingWithOptions:从未调用过……我将NSLog放在该方法的顶部,以确保它不是“只是默默地崩溃了一些方法,但是我却没有得到日志输出。 App launches and just goes black. 应用启动,然后变黑。 I have tried resetting the simulator, but again it happens on device and simulator and that had no effect. 我尝试过重置模拟器,但是再次发生在设备和模拟器上,并且没有任何效果。 This happens on iOS 5, 5.1 and iOS 6 on both retina and non retina, as well as on devices so it doesn't seem to be an OS or simulator problem. 这种情况发生在视网膜,非视网膜的iOS 5、5.1和iOS 6以及设备上,因此这似乎不是操作系统或模拟器的问题。 The exact same code (universal project) works on iPhone fine so I'm a bit stumped as to how it can get confused and ignore the application delegate... 完全相同的代码(通用项目)可以在iPhone上正常工作,因此我对如何使其混淆并忽略应用程序委托感到有些困惑...

There are various ways to set the AppDelegate class. 可以通过多种方式设置AppDelegate类。 The NIB is one, the main routine another: NIB是一个,主要例程是另一个:

main.m
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 application:didFinishLaunchingWithOptions:在应用崩溃时被调用的方法 - application:didFinishLaunchingWithOptions: method getting called on app crash application:didFinishLaunchingWithOptions没有被调用 - application:didFinishLaunchingWithOptions is not being called application(_ application: UIApplication, didFinishLaunchingWithOptions) 未在启动时调用 - application(_ application: UIApplication, didFinishLaunchingWithOptions) not called on start up URL方案:application:didFinishLaunchingWithOptions :,未调用handleOpenURL - URL schemes: application:didFinishLaunchingWithOptions:, handleOpenURL not called 远程通知“ application:didFinishLaunchingWithOptions:”方法未调用 - Remote Notification 'application:didFinishLaunchingWithOptions:' method not called 在什么情况下调用了application:didFinishLaunchingWithOptions :? - In what case that application:didFinishLaunchingWithOptions: been called? 甚至在申请之前我的应用程序在iPad上崩溃:didFinishLaunchingWithOptions: - My App crash on iPad before even application:didFinishLaunchingWithOptions: 应用程序 openURL 在 didFinishLaunchingWithOptions 几秒钟后被调用 - Application openURL gets called a few seconds after didFinishLaunchingWithOptions 我的RootViewController的viewDidLoad被application:didFinishLaunchingWithOptions:和applicationDidBecomeActive调用: - viewDidLoad of my RootViewController gets called by application:didFinishLaunchingWithOptions: and applicationDidBecomeActive: 如果应用程序被杀死并立即打开,则不会调用 application(:didFinishLaunchingwithOptions:) - application(:didFinishLaunchingwithOptions:) does not get called if apps is killed and opened immediately
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM