0

アプリに非常に奇妙な問題があります。iOS 6.0 を実行しているすべてのデバイス (iPad を含む) で完全に動作します。また、iOS 6.0.1 では、iPhone と iPod でも期待どおりに動作します。しかし、iPad 6.0.1 ではクラッシュします。

これは、webView を備えた非常に単純なシングルビュー アプリケーションです。これは私の ViewControler.m です:

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController


- (void)viewDidLoad
{
    NSURL *url = [NSURL URLWithString:@"http://telefonecke.tumblr.com"];
    NSURLRequest *req = [NSURLRequest requestWithURL:url];
    [_webView loadRequest:req];

    [super viewDidLoad];

}

-(BOOL) webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest             navigationType:(UIWebViewNavigationType)inType {
if ( inType == UIWebViewNavigationTypeLinkClicked ) {
    [[UIApplication sharedApplication] openURL:[inRequest URL]];
    return NO;
}

return YES;
}

- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];

[_webView reload];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(willEnterForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
}

- (void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];

[[NSNotificationCenter defaultCenter] removeObserver:self         name:UIApplicationWillEnterForegroundNotification object:nil];
}

- (void)willEnterForeground {
    [_webView reload];
}

- (void)didReceiveMemoryWarning
{

    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

特に iOS 6.0 や他のすべてのデバイスで完全に動作するため、なぜ動作しないのか実際にはわかりません。

すべての提案に感謝します。前もって感謝します!

編集:役立つ場合は、クラッシュレポートもあります。クラッシュレポートについては、ここをクリックしてください

4

1 に答える 1

1

Here is the symbolicated Last Exception Backtrace of your crash:

Last Exception Backtrace:
0   CoreFoundation                  0x327fb29e __exceptionPreprocess + 158
1   libobjc.A.dylib                 0x394dd97a objc_exception_throw + 26
2   UIKit                           0x38897d54 +[UIStoryboard storyboardWithName:bundle:] + 436
3   UIKit                           0x386da406 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 38
4   UIKit                           0x38563794 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 524
5   UIKit                           0x3850bc34 -[UIApplication handleEvent:withNewEvent:] + 1000
6   UIKit                           0x3850b6c8 -[UIApplication sendEvent:] + 68
7   UIKit                           0x3850b116 _UIApplicationHandleEvent + 6150
8   GraphicsServices                0x35c8759e _PurpleEventCallback + 586
9   CoreFoundation                  0x327d067e __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 10
10  CoreFoundation                  0x327cfee4 __CFRunLoopDoSources0 + 208
11  CoreFoundation                  0x327cecb2 __CFRunLoopRun + 642
12  CoreFoundation                  0x32741eb8 CFRunLoopRunSpecific + 352
13  CoreFoundation                  0x32741d44 CFRunLoopRunInMode + 100
14  UIKit                           0x38562478 -[UIApplication _run] + 664
15  UIKit                           0x3855f2f4 UIApplicationMain + 1116
16  DieTelefonecke                  0x84f4e 0x83000 + 8014

Your apps call on 0x84f4e is the main function, so nothing to worry about.

So it there is an exception happening when loading the main storyboard. That's where you should starting to look at, e.g. if the storyboard is part of the app bundle etc.

于 2012-12-14T21:01:56.823 に答える