【发布时间】:2016-10-07 09:41:43
【问题描述】:
我的 xCode 项目出现问题,由于未知原因,在您完成输入后关闭或隐藏键盘时它开始崩溃。在新的 xCode 8 更新之前没有发生这种情况,我希望有人可以在这里帮助我。
这是错误代码
2016-10-07 10:30:13.658061 Stormpath Notes[353:85164] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2016-10-07 10:30:13.659786 Stormpath Notes[353:85164] [MC] Reading from public effective user settings.
2016-10-07 10:30:15.840368 Stormpath Notes[353:85188] 0x17014a030 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x17014a030> { count = 1, transaction: 0, voucher = 0x0, contents =
"Result" => <int64: 0x17003e360>: 29
}
2016-10-07 10:30:15.848842 Stormpath Notes[353:85188] 0x17014c8c0 Daemon configuration query reply: XPC_TYPE_DICTIONARY <dictionary: 0x17014c8c0> { count = 2, transaction: 0, voucher = 0x0, contents =
"Dictionary" => <dictionary: 0x17014c550> { count = 1, transaction: 0, voucher = 0x0, contents =
"ServerURL" => <dictionary: 0x17014cc30> { count = 3, transaction: 0, voucher = 0x0, contents =
"com.apple.CFURL.magic" => <uuid: 0x17024d020> C3853DCC-9776-4114-B6C1-FD9F51944A6D
"com.apple.CFURL.string" => <string: 0x17024fab0> { length = 30, contents = "https://mesu.apple.com/assets/" }
"com.apple.CFURL.base" => <null: 0x1ada4fe80>: null-object
}
}
"Result" => <int64: 0x17003db60>: 0
}
2016-10-07 10:30:15.849389 Stormpath Notes[353:85188] [MobileAssetError:29] Unable to copy asset information from https://mesu.apple.com/assets/ for asset type com.apple.MobileAsset.TextInput.SpellChecker
2016-10-07 10:30:19.636313 Stormpath Notes[353:85188] 0x17014c600 Copy matching assets reply: XPC_TYPE_DICTIONARY <dictionary: 0x17014c600> { count = 2, transaction: 0, voucher = 0x0, contents =
"Assets" => <data: 0x170073540>: { length = 4379 bytes, contents = 0x62706c6973743030d4000100020003000400050006019001... }
"Result" => <int64: 0x170037ba0>: 0
}
2016-10-07 10:30:19.648546 Stormpath Notes[353:85188] 0x17414abe0 Copy assets attributes reply: XPC_TYPE_DICTIONARY <dictionary: 0x17414abe0> { count = 2, transaction: 0, voucher = 0x0, contents =
"Attributes" => <data: 0x1744651c0>: { length = 302 bytes, contents = 0x62706c6973743030d40102030405061a1b58247665727369... }
"Result" => <int64: 0x1740376c0>: 0
}
2016-10-07 10:30:19.652192 Stormpath Notes[353:85188] 0x17014c760 Copy assets attributes reply: XPC_TYPE_DICTIONARY <dictionary: 0x17014c760> { count = 3, transaction: 0, voucher = 0x0, contents =
"Attributes" => <data: 0x17047d340>: { length = 515 bytes, contents = 0x62706c6973743030d4010203040506232458247665727369... }
"Result" => <int64: 0x17003e9c0>: 0
"SandboxExtension" => <string: 0x170256620> { length = 258, contents = "c2ce16136725e2c509a70d9c78cb9c2d8098838e;00000000;00000000;0000000000000015;com.apple.assets.read;00000001;01000003;00000000002c3217;/private/var/MobileAsset/Assets/com_apple_MobileAsset_LinguisticData/12124144ce3f42648e61a6a8064d2fb9b2d42605.asset/AssetData" }
}
2016-10-07 10:30:19.655563 Stormpath Notes[353:85188] 0x17414a240 Copy assets attributes reply: XPC_TYPE_DICTIONARY <dictionary: 0x17414a240> { count = 2, transaction: 0, voucher = 0x0, contents =
"Attributes" => <data: 0x174465c00>: { length = 302 bytes, contents = 0x62706c6973743030d40102030405061a1b58247665727369... }
"Result" => <int64: 0x174037460>: 0
}
2016-10-07 10:30:19.659475 Stormpath Notes[353:85188] 0x17414ad40 Copy assets attributes reply: XPC_TYPE_DICTIONARY <dictionary: 0x17414ad40> { count = 3, transaction: 0, voucher = 0x0, contents =
"Attributes" => <data: 0x174464c80>: { length = 515 bytes, contents = 0x62706c6973743030d4010203040506232458247665727369... }
"Result" => <int64: 0x174026c20>: 0
"SandboxExtension" => <string: 0x17425d5b0> { length = 258, contents = "34106c8c1a75ddc17eab9f02e36f839c9ec6d2f8;00000000;00000000;0000000000000015;com.apple.assets.read;00000001;01000003;00000000002c321a;/private/var/MobileAsset/Assets/com_apple_MobileAsset_LinguisticData/2e428a59a8c74acf82b249f73fcbbc785b892f69.asset/AssetData" }
}
2016-10-07 10:30:39.089880 Stormpath Notes[353:85164] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (_SwiftValue)'
*** First throw call stack:
(0x18f52c1c0 0x18df6455c 0x18f52c108 0x190099620 0x19009b778 0x18f529220 0x19009af04 0x1900994ec 0x19009931c 0x19009a360 0x1000ffbb4 0x100100444 0x19541a1a4 0x19579c4c8 0x1955353e4 0x195534828 0x1955285f8 0x1957a8bb4 0x195398598 0x1957a8868 0x1953a2b44 0x19539dd8c 0x19536e858 0x195b5bcb8 0x195b55720 0x18f4da278 0x18f4d9bc0 0x18f4d77c0 0x18f406048 0x190e89198 0x1953d9628 0x1953d4360 0x100107590 0x18e3e85b8)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
如果有人能解释为什么会发生这种情况,将不胜感激。
【问题讨论】:
-
我觉得跟键盘没关系,是不是后面还有什么执行的?
-
实际上没有执行任何其他操作,它所做的只是在您单击保存按钮时保存笔记。但是,您没有机会单击保存按钮。您单击文本字段并键入您想要的任何内容,然后单击右下角的按钮关闭键盘。当您这样做时,应用程序崩溃,但我不明白为什么会发生这种情况。很困惑
-
对json的一些操作?这就是您的错误所说的 - JSON 写入中的类型无效 (_SwiftValue)
-
老实说,我不是专业编码人员,所以我不明白为什么它说 JSON 存在错误,因为在我更新到 xCode 8 之前代码运行良好。我确实收到了另一个错误AppDelegate.swift - 它突出显示这行代码 class AppDelegate: UIResponder, UIApplicationDelegate { 不知道为什么。它声明了一个 Thread:1 信号 SIGABRT
-
更新“保存到笔记”代码的问题,您是否设置了“异常刹车点”?它停在哪里?
标签: ios xcode project stormpath