Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

swift - 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release

I'm receiving a message in the log saying

'bundleNamePlaceholder'[8424:100146] [general] 'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release

The message is not clear to me but I'm assuming that it might be something related to a CoreData object or maybe its content

Is there a way to catch what's throwing this message or what might cause it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

apple is removing NSKeyedUnarchiveFromData at some point because it's not secure by default. if you're storing a transformable value using NSKeyedUnarchiveFromData in coredata, it will then become unreadable.

https://www.kairadiagne.com/2020/01/13/nssecurecoding-and-transformable-properties-in-core-data.html

and https://developer.apple.com/forums/thread/107533


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...