应用程序在发布时不会加载

时间:2017-09-17 06:43:54

标签: ios swift xcode

这是模块文本:

    2017-09-17 01:39:10.218262-0500 Metropolitan League 1.5.2[2274:615110] Unknown class _TtC25Metropolitan_League_1_5_111OpenMapView in Interface Builder file.
2017-09-17 01:39:10.256692-0500 Metropolitan League 1.5.2[2274:615110] Unknown class _TtC25Metropolitan_League_1_5_27mapView in Interface Builder file.
2017-09-17 01:39:10.290714-0500 Metropolitan League 1.5.2[2274:615110] libMobileGestalt MobileGestaltSupport.m:153: pid 2274 (Metropolitan League 1.5.2) does not have sandbox access for frZQaeyWLUvLjeuEK43hmg and IS NOT appropriately entitled
2017-09-17 01:39:10.290764-0500 Metropolitan League 1.5.2[2274:615110] libMobileGestalt MobileGestalt.c:550: no access to InverseDeviceID (see <rdar://problem/11744455>)
2017-09-17 01:39:10.337915-0500 Metropolitan League 1.5.2[2274:615110] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x12bd12660> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mapView.'
*** First throw call stack:
(0x188026fe0 0x186a88538 0x188026ca8 0x188a3b64c 0x18e4bc2fc 0x18e6600d8 0x187f47fac 0x18e65eacc 0x18e4bf2d4 0x18e28946c 0x18e157b68 0x18e20fff0 0x18e20fec8 0x18e20f1f8 0x18e20ec2c 0x18e20e7e0 0x18e20e744 0x18e15507c 0x18b345274 0x18b339de8 0x18b339ca8 0x18b2b534c 0x18b2dc3ac 0x18b2dce78 0x187fd49a8 0x187fd2630 0x187f02dc4 0x18e1c2384 0x18e1bd058 0x1000f27a8 0x186f1159c)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

我需要在故事板和swift文件中寻找什么以适应这个问题?

该类已正确命名和连接。

3 个答案:

答案 0 :(得分:1)

从故事板中的viewcontroller检查IBOutlet of mapView是否正确连接。这可能是您崩溃的根本原因。

尝试将mapView从storyboard重新连接到ViewController类。它将解决您的问题

答案 1 :(得分:1)

您的IBOutlet无效。执行以下操作来修复它:

  1. 转到您的故事板
  2. 单击具有MapView
  3. 的视图控制器
  4. 点击右侧meny上的Connections检查器按钮(带有右箭头的那个)/或右键单击MapView
  5. 删除所有插座
  6. 转到您的代码并删除MapView
  7. 的插座
  8. 重新创建插座
  9. 运行您的项目

答案 2 :(得分:1)

这是因为您可能创建了一个名称为Outlet的插座:&#39; mapView&#39;然后将其名称更改为源中的其他名称。请确认您在UI中连接的插座名称和您在源代码中引用的名称是相同的。如果这不能解决问题,请提供更多详细信息。希望这有帮助!

相关问题