|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 要使用百度地图,请先启动BaiduMapManager | 
|---|
|  |  |  | self.mapManager = [[BMKMapManager alloc]init]; | 
|---|
|  |  |  | BOOL ret = [self.mapManager start:@"ZiqQxvKGjZVNbITouYn7dIwDjb1CbKcy" generalDelegate:self]; | 
|---|
|  |  |  | if (!ret) { | 
|---|
|  |  |  | NSLog(@"manager start failed!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //    BOOL ret = [self.mapManager start:@"ZiqQxvKGjZVNbITouYn7dIwDjb1CbKcy" generalDelegate:self]; | 
|---|
|  |  |  | //    if (!ret) { | 
|---|
|  |  |  | //        NSLog(@"manager start failed!"); | 
|---|
|  |  |  | //    } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 添加网络监听 | 
|---|
|  |  |  | self.hostReachability = [Reachability reachabilityWithHostName:@"www.baidu.com"]; | 
|---|
|  |  |  | 
|---|
|  |  |  | [self.internetReachability startNotifier]; | 
|---|
|  |  |  | [self updateInterfaceWithReachability:self.internetReachability]; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // Override point for customization after application launch. | 
|---|
|  |  |  | UIUserNotificationType types = UIUserNotificationTypeBadge | | 
|---|
|  |  |  | UIUserNotificationTypeSound | UIUserNotificationTypeAlert; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | UIUserNotificationSettings *mySettings = | 
|---|
|  |  |  | [UIUserNotificationSettings settingsForTypes:types categories:nil]; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(mySettings != nil) | 
|---|
|  |  |  | { | 
|---|
|  |  |  | [[UIApplication sharedApplication] registerUserNotificationSettings:mySettings]; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //_currentDevice = _selectedDevice.mac; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | [self showLoginPage]; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //异常对象:NSException | 
|---|