gpt4 book ai didi

swift - CoreData 崩溃错误 Xcode 11 Beta、IOS 13 Beta

转载 作者:行者123 更新时间:2023-12-02 00:57:57 26 4
gpt4 key购买 nike

我正在尝试在手机 IOS 13 Beta 上从 Xcode11 beta 构建我的应用程序。我在加载应用程序时发生崩溃。

2019-07-22 13:58:12.910460+0300 GoodWine[3738:792501] [error] fault: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will default to using "NSSecureUnarchiveFromData" when nil is specified, and transformable properties containing classes that do not support NSSecureCoding will become unreadable.

CoreData: fault: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will default to using "NSSecureUnarchiveFromData" when nil is specified, and transformable properties containing classes that do not support NSSecureCoding will become unreadable.

2019-07-22 13:58:12.910595+0300 GoodWine[3738:792501] [error] CoreData: One or more models in this application are using transformable properties with transformer names that are either unset, or set to NSKeyedUnarchiveFromDataTransformerName. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead. At some point, Core Data will default to using "NSSecureUnarchiveFromData" when nil is specified, and transformable properties containing classes that do not support NSSecureCoding will become unreadable.

CoreData: warning: Property 'value' on Entity 'SFMCKeyValueEntity' is using nil or an insecure NSValueTransformer. Please switch to using "NSSecureUnarchiveFromData" or a subclass of NSSecureUnarchiveFromDataTransformer instead.

最佳答案

我找到了这个解决方案。错误已经消失并且看起来可以工作。我一直在测试。

对于所有 Transformable 属性,我已在数据模型检查器面板中将“Transformer”设置为“NSSecureUnarchiveFromData”。

enter image description here

编辑:

经过几天的测试,我在之前的解决方案中添加了一些内容。

如果更改后应用程序被删除,则先前的解决方案有效。否则,数据模型将无法被识别并从头开始创建,从而丢失所有历史信息(在生产中这是 Not Acceptable !!!)。

我采用的最终解决方案是将这些更改添加到新模型中(遵循此 link )并实现迁移(始终在链接中描述)。

在这种情况下,警告仅在更新后出现一次,然后消失。

关于swift - CoreData 崩溃错误 Xcode 11 Beta、IOS 13 Beta,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57144796/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com