Comment re-migration code and use getAppGroupSQLiteFilePath instead. Build the app, check that the path is an app group path. Then uncomment re-migration code, use getSQLiteFilePath and build the app. Check that it works and sqlite file path is app-specific. It is essential that app is not uninstalled between those two steps.