충돌 보고서 세부 ("myapp와는"허용 된 시간을 넘어 활성 주장이) :iOS7에 : 백그라운드 작업
Hardware Model: iPhone5,2
Exception Type: 00000020
Exception Codes: 0x000000008badf00d
Highlighted Thread: 3
Application Specific Information:
MyApp[1369] has active assertions beyond permitted time:
{(
<BKProcessAssertion: 0x175ca7d0> identifier: Called by MyApp, from -[AppDelegate applicationDidEnterBackground:] process: MyApp[1369] permittedBackgroundDuration: 180.000000 reason: finishTask owner pid:1369 preventSuspend preventIdleSleep preventSuspendOnSleep
)}
실을 3 :
Thread 3 name: com.apple.NSURLConnectionLoader
Thread 3:
0 libsystem_kernel.dylib 0x3937ea50 mach_msg_trap + 20
1 libsystem_kernel.dylib 0x3937e848 mach_msg + 36
2 CoreFoundation 0x2e61261c __CFRunLoopServiceMachPort + 152
3 CoreFoundation 0x2e610d3c __CFRunLoopRun + 788
4 CoreFoundation 0x2e57b7a4 CFRunLoopRunSpecific + 520
5 CoreFoundation 0x2e57b586 CFRunLoopRunInMode + 102
6 Foundation 0x2efbb23c +[NSURLConnection(Loader) _resourceLoadLoop:] + 316
7 Foundation 0x2f030a0a __NSThread__main__ + 1058
8 libsystem_pthread.dylib 0x393f8956 _pthread_body + 138
9 libsystem_pthread.dylib 0x393f88c6 _pthread_start + 98
10 libsystem_pthread.dylib 0x393f6ae4 thread_start + 4
applicationDidEnterBackground :와 "에서이 코드를 백그라운드 태스크를 사용하여 내 응용 프로그램 ":
// 10min background task
UIBackgroundTaskIdentifier myLongTask;
myLongTask = [[UIApplication sharedApplication]
beginBackgroundTaskWithExpirationHandler:^{
[locationMgrInstance timerSet];
}];
// cell change
[locationMgrInstance startMonitoringSignificantLocationChanges];
iOS 6에서 잘 작동하지만 ...! 180 초 후에 iOS 7이 어설 션합니다. 도움!
감사하지만, 나는 그 코드 (beginBackgroundTaskWithExpirationHandler)를 사용할 때 응용 프로그램이 10 분마다 1 분마다 호출됩니다. – jake85
하지만 코드에서 endBackgroundTask를 호출하는 위치는 어디입니까? – Paulw11
오! 나는 그 방법을 부르지 않아. 내 사건을 의미하니? – jake85