{"id":534,"date":"2014-09-01T16:04:12","date_gmt":"2014-09-01T08:04:12","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=534"},"modified":"2016-07-15T14:22:45","modified_gmt":"2016-07-15T06:22:45","slug":"attempt-to-set-a-non-property-list-object-as-an-nsuserdefaults-value-for-key","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/analysis\/2014\/09\/01\/160412534.html","title":{"rendered":"Attempt to set a non-property-list object as an NSUserDefaults value for key"},"content":{"rendered":"<p><strong>2014-09-01 15:55:54.703 RouteMapInformation[26443:60b] Attempt to set a non-property-list object (&#8220;\\U4e00\\U952e\\U627e\\U8f66\\Uff0c\\U65b9\\U4fbf\\U5feb\\U6377\\Uff0c\\U7701\\U65f6\\U7701\\U529b&#8221;,&#8221;<RMGuideView: 0x9b58d90; baseClass = UILabel; frame = (0 0; 320 480); text='\\U4e00\\U952e\\U627e\\U8f66\\Uff0c\\U65b9\\U4fbf\\U5feb\\U6377\\Uff0c\\U7701\\U65f6\\U7701\\U529b'; gestureRecognizers = <NSArray: 0x9b662f0>; animations = { opacity=<CABasicAnimation: 0x9b46e20>; }; layer = <CALayer: 0x9b419e0>>&#8221;<br \/>\n) as an NSUserDefaults value for key RMGuideView<\/strong><\/p>\n<p>\u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u7684\u6839\u672c\u539f\u56e0\u662f\u4ec0\u4e48\uff0c\u5176\u5b9e\u6700\u540e\u4e00\u884c\u6709\u5173\u952e\u5b57\u201c<strong>NSUserDefaults<\/strong>\u201d\uff0cNSUserDefaults \u4e0d\u80fd\u7528\u6765\u5b58\u50a8\u56fe\u50cf\u5bf9\u8c61 \uff0c\u8fd9\u662f\u56e0\u4e3a\u6b63\u5982\u5f02\u5e38\u8bf4\uff0c UIImage \u4e0d\u662f\u4e00\u4e2a\u5c5e\u6027\u5217\u8868\u5bf9\u8c61\u3002\u5c5e\u6027\u5217\u8868\u662f\u8fd9\u4e9b\uff0c\u548c\u4ec5\u662f\u8fd9\u4e9b\u7c7b \uff08\u6216\u4efb\u4f55\u5b50\u7c7b\uff09 \u7684\u5bf9\u8c61\u7684\u7ec4\u5408\uff1a<br \/>\nNSArray<br \/>\nNSDictionary<br \/>\nNSString<br \/>\nNSData<br \/>\nNSDate<br \/>\nNSNumber\u80fd\u591f\u4fdd\u5b58\u5728NSUserDefaults\u4e2d\u7684\u5bf9\u8c61\u53ea\u80fd\u662f\u4e0a\u8ff0\u51e0\u79cd\u6216\u7ec4\u5408\uff0c\u5e76\u4e14\u5185\u90e8\u5b50\u5143\u7d20\u4e5f\u53ea\u80fd\u662f\u4ee5\u4e0a\u51e0\u79cd\uff0c\u6bd4\u5982\u521b\u5efa\u4e00\u4e2a\u56fe\u7247UIImage\u6570\u7ec4Array\uff0c\u518d\u5c06\u6570\u7ec4Array\u4fdd\u5b58\u5230NSUserDefaults\u4e2d\uff0c\u8fd9\u6837\u662f\u4e0d\u884c\u7684\uff0c\u90a3\u4e48\u4e00\u5b9a\u8981\u5c06UIImage\u56fe\u7247\u4fdd\u5b58\u4e0b\u6765\u8be5\u5982\u4f55\u505a\u5462\uff1f\u7528NSData\u683c\u5f0f\u5316\u7f16\u7801\uff0c\u81f3\u4e8e\u5982\u4f55\u7f16\u7801\u4e0d\u5c5e\u4e8e\u672c\u6b21\u8ba8\u8bba\u7684\u8303\u7574\uff0c\u53bb\u770b\u770bNSData\u7684\u7528\u6cd5\u5c31\u660e\u4e86\uff0c\u5f88\u7b80\u5355\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>2014-09-01 15:55:54.703 RouteMapInformation[26443:60b] Attempt to set a non-property-list object (&#8220;\\U4e00\\U952e\\U627e\\U8f66\\Uff0c\\U65b9\\U4fbf\\U5feb\\U6377\\Uff0c\\U7701\\U65f6\\U7701\\U529b&#8221;,&#8221;&#8221; ) as an NSUserDefaults value for key RMGuideView \u51fa\u73b0\u8fd9\u79cd\u60c5\u51b5\u7684\u6839\u672c\u539f\u56e0\u662f\u4ec0\u4e48\uff0c\u5176\u5b9e\u6700\u540e\u4e00\u884c\u6709\u5173\u952e\u5b57\u201cNSUserDefaults\u201d\uff0cNSUserDefaults \u4e0d\u80fd\u7528\u6765\u5b58\u50a8\u56fe\u50cf\u5bf9\u8c61 \uff0c\u8fd9\u662f\u56e0\u4e3a\u6b63\u5982\u5f02\u5e38\u8bf4\uff0c UIImage \u4e0d\u662f\u4e00\u4e2a\u5c5e\u6027\u5217\u8868\u5bf9\u8c61\u3002\u5c5e\u6027\u5217\u8868\u662f\u8fd9\u4e9b\uff0c\u548c\u4ec5\u662f\u8fd9\u4e9b\u7c7b \uff08\u6216\u4efb\u4f55\u5b50\u7c7b\uff09 \u7684\u5bf9\u8c61\u7684\u7ec4\u5408\uff1a NSArray NSDictionary NSString NSData NSDate NSNumber\u80fd\u591f\u4fdd\u5b58\u5728NSUserDefaults\u4e2d\u7684\u5bf9\u8c61\u53ea\u80fd\u662f\u4e0a\u8ff0\u51e0\u79cd\u6216\u7ec4\u5408\uff0c\u5e76\u4e14\u5185\u90e8\u5b50\u5143\u7d20\u4e5f\u53ea\u80fd\u662f\u4ee5\u4e0a\u51e0\u79cd\uff0c\u6bd4\u5982\u521b\u5efa\u4e00\u4e2a\u56fe\u7247UIImage\u6570\u7ec4Array\uff0c\u518d\u5c06\u6570\u7ec4Array\u4fdd\u5b58\u5230NSUserDefaults\u4e2d\uff0c\u8fd9\u6837\u662f\u4e0d\u884c\u7684\uff0c\u90a3\u4e48\u4e00\u5b9a\u8981\u5c06UIImage\u56fe\u7247\u4fdd\u5b58\u4e0b\u6765\u8be5\u5982\u4f55\u505a\u5462\uff1f\u7528NSData\u683c\u5f0f\u5316\u7f16\u7801\uff0c\u81f3\u4e8e\u5982\u4f55\u7f16\u7801\u4e0d\u5c5e\u4e8e\u672c\u6b21\u8ba8\u8bba\u7684\u8303\u7574\uff0c\u53bb\u770b\u770bNSData\u7684\u7528\u6cd5\u5c31\u660e\u4e86\uff0c\u5f88\u7b80\u5355\u7684\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[19],"class_list":["post-534","post","type-post","status-publish","format-standard","hentry","category-analysis","tag-storage"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=534"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/534\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}