构建过程很好,但然后我得到一个黑屏。我试着在应用程序委托中放置一个断点,但似乎并未运行。构建成功,但黑屏
它可能是什么?
这是我的didFinishLaunchingWithOptions方法:
- (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 –
你可以显示你的'AppDelegate'的'didFinishLaunchingWithOptions'方法吗?这可能是一个错误。 – Krunal
重新启动你的模拟器 –