在第一次运行应用程序时,iphone将在iOS中重新启动

时间:2014-01-23 10:13:32

标签: ios iphone objective-c

我面临一个难题。当我在iphone 5s上运行我的应用程序时,我的iphone将在第一次重启(Apple徽标出现),但随后再次运行我的应用程序,它可以正常运行。它只是在第一次运行时运行并在iphone 5s上运行(iphone 4s和iphone 5不会遇到此问题)。当它重新启动时,Xcode控制台显示消息错误:

 dyld`_dyld_start:
0x2befd028:  mov    r8, sp
0x2befd02c:  sub    sp, sp, #16
0x2befd030:  bic    sp, sp, #7
0x2befd034:  ldr    r3, [pc, #112]            ; _dyld_start + 132
0x2befd038:  sub    r0, pc, #8
0x2befd03c:  ldr    r3, [r0, r3]
0x2befd040:  sub    r3, r0, r3
0x2befd044:  ldr    r0, [r8]
0x2befd048:  ldr    r1, [r8, #4]
0x2befd04c:  add    r2, r8, #8
0x2befd050:  ldr    r4, [pc, #88]             ; _dyld_start + 136
0x2befd054:  add    r4, r4, pc
0x2befd058:  str    r4, [sp]
0x2befd05c:  add    r4, sp, #12
0x2befd060:  str    r4, [sp, #4]
0x2befd064:  blx    0x2befd0d0                ; dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*)
0x2befd068:  ldr    r5, [sp, #12]
0x2befd06c:  cmp    r5, #0
0x2befd070:  bne    0x2befd07c                ; _dyld_start + 84
0x2befd074:  add    sp, r8, #4
0x2befd078:  bx     r0
0x2befd07c:  mov    lr, r5
0x2befd080:  mov    r5, r0
0x2befd084:  ldr    r0, [r8, #4]
0x2befd088:  add    r1, r8, #8
0x2befd08c:  add    r2, r1, r0, lsl #2
0x2befd090:  add    r2, r2, #4
0x2befd094:  mov    r3, r2
0x2befd098:  ldr    r4, [r3]
0x2befd09c:  add    r3, r3, #4
0x2befd0a0:  cmp    r4, #0
0x2befd0a4:  bne    0x2befd098                ; _dyld_start + 112
0x2befd0a8:  bx     r5
0x2befd0ac:  strheq r3, [r2], -r0
0x2befd0b0:  .long  0xffffefa4                ; unknown opcode

此代码是启动应用时的代码:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    // Add the tab bar controller's current view as a subview of the window
    if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
        loginViewControl = [[LoginTab alloc] initWithNibName:@"LoginTab" bundle:nil];
    } else {
        loginViewControl = [[LoginTab alloc] initWithNibName:@"LoginTab~ipad" bundle:nil];
    }

   // loginViewControl = [[LoginTab alloc] init];
    UINavigationController *objNavigationController=[[[UINavigationController alloc]initWithRootViewController:loginViewControl]autorelease];

    self.window.rootViewController = objNavigationController;
    [self.window makeKeyAndVisible];
    completeTab = [[CompletedTab alloc] init];

   // photoButton.frame = CGRectMake(0, 430, 160, 49);

    return YES;
}

我在互联网上找到了但我找不到解决这个问题的方法。有谁知道这个问题和解决方案?非常感谢。

0 个答案:

没有答案