Thursday, August 11, 2022
HomeiOS Developmentios - Crashed: com.apple.main-thread partial apply for closure #2

ios – Crashed: com.apple.main-thread partial apply for closure #2

[ad_1]

Crashes are reported into firebase console. Can anybody assist me. i’m sending information to server utilizing Socket.

Right here is crash description:

Crashed: com.apple.main-thread

0  AppName  0x10ef40 partial apply for closure #2 in sendDataRecursively() + 4329697088 (swift:4329697088)
1  AppName                   0x23824 thunk for @escaping @callee_guaranteed () -> () + 4328732708 (<compiler-generated>:4328732708)
2  libdispatch.dylib              0x1e68 _dispatch_call_block_and_release + 32
3  libdispatch.dylib              0x3a2c _dispatch_client_callout + 20
4  libdispatch.dylib              0x11f48 _dispatch_main_queue_drain + 928
5  libdispatch.dylib              0x11b98 _dispatch_main_queue_callback_4CF + 44
6  CoreFoundation                 0x522f0 
CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
7  CoreFoundation                 0xc1f4 __CFRunLoopRun + 2532
8  CoreFoundation                 0x1f6b8 CFRunLoopRunSpecific + 600
9  GraphicsServices               0x1374 GSEventRunModal + 164
10 UIKitCore                      0x513e88 -[UIApplication _run] + 1100
11 UIKitCore                      0x2955ec UIApplicationMain + 364
12 AppName                   0x48dac most important + 17 (AppDelegate.swift:17)
13 ???                            0x1008edce4 (Lacking) 

Right here is my operate:

@objc func sendDataRecursively() {
    let reachability = attempt! Reachability()
    if reachability.connection != .unavailable {
        DispatchQueue.international(qos: .userInitiated).async { //earlier .bakground
        
            if self.msgCnt == 127 {
                self.msgCnt = 0
            }
            self.msgCnt += 1
            self.sendRequest()
        }
    } else {
        DispatchQueue.most important.async {
            self.previousStatusWhenDisconnect = self.motionDetectionLbl?.textual content ?? ""
            self.appDelegate.statusLbl?.textual content = String(format: "%@ %@", (self.appDelegate.statusLbl?.textual content)!, StartVCStringsEnglish.disConnectedString)
        }
        self.networkTimer = Timer.scheduledTimer(timeInterval: 1, goal: self, selector: #selector(self.checkNetworkRecursively), userInfo: nil, repeats: true)
    }
}

[ad_2]

RELATED ARTICLES

Most Popular

Recent Comments