我的应用程序无法及时启动

时间:2012-08-03 09:22:47

标签: ios

我的应用程序崩溃了。我不清楚崩溃的原因是什么,因为它在一个月内只崩溃了两次。同样在设备日志中,我发现了以下消息:

  

8月3日11:26:28未知的SpringBoard [15]:com.xyz.abe无法及时发布

     

8月3日11:26:28未知的SpringBoard [15]:强制abc的崩溃报告[392] ......

     

8月3日11:26:28未知的SpringBoard [15]:完成了崩溃报告。

     

8月3日11:26:28未知的com.apple.launchd [1]:    (UIKitApplication:com.xyz.abe [0x8558])已退出:已杀:9

     

8月3日11:26:28未知SpringBoard [15]:应用程序'abc'异常退出,信号9:已杀:9   8月3日11:26:28未知ReportCrash [393]:使用uid将崩溃报告保存到/var/mobile/Library/Logs/CrashReporter/abc_2012-08-03-112628_DeviceName.plist:0 gid:0,synthetic_euid:501 egid:0

在搜索网页时,我发现这是因为在进行大量处理 “applicationDidFinishLaunchingWithOptions:”请检查我的代码,让我知道代码有什么问题。

谢谢!

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
CGRect frame = [[UIScreen mainScreen] bounds];
self.window = [[UIWindow alloc] initWithFrame:frame];
britenessView = [[UIView alloc] initWithFrame:frame];
britenessView.userInteractionEnabled = NO;
britenessView.backgroundColor = [UIColor blackColor];
britenessView.alpha = 0.0;
StoreIPad *viewController = [[StoreIPad alloc] init];
nav = [[UINavigationController alloc] initWithRootViewController:viewController];    
[self.window addSubview:nav.view];
[self.window addSubview:britenessView];
[self.window makeKeyAndVisible];
return YES;}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self)
{
    //iniatializing inAppPurchase
    InAppPurchase *inAppManager = [InAppPurchase sharedManager];
    inAppManager.inappDelegate = self;        
    subscriber = FALSE;        
}
return self;}
+ (InAppPurchase *)sharedManager{    // InAppPurchase sharedManager
@synchronized(self)
{
    if (!_sharedInstance)
    {
        _sharedInstance =  [[self alloc] init];
    }
}
return _sharedInstance;}-(id)init{ // InAppPurchase init

self = [super init];
if (self)
{
    [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
    isRestoring = NO;
    arrTransactions = [[NSMutableArray alloc] init];
}
return self;}

0 个答案:

没有答案