应用因持久存储创建崩溃而被拒绝
App rejected for crash on persistenstore creation
我的应用程序在启动时因崩溃而被拒绝,在对崩溃日志进行符号化后,我得到了这个:
Incident Identifier: --
CrashReporter Key: --
Hardware Model: xxx
Process: BUDGT [1029]
Path: /private/var/mobile/Containers/Bundle/Application/F5D98A63-AF73-4A76-A80C-EA57B4E41082/BUDGT.app/BUDGT
Identifier: --.BUDGT
Version: 1 (4)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-05-08 18:09:23.379 -0700
Launch Time: 2015-05-08 18:09:23.142 -0700
OS Version: iOS 8.3 (12F70)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000197acb270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000197b6916c pthread_kill + 108
2 libsystem_c.dylib 0x0000000197a42b14 abort + 108
3 BUDGT 0x000000010009ee5c -[AppDelegate persistentStoreCoordinator] (AppDelegate.m:222)
4 BUDGT 0x000000010009e96c -[AppDelegate managedObjectContext] (AppDelegate.m:153)
5 BUDGT 0x00000001000a0abc -[Factory setupDataHandler] (Factory.m:54)
6 BUDGT 0x00000001000a0830 -[Factory init] (Factory.m:30)
7 BUDGT 0x00000001000a07c4 __25+[Factory defaultFactory]_block_invoke (Factory.m:22)
8 libdispatch.dylib 0x0000000197985950 _dispatch_client_callout + 12
9 libdispatch.dylib 0x0000000197986828 dispatch_once_f + 92
10 BUDGT 0x00000001000a0794 +[Factory defaultFactory] (once.h:68)
11 BUDGT 0x000000010009dab8 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:17)
12 UIKit 0x000000018a5c318c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 400
13 UIKit 0x000000018a7da850 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2372
14 UIKit 0x000000018a7dd204 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1500
15 UIKit 0x000000018a7db774 -[UIApplication workspaceDidEndTransaction:] + 180
16 FrontBoardServices 0x000000018e3193c4 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 28
17 CoreFoundation 0x0000000185ac8278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
18 CoreFoundation 0x0000000185ac7380 __CFRunLoopDoBlocks + 308
19 CoreFoundation 0x0000000185ac59a4 __CFRunLoopRun + 1752
20 CoreFoundation 0x00000001859f12d0 CFRunLoopRunSpecific + 392
21 UIKit 0x000000018a5bc438 -[UIApplication _run] + 548
22 UIKit 0x000000018a5b6fa8 UIApplicationMain + 1484
23 BUDGT 0x000000010009da38 main (main.m:16)
24 libdyld.dylib 0x00000001979b2a04 start + 0
这意味着它一定是在我的 AppDelegate
中的 abort()
处失败了
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (persistentStoreCoordinator != nil)
{
return persistentStoreCoordinator;
}
NSError *error = nil;
persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"database.sqlite"];
NSPersistentStoreCoordinator *psc = persistentStoreCoordinator;
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
NSPersistentStore *store = [psc addPersistentStoreWithType:NSSQLiteStoreType
configuration:nil URL:storeURL
options:options error:&error];
if (!store) {
NSLog(@"Unresolved Error");
abort(); // This is line 222 of AppDelegate
}
return persistentStoreCoordinator;
}
像这样获取目录:
- (NSURL *)applicationDocumentsDirectory {
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
还有这样的妈妈:
- (NSManagedObjectModel *)managedObjectModel {
if (managedObjectModel != nil)
{
return managedObjectModel;
}
managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil] ;
return managedObjectModel;
}
苹果拒收信息:
We could not review your app as it crashes on startup.
我个人无法重现该问题。
both an update to my devices and simulators - as well as clean builds run just fine without any issues.
我在此应用程序中更改的内容是:
- 支持应用程序组(核心数据容器在应用程序组容器中不)
- 链接更改为 cocoapods
- 已添加 WatchKit 应用程序
- 添加了今日扩展
- 迁移所有视图以使用 AutoLayout (Masonry)
但是我没有通过应用程序组容器访问核心数据,它仍然只位于 phone(并且应该留在那里)我正在使用应用程序组做一些不同的事情(通过它传递简单的消息).
有什么想法可能导致应用程序在启动时与苹果审核团队崩溃吗?
部署目标是 iOS8.2(对于所有应用和扩展)
更新
i just manually installed the submitted archive (the original build for the app store submission) to a cleaned device. everything works perfectly. no issues, no crashes.
我还能检查什么?
嗯...答案很简单。我的申请没有任何问题。
"Thank you for your response. Upon further review, we have found the
application no longer crashes on launch."
我的应用程序在启动时因崩溃而被拒绝,在对崩溃日志进行符号化后,我得到了这个:
Incident Identifier: --
CrashReporter Key: --
Hardware Model: xxx
Process: BUDGT [1029]
Path: /private/var/mobile/Containers/Bundle/Application/F5D98A63-AF73-4A76-A80C-EA57B4E41082/BUDGT.app/BUDGT
Identifier: --.BUDGT
Version: 1 (4)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
Date/Time: 2015-05-08 18:09:23.379 -0700
Launch Time: 2015-05-08 18:09:23.142 -0700
OS Version: iOS 8.3 (12F70)
Report Version: 105
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x0000000197acb270 __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000197b6916c pthread_kill + 108
2 libsystem_c.dylib 0x0000000197a42b14 abort + 108
3 BUDGT 0x000000010009ee5c -[AppDelegate persistentStoreCoordinator] (AppDelegate.m:222)
4 BUDGT 0x000000010009e96c -[AppDelegate managedObjectContext] (AppDelegate.m:153)
5 BUDGT 0x00000001000a0abc -[Factory setupDataHandler] (Factory.m:54)
6 BUDGT 0x00000001000a0830 -[Factory init] (Factory.m:30)
7 BUDGT 0x00000001000a07c4 __25+[Factory defaultFactory]_block_invoke (Factory.m:22)
8 libdispatch.dylib 0x0000000197985950 _dispatch_client_callout + 12
9 libdispatch.dylib 0x0000000197986828 dispatch_once_f + 92
10 BUDGT 0x00000001000a0794 +[Factory defaultFactory] (once.h:68)
11 BUDGT 0x000000010009dab8 -[AppDelegate application:didFinishLaunchingWithOptions:] (AppDelegate.m:17)
12 UIKit 0x000000018a5c318c -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 400
13 UIKit 0x000000018a7da850 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2372
14 UIKit 0x000000018a7dd204 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1500
15 UIKit 0x000000018a7db774 -[UIApplication workspaceDidEndTransaction:] + 180
16 FrontBoardServices 0x000000018e3193c4 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 28
17 CoreFoundation 0x0000000185ac8278 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 16
18 CoreFoundation 0x0000000185ac7380 __CFRunLoopDoBlocks + 308
19 CoreFoundation 0x0000000185ac59a4 __CFRunLoopRun + 1752
20 CoreFoundation 0x00000001859f12d0 CFRunLoopRunSpecific + 392
21 UIKit 0x000000018a5bc438 -[UIApplication _run] + 548
22 UIKit 0x000000018a5b6fa8 UIApplicationMain + 1484
23 BUDGT 0x000000010009da38 main (main.m:16)
24 libdyld.dylib 0x00000001979b2a04 start + 0
这意味着它一定是在我的 AppDelegate
abort()
处失败了
- (NSPersistentStoreCoordinator *)persistentStoreCoordinator
{
if (persistentStoreCoordinator != nil)
{
return persistentStoreCoordinator;
}
NSError *error = nil;
persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"database.sqlite"];
NSPersistentStoreCoordinator *psc = persistentStoreCoordinator;
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
NSPersistentStore *store = [psc addPersistentStoreWithType:NSSQLiteStoreType
configuration:nil URL:storeURL
options:options error:&error];
if (!store) {
NSLog(@"Unresolved Error");
abort(); // This is line 222 of AppDelegate
}
return persistentStoreCoordinator;
}
像这样获取目录:
- (NSURL *)applicationDocumentsDirectory {
return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
还有这样的妈妈:
- (NSManagedObjectModel *)managedObjectModel {
if (managedObjectModel != nil)
{
return managedObjectModel;
}
managedObjectModel = [NSManagedObjectModel mergedModelFromBundles:nil] ;
return managedObjectModel;
}
苹果拒收信息:
We could not review your app as it crashes on startup.
我个人无法重现该问题。
both an update to my devices and simulators - as well as clean builds run just fine without any issues.
我在此应用程序中更改的内容是:
- 支持应用程序组(核心数据容器在应用程序组容器中不)
- 链接更改为 cocoapods
- 已添加 WatchKit 应用程序
- 添加了今日扩展
- 迁移所有视图以使用 AutoLayout (Masonry)
但是我没有通过应用程序组容器访问核心数据,它仍然只位于 phone(并且应该留在那里)我正在使用应用程序组做一些不同的事情(通过它传递简单的消息).
有什么想法可能导致应用程序在启动时与苹果审核团队崩溃吗?
部署目标是 iOS8.2(对于所有应用和扩展)
更新
i just manually installed the submitted archive (the original build for the app store submission) to a cleaned device. everything works perfectly. no issues, no crashes.
我还能检查什么?
嗯...答案很简单。我的申请没有任何问题。
"Thank you for your response. Upon further review, we have found the application no longer crashes on launch."