hachinoBlog

hachinobuのエンジニアライフ

The model used to open the store is incompatible with the one used to create the store の対処法

DBの定義ファイルをいじった後に前回のsqliteファイルが残っていると
データ形式が違うといって出るエラー。
アプリにあるsqliteファイルを削除してやることで解決する。
場所は
/Users/[ユーザー名]/Library/Application Support/iPhone Simulator/[version]/Applications/C8C5D84A-1E8C-45F1-97DA-xxxxxx/Documents/プロジェクト名.sqlite

コマンドラインで
cd /Users/[ユーザー名]/Library/Application Support/iPhone Simulator/
find ./ -name プロジェクト名.sqlite
上記で出てきたファイルをrmしてやれば良い。

インストールする時は一度アプリを消してプロジェクトをクリーンしてからやった方が良いと思う。。

参考URL
http://u2k772.blog95.fc2.com/blog-entry-167.html