【问题标题】:Understanding crash report from iOS review process从 iOS 审核过程中了解崩溃报告
【发布时间】:2019-10-22 10:22:47
【问题描述】:

我正在尝试将应用上传到 iOS App Store,但由于崩溃(我无法使用我拥有的多个模拟/设备重现)而遭到拒绝。

我在此附上崩溃报告。 我遇到的问题是我无法正确地重新符号化崩溃,当我尝试右键单击并选择重新符号化它们时,我所能得到的只是:

{"app_name":"Livycs","timestamp":"2019-10-21 13:36:46.22 -0700","app_version":"1.3","slice_uuid":"4ceb4db7-568a-3a47-a8e9-0e6d8ff33b2b","adam_id":1054637602,"build_version":"12","bundleID":"me.linktree.Livycs","share_with_app_devs":false,"is_first_party":false,"bug_type":"109","os_version":"iPhone OS 13.1.3 (17A878)","incident_id":"B26974A6-3E7F-40F4-836A-BC4FF36D1219","name":"Livycs"}
Incident Identifier: B26974A6-3E7F-40F4-836A-BC4FF36D1219
CrashReporter Key:   f76f6829cc13ca447c49f923305d7b23085e37fd
Hardware Model:      xxx
Process:             Livycs [394]
Path:                /private/var/containers/Bundle/Application/1ADC7177-F01D-4C60-B624-730592A5C45A/Livycs.app/Livycs
Identifier:          me.linktree.Livycs
Version:             12 (1.3)
AppStoreTools:       11A1002b
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           me.linktree.Livycs [530]


Date/Time:           2019-10-21 13:36:46.1480 -0700
Launch Time:         2019-10-21 13:34:25.7023 -0700
OS Version:          iPhone OS 13.1.3 (17A878)
Release Type:        User
Baseband Version:    n/a
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Application Specific Information:
abort() called

Last Exception Backtrace:
0   CoreFoundation                  0x1a450298c __exceptionPreprocess + 220
1   libobjc.A.dylib                 0x1a422b0a4 objc_exception_throw + 55
2   CoreFoundation                  0x1a43f8054 +[NSException raise:format:] + 107
3   UIKitCore                       0x1a7eb70f8 UISearchDisplayControllerNoLongerSupported + 247
4   UIKitCore                       0x1a7eb73fc -[UISearchDisplayController initWithCoder:] + 83
5   UIFoundation                    0x1a7aab838 UINibDecoderDecodeObjectForValue + 727
6   UIFoundation                    0x1a7aaba6c UINibDecoderDecodeObjectForValue + 1291
7   UIFoundation                    0x1a7a47ec8 -[UINibDecoder decodeObjectForKey:] + 315
8   UIKitCore                       0x1a7efe6e4 -[UIViewController initWithCoder:] + 1035
9   UIKitCore                       0x1a81b9c2c -[UIClassSwapper initWithCoder:] + 2455
10  UIFoundation                    0x1a7aab838 UINibDecoderDecodeObjectForValue + 727
11  UIFoundation                    0x1a7aaba6c UINibDecoderDecodeObjectForValue + 1291
12  UIFoundation                    0x1a7a47ec8 -[UINibDecoder decodeObjectForKey:] + 315
13  UIKitCore                       0x1a81b8edc -[NSCoder+ 6917852 (UIIBDependencyInjectionInternal) _decodeObjectsAndTrackChildViewControllerIndexWithParent:forKey:] + 315
14  UIKitCore                       0x1a7efe89c -[UIViewController initWithCoder:] + 1475
15  UIKitCore                       0x1a7e41a84 -[UITabBarController initWithCoder:] + 79
16  UIKitCore                       0x1a81b9c2c -[UIClassSwapper initWithCoder:] + 2455
17  UIFoundation                    0x1a7aab838 UINibDecoderDecodeObjectForValue + 727
18  UIFoundation                    0x1a7a47ec8 -[UINibDecoder decodeObjectForKey:] + 315
19  UIKitCore                       0x1a81bdc50 -[UIRuntimeConnection initWithCoder:] + 127
20  UIFoundation                    0x1a7aab838 UINibDecoderDecodeObjectForValue + 727
21  UIFoundation                    0x1a7aaba6c UINibDecoderDecodeObjectForValue + 1291
22  UIFoundation                    0x1a7a47ec8 -[UINibDecoder decodeObjectForKey:] + 315
23  UIKitCore                       0x1a81b8cc8 -[NSCoder+ 6917320 (UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 487
24  UIKitCore                       0x1a81bb8b8 -[UINib instantiateWithOwner:options:] + 1111
25  UIKitCore                       0x1a86617d8 -[UIStoryboard __reallyInstantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 287
26  Livycs                          0x1040d44dc @objc WelcomeViewController.searchShowsAroundMeButtonClicked+ 165084 (_:) + 131
27  UIKitCore                       0x1a8511a44 -[UIApplication sendAction:to:from:forEvent:] + 95
28  UIKitCore                       0x1a7f556d0 -[UIControl sendAction:to:forEvent:] + 239
29  UIKitCore                       0x1a7f55a34 -[UIControl _sendActionsForEvents:withEvent:] + 407
30  UIKitCore                       0x1a7f54a50 -[UIControl touchesEnded:withEvent:] + 519
31  UIKitCore                       0x1a854ad68 -[UIWindow _sendTouchesForEvent:] + 2323
32  UIKitCore                       0x1a854c0a8 -[UIWindow sendEvent:] + 3351
33  UIKitCore                       0x1a8528ae8 -[UIApplication sendEvent:] + 335
34  UIKitCore                       0x1a85a023c __dispatchPreprocessedEventFromEventQueue + 5879
35  UIKitCore                       0x1a85a2798 __handleEventQueueInternal + 4923
36  UIKitCore                       0x1a859b60c __handleHIDEventFetcherDrain + 107
37  CoreFoundation                  0x1a44807e0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 23
38  CoreFoundation                  0x1a4480738 __CFRunLoopDoSource0 + 79
39  CoreFoundation                  0x1a447fed0 __CFRunLoopDoSources0 + 179
40  CoreFoundation                  0x1a447b01c __CFRunLoopRun + 1079
41  CoreFoundation                  0x1a447a8bc CFRunLoopRunSpecific + 463
42  GraphicsServices                0x1ae2e6328 GSEventRunModal + 103
43  UIKitCore                       0x1a85106d4 UIApplicationMain + 1935
44  Livycs                          0x1040d246c main + 156780 (SearchLocationViewController.swift:14)
45  libdyld.dylib                   0x1a4305460 start + 3


Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001a42faebc __pthread_kill + 8
1   libsystem_pthread.dylib         0x00000001a4216790 pthread_kill$VARIANT$mp + 112
2   libsystem_c.dylib               0x00000001a416a8a0 __abort + 112
3   libsystem_c.dylib               0x00000001a416a830 __abort + 0
4   libc++abi.dylib                 0x00000001a42c37d4 __cxa_bad_cast + 0
5   libc++abi.dylib                 0x00000001a42c39c4 demangling_unexpected_handler+ 6596 () + 0
6   libobjc.A.dylib                 0x00000001a422b358 _objc_terminate+ 25432 () + 124
7   Livycs                          0x0000000104113a94 CLSTerminateHandler() + 424596 (CLSException.mm:0)
8   libc++abi.dylib                 0x00000001a42d0304 std::__terminate(void (*)+ 58116 ()) + 16
9   libc++abi.dylib                 0x00000001a42cfed8 __cxa_rethrow + 144
10  libobjc.A.dylib                 0x00000001a422b258 objc_exception_rethrow + 40
11  CoreFoundation                  0x00000001a447a92c CFRunLoopRunSpecific + 576
12  GraphicsServices                0x00000001ae2e6328 GSEventRunModal + 104
13  UIKitCore                       0x00000001a85106d4 UIApplicationMain + 1936
14  Livycs                          0x00000001040d246c main + 156780 (SearchLocationViewController.swift:14)
15  libdyld.dylib                   0x00000001a4305460 start + 4

我认为它崩溃的代码(WelcomeViewController.swift)

//
//  WelcomeViewController.swift
//  Livycs
//
//  Created by Nir Sagiv on 03/03/2016.
//  Copyright © 2016 Nir Sagiv. All rights reserved.
//

import UIKit

class WelcomeViewController: UIViewController {

    @IBOutlet weak var showsRoundMeButton: UIButton!

    @IBOutlet weak var showsByLocationBotton: UIButton!

    @IBOutlet weak var iosVersion: UILabel!
    override func viewDidLoad() {
        super.viewDidLoad()

        showsRoundMeButton.layer.cornerRadius = 10
        showsByLocationBotton.layer.cornerRadius = 10

        self.navigationController?.navigationBar.setBackgroundImage(UIImage(), for: UIBarMetrics.default)
        self.navigationController?.navigationBar.shadowImage = UIImage()
        self.navigationController?.navigationBar.isTranslucent = true
        self.navigationController?.navigationBar.backgroundColor = UIColor.clear

        iosVersion.text = version()

        BiAnalyticsService.logEvent("MainPage", withParameter: nil)

        // Do any additional setup after loading the view.
    }

    override var preferredStatusBarStyle : UIStatusBarStyle {
        return .lightContent
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

    func version() -> String {
        let dictionary = Bundle.main.infoDictionary!
        let version = dictionary["CFBundleShortVersionString"] as! String
        let build = dictionary["CFBundleVersion"] as! String
        return "v\(version) (\(build))"
    }

    @IBAction func searchShowsAroundMeButtonClicked(_ sender: UIButton) {
        BiAnalyticsService.logEvent("MainPage:searchShowsAroundMeButtonClicked", withParameter: nil)
        let vc:UITabBarController = (self.storyboard?.instantiateViewController(withIdentifier: "main")) as! UITabBarController
        vc.selectedIndex = 0

        self.present(vc, animated: true, completion: nil)
    }

    @IBAction func searchShowsByLocationButtonClicked(_ sender: UIButton) {
        BiAnalyticsService.logEvent("MainPage:searchShowsByLocationButtonClicked", withParameter: nil)
        let vc:UITabBarController = (self.storyboard?.instantiateViewController(withIdentifier: "main")) as! UITabBarController
        vc.selectedIndex = 1

        self.present(vc, animated: true, completion: nil)
    }

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}

请注意,我已经清除了 BiAnalyticsService.logEvent... 因为我认为它可能会导致问题并且现在有代码:

    class func logEvent( eventName : String, withParameter : Dictionary<String,String>?){

//        if withParameter == nil {
//            mixpanel.track(eventName, properties:  staticProperties)
//        } else {
//            var prm = withParameter!
//            
//            for key in staticProperties.keys {
//                prm[key] = staticProperties[key]
//            }
//            mixpanel.track(eventName, properties: prm)
//        }



    }

任何帮助将不胜感激

【问题讨论】:

  • 日志说您正在尝试使用已弃用的搜索控制器UISearchDisplayControllerNoLongerSupported,您是否在最新的 iOS 上对其进行了测试?
  • 那么你的应用真的使用 UISearchDisplayController 吗???摆脱它并使用 UISearchController。
  • 看起来确实有 UISearchDisplayController(作为 iOS 开发中的 n00b,我没有注意到),问题是它在 13.1.3 上工作而没有崩溃,所以我不知道为什么会这样'不要在我的最后崩溃 --> 无论如何我已经设法从情节提要中删除它,我希望它能解决这个问题......

标签: ios swift crash


【解决方案1】:

在代码“searchdisplay”中查找,它将出现在 Storyboard 中某个旧视图控制器底部的某个位置,删除此 SearchDisplay 项,仅此而已。

在我的例子中,SearchDisplay 甚至链接到了 outlet(实际上并不存在真正的 outlet!也没有一个编译器错误!),很明显它已经很长时间没有使用了。崩溃仅在审核团队或通过 TestFlight 发生,而不是通过电缆在任何设备上发生。审查团队的崩溃报告什么也没说(象征性总是失败),因此我杀死了三天和三个构建,直到从测试人员那里得到有用的报告。

立即使用 TestFlight!在电缆上进行多次调试是不够的是时候了:-(

【讨论】:

    【解决方案2】:

    从 iOS 13 和 iPad OS 13 开始,使用 Xcode 11 构建的应用无法使用 UISearchDisplayController。 UISearchDisplayController 从 iOS 8 开始被弃用,你应该使用 UISearchController

    为了在本地重现这一点,您需要测试应用的精简变体

    如果您收到其中一种崩溃但无法在本地重现, 确保您正在 iOS 上测试应用的部署版本 13,通过使用 TestFlight 或将应用细化应用到您的 Xcode 归档并测试您的应用程序的精简变体,针对 iOS 13 设备。通过使用变薄变体进行测试,您将能够 重现此崩溃。将应用细化应用到本地 Xcode 存档,使用 Ad-Hoc 从 Xcode 存档中导出应用程序 或开发选项,然后选择“所有兼容的设备变体” 对于 App Thinning 选项。创建精简版本后, 您可以通过阅读来识别针对 iOS 13 的特定变体 作为输出一部分的 App Thinning Size Report 文件,然后 安装并测试精简的 .ipa 文件。

    请看:Apple Developer Forum

    【讨论】:

    • 可能值得一提的是,在我的应用程序中没有直接使用UISearchDisplayController,而只是一个默认的UISearchBar。但在故事板导航面板上往下看,有一个Search Display Controller(以及那个VC的First ResponderExit),我删除了它并且没有破坏任何功能并停止了崩溃。胜利!
    猜你喜欢
    • 1970-01-01
    • 2021-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多