这很奇怪,我可以使用 Xcode 5 (5A1413) 在模拟器、iPhone 4S 和 iPhone 5 中运行我的应用程序而没有任何问题,但是当我将应用程序提交到 iTunes 商店时被拒绝并且此日志是由 Apple 提供的。
这是我从 Apple 收到的消息:
我们发现您的应用在运行 iOS 7.0.2 的 iPhone 5s 上崩溃,这不符合 App Store Review Guidelines。
我承认我一无所知,请你帮我理解这个崩溃日志:
事件标识符:17461001-CE5D-451F-9BD5-FF513B76B03E CrashReporter 密钥:298a52ed29ad5cd48b1f745f998491771bd584a6 硬件型号:iPhone5,1 流程:HomeClubBanesco [485] 路径:/var/mobile/Applications/6C36584D-E12D-4BDB-995A-B1652CDA9E48/HomeClubBanesco.app/HomeClubBanesco 标识符:com.3pixelsmedia.HomeClubBanesco 版本:2 (1.1) 代码类型:ARM(本机) 父进程:launchd [1] 日期/时间:2013-10-10 23:21:28.291 -0430 操作系统版本:iOS 7.0.2 (11A501) 报告版本:104 异常类型:EXC_CRASH (SIGABRT) 异常代码:0x0000000000000000, 0x0000000000000000 由线程触发:0 最后异常回溯: 0 核心基础 0x31462e86 __exceptionPreprocess + 126 1 libobjc.A.dylib 0x3b75d6c2 objc_exception_throw + 34 2核心基础0x314667b2-[NSObject(NSObject)不识别选择器:]+198 3 核心基础 0x314650b2 ___forwarding___ + 702 4 核心基础 0x313b3e94 __forwarding_prep_0___ + 20 5 基础 0x31e05e78 -[_NSPlaceholderData initWithData:] + 124 6 HomeClubBanesco 0x00106b76 -[HCBAppDelegate 应用程序:didRegisterForRemoteNotificationsWithDeviceToken:] (HCBAppDelegate.m:315) 7 UIKit 0x33efe45a _UIXXRemoteNotificationRegistrationSucceeded + 146 8 UIKit 0x33efefc4 _XRemoteNotificationRegistrationSucceeded + 88 9 AppSupport 0x34c73b32 migHelperRecievePortCallout + 186 10 核心基础 0x3142d77a __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 30 11 核心基础 0x3142d716 __CFRunLoopDoSource1 + 342 12 核心基础 0x3142bee2 __CFRunLoopRun + 1402 13 核心基础 0x3139653c CFRunLoopRunSpecific + 520 14 核心基础 0x3139631e CFRunLoopRunInMode + 102 15 图形服务 0x360cd2e6 GSEventRunModal + 134 16 UIKit 0x33c4d1e0 UIApplicationMain + 1132 17 HomeClubBanesco 0x00105812 主 (main.m:17) 18 libdyld.dylib 0x3bc56ab2 tlv_initializer + 2 线程 0 崩溃: 0 libsystem_kernel.dylib 0x3bd0d1fc __pthread_kill + 8 1 libsystem_pthread.dylib 0x3bd74a4e pthread_kill + 54 2 libsystem_c.dylib 0x3bcbe028 中止 + 72 3 libc++abi.dylib 0x3b10c98a abort_message + 70 4 libc++abi.dylib 0x3b1256e2 default_terminate_handler() + 250 5 libobjc.A.dylib 0x3b75d936 _objc_terminate() + 190 6 libc++abi.dylib 0x3b1231b0 std::__terminate(void (*)()) + 76 7 libc++abi.dylib 0x3b122d12 __cxa_rethrow + 98 8 libobjc.A.dylib 0x3b75d80a objc_exception_rethrow + 38 9 核心基础 0x313965b2 CFRunLoopRunSpecific + 638 10 核心基础 0x3139631e CFRunLoopRunInMode + 102 11 图形服务 0x360cd2e6 GSEventRunModal + 134 12 UIKit 0x33c4d1e0 UIApplicationMain + 1132 13 HomeClubBanesco 0x00105812 主 (main.m:17) 14 libdyld.dylib 0x3bc56ab4 开始 + 0 线程 1: 0 libsystem_kernel.dylib 0x3bcfa838 kevent64 + 24 1 libdispatch.dylib 0x3bc490d0 _dispatch_mgr_invoke + 228 2 libdispatch.dylib 0x3bc4363e _dispatch_mgr_thread + 34 线程 2: 0 libsystem_kernel.dylib 0x3bd0dc7c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3bd71e06 _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3bd71cc0 start_wqthread + 4 线程 3: 0 libsystem_kernel.dylib 0x3bd0dc7c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3bd71e06 _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3bd71cc0 start_wqthread + 4 线程 4: 0 libsystem_kernel.dylib 0x3bcfaa84 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x3bcfa87c mach_msg + 36 2 核心基础 0x3142d55c __CFRunLoopServiceMachPort + 152 3 核心基础 0x3142bc7c __CFRunLoopRun + 788 4 核心基础 0x3139653c CFRunLoopRunSpecific + 520 5 核心基础 0x313da1a6 CFRunLoopRun + 94 6 CoreMotion 0x31a4e394 ___lldb_unnamed_function1407$$CoreMotion + 724 7 libsystem_pthread.dylib 0x3bd73c5a _pthread_body + 138 8 libsystem_pthread.dylib 0x3bd73bca _pthread_start + 98 9 libsystem_pthread.dylib 0x3bd71ccc thread_start + 4 线程 5 名称:com.apple.NSURLConnectionLoader 线程 5: 0 libsystem_kernel.dylib 0x3bcfaa84 mach_msg_trap + 20 1 libsystem_kernel.dylib 0x3bcfa87c mach_msg + 36 2 核心基础 0x3142d55c __CFRunLoopServiceMachPort + 152 3 核心基础 0x3142bc7c __CFRunLoopRun + 788 4 核心基础 0x3139653c CFRunLoopRunSpecific + 520 5 核心基础 0x3139631e CFRunLoopRunInMode + 102 6 基础 0x31dd164c +[NSURLConnection(Loader)_resourceLoadLoop:] + 316 7 基础 0x31e46dc2 __NSThread__main__ + 1058 8 libsystem_pthread.dylib 0x3bd73c5a _pthread_body + 138 9 libsystem_pthread.dylib 0x3bd73bca _pthread_start + 98 10 libsystem_pthread.dylib 0x3bd71ccc thread_start + 4 线程 6: 0 libsystem_kernel.dylib 0x3bd0dc7c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3bd71e06 _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3bd71cc0 start_wqthread + 4 线程 7: 0 libsystem_kernel.dylib 0x3bd0dc7c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3bd71e06 _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3bd71cc0 start_wqthread + 4 线程 8: 0 libsystem_kernel.dylib 0x3bd0dc7c __workq_kernreturn + 8 1 libsystem_pthread.dylib 0x3bd71e06 _pthread_wqthread + 306 2 libsystem_pthread.dylib 0x3bd71cc0 start_wqthread + 4 线程 9 名称:com.apple.CFSocket.private 线程 9: 0 libsystem_kernel.dylib 0x3bd0d440 选择$DARWIN_EXTSN + 20 1 核心基础 0x3143145e __CFSocketManager + 482 2 libsystem_pthread.dylib 0x3bd73c5a _pthread_body + 138 3 libsystem_pthread.dylib 0x3bd73bca _pthread_start + 98 4 libsystem_pthread.dylib 0x3bd71ccc thread_start + 4 线程 0 因 ARM 线程状态(32 位)而崩溃: r0:0x00000000 r1:0x00000000 r2:0x00000000 r3:0x00002060 r4:0x00000006 r5:0x3db3a18c r6:0x00000000 r7:0x27d03584 r8:0x15e958a0 r9:0x00000001 r10:0x31f15124 r11:0x00000000 ip: 0x00000148 sp: 0x27d03578 lr: 0x3bd74a53 pc: 0x3bd0d1fc cpsr: 0x00000010
更新以显示损坏的方法
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
NSLog(@"Usuario SI Acepto las notificaciones");
[self setDToken:deviceToken];
NSData *myToken = [[NSData alloc] initWithData:[[NSUserDefaults standardUserDefaults] objectForKey:HCBDeviceTokenPrefKey]];
if (![myToken isEqualToData:deviceToken]) {
NSLog(@"Token no coincide");
[[NSUserDefaults standardUserDefaults] setObject:deviceToken forKey:HCBDeviceTokenPrefKey];
// Debo actualizar los datos en la db.
if (![[[NSUserDefaults standardUserDefaults] objectForKey:HCBUserIDPrefKey] isEqualToString:@"1"]) {
NSString *urlString = [NSString stringWithFormat:@"http://cmx.3pixelsmedia.com/homeclub/?l=iphone&updateDeviceID&deviceToken=%@&userID=%@",
deviceToken,
[[NSUserDefaults standardUserDefaults] objectForKey:HCBUserIDPrefKey]];
NSLog(@"urlString : %@",urlString);
}
}
NSLog(@"Device Token : %@",myToken);
}