升级到XCOde 8.3和iOS 10.3以及我的iPhone后,我的项目不再有效了。
在我的地图上选择注释时,应用程序崩溃,并且此行在调试器中突出显示:
func mapView(_ mapView: MKMapView, didSelect view: MKAnnotationView) {
崩溃日志就是这个:
Version: 1 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: app.TEST.test [1370]
Date/Time: 2017-03-29 11:34:09.4286 +0200
Launch Time: 2017-03-29 11:33:38.3835 +0200
OS Version: iPhone OS 10.3 (14E277)
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000016fc5b690
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Triggered by Thread: 0
Filtered syslog:
None found
Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 TEST 0x0000000101c2a3f0 0x100098000 + 28910576
1 ??? 0x000000016fd39f48 0 + 6171107144
2 TEST 0x0000000101f6f93c 0x100098000 + 32340284
3 MapKit 0x0000000195f23888 -[MKMapView annotationManager:didSelectAnnotationRepresentation:] + 764
4 MapKit 0x0000000195ee417c -[MKAnnotationManager selectAnnotation:animated:avoid:] + 720
5 MapKit 0x0000000195f15cdc -[MKMapView _handleSelectionAtPoint:] + 552
6 UIKit 0x000000018ff47c54 -[UIGestureRecognizerTarget _sendActionWithGestureRecognizer:] + 64
7 UIKit 0x000000018ff4b488 _UIGestureRecognizerSendTargetActions + 124
8 UIKit 0x000000018fb05540 _UIGestureRecognizerSendActions + 252
9 UIKit 0x000000018f9a745c -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 720
10 UIKit 0x000000018ff3b72c _UIGestureEnvironmentUpdate + 988
11 CoreFoundation 0x00000001897f49a0 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32
12 CoreFoundation 0x00000001897f2628 __CFRunLoopDoObservers + 372
13 CoreFoundation 0x00000001897f2a74 __CFRunLoopRun + 956
14 CoreFoundation 0x0000000189722d94 CFRunLoopRunSpecific + 424
15 GraphicsServices 0x000000018b18c074 GSEventRunModal + 100
16 UIKit 0x000000018f9db130 UIApplicationMain + 208
17 TEST 0x0000000100ac54d8 0x100098000 + 10671320
18 libdyld.dylib 0x000000018873159c start + 4
我不知道这里会发生什么。 任何帮助将不胜感激。
我的代码在XCode 8.2.1和iOS 10.2.1上工作正常(但我不能降级......)
此致 亚历