看板 MacDev 關於我們 聯絡資訊
大家好 我的core data裡面有一個 type是 transfermable 主要是把它取出來 再把它 轉成 nsurl. 在ios 10以前都沒有任何閃退問題.... 在ios10之後...由於我在AppDelegate.m的applicationWillResignActive這個method裡面 下了 [context save]這個方法 結果卻在[managedObjectContext save:&error]這行閃退了 我看error log寫著 -[NSURL init] called; this results in an NSURL instance with an empty URL string. Please use one of the documented NSURL initialization methods instead (initWithString:, initFileURLWithPath:, etc.). This message shown only once. -[NSURL transformedValue:]: unrecognized selector sent to instance 0x170667a40 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURL transformedValue:]: unrecognized selector sent to instance 然後我把那個transferrmable的型態改成string在取出來轉成nsurl...就沒事了 代表真的是那行出了問題... 要怎麼改才能維持舊的呢....因為code裡面有很多這種 想從根本解決... 先謝謝各位了... -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.25.107.179 ※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1486729442.A.A68.html ※ 編輯: qnismine (114.25.107.179), 02/10/2017 20:40:20 ※ 編輯: qnismine (114.25.107.179), 02/10/2017 20:40:47