Iphone 构建成功但黑屏
构建过程很好,但是我得到了一个黑屏。我尝试在应用程序委托中设置断点,但它似乎没有运行 可能是什么 这是我的didFinishLaunchingWithOptions方法:Iphone 构建成功但黑屏,iphone,xcode,Iphone,Xcode,构建过程很好,但是我得到了一个黑屏。我尝试在应用程序委托中设置断点,但它似乎没有运行 可能是什么 这是我的didFinishLaunchingWithOptions方法: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //Init Airship launch options NSMutableDictio
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//Init Airship launch options
NSMutableDictionary *takeOffOptions = [[[NSMutableDictionary alloc] init] autorelease];
[takeOffOptions setValue:launchOptions forKey:UAirshipTakeOffOptionsLaunchOptionsKey];
// Create Airship singleton that's used to talk to Urban Airship servers.
// Please populate AirshipConfig.plist with your info from http://go.urbanairship.com
[UAirship takeOff:takeOffOptions];
// Register for notifications
[[UAPush shared] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
usersData = [PlayersData sharedInstance];
//[usersData cleanUserDefauts]; // --- use to clean user defaults
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
self.loadingPageVC = [[LoadingPage alloc] initWithNibName:@"LoadingPage" bundle:nil];
self.window.rootViewController = self.loadingPageVC;
[self.window makeKeyAndVisible];
ConnectionManager *connectionManager = [ConnectionManager sharedInstance];
NSLog(@"Connection statement: %@",[connectionManager checkConnection]);
if ([[connectionManager checkConnection] isEqualToString:@"connected with wifi"] || [[connectionManager checkConnection] isEqualToString:@"connected with wwan"] ) {
[connectionManager getLocation];
}
return YES;
}
有时候(很少)XCode的行为会有所不同
不需要再发射任何东西。只要遵循下面给出的步骤,你就会达到你想要的
1. Go to /Users/<MAC_NAME>/Library/Application Support/iPhone Simulator/<SIMULATOR_VERSION>, delete all & run app
1。转到/Users//Library/Application Support/iPhone Simulator/,全部删除并运行应用程序
享受编程 我想您可能已将xib名称从
ViewController
更改为LoadingPage
如果是这样,那么您必须从.xib中授权它。从右上角。像
我刚刚提出我的意见,这可能是你的解决办法。如果您已成功使用另一个,请告诉我……:)好的!这个问题解决了
很明显,我的同事改变了一个简单的词,把一切都搞砸了
他让appDelegate
从UIApplication
继承,而不是从UIResponder
继承
现在它可以工作了。您需要重新启动Xcode您可以显示您的
AppDelegate
的didFinishLaunchingWithOptions
方法吗?也许这里面有一个错误。是的,正如Goti所说,试试didFinishLaunchingWithOptions。从那里尝试NSLog或断点。如果不删除/Library/Caches/folder的内容并重新启动Xcode。你会在supporting files->main.m中设置断点吗?好的,我尝试过清理、重新启动Xcode、重新启动模拟器,但没有成功,我重新启动了计算机……也没有成功。我尝试过,但当我单击“播放”时,它会生成并立即停止创建.app还是.ipa?现在,我只想测试我的应用程序。现在不需要IPA。你的模拟器会弹出吗?弹出是什么意思?没有尝试过类似的东西这是我项目的一个老部分,现在已经工作了几个月:)这不是问题