ChristianKienle/Core-Data-Editor — pull request #18 by danydev (2014-08-08 22:03:00+00:00)
Title: Create CDEProjectBrowserItem only if Application folder matches for storePath and modelPath

I noticed that when I open the "Project Browser", some applications were duplicated a lot.

Debugging the code that retrieves the application list, I noticed how it duplicates `storePath` and `modelPath` when you installed in more than 1 simulator

MyApp installed on iOS 7.1 and iOS 6.1, and it produces the following array `CDEProjectBrowserItem *`

CDEProjectBrowserItem1
.../7.1Applications/412F2A6B-0F54-4F98-AE1B-DFE99E057DB1/Documents/MyStoreFile.sqlite,
.../7.1/Applications/412F2A6B-0F54-4F98-AE1B-DFE99E057DB1/MyApp.app/v1.momd/v1.mom,

CDEProjectBrowserItem2
.../6.1Applications/F3B606E7-8CC1-48E9-944D-079CE1F77173/Documents/MyStoreFile.sqlite,
.../7.1/Applications/412F2A6B-0F54-4F98-AE1B-DFE99E057DB1/MyApp.app/v1.momd/v1.mom,

CDEProjectBrowserItem3
.../7.1Applications/F3B606E7-8CC1-48E9-944D-079CE1F77173/Documents/MyStoreFile.sqlite,
.../6.1/Applications/F3B606E7-8CC1-48E9-944D-079CE1F77173/MyApp.app/v1.momd/v1.mom,

CDEProjectBrowserItem4
.../6.1Applications/F3B606E7-8CC1-48E9-944D-079CE1F77173/Documents/MyStoreFile.sqlite,
.../6.1/Applications/F3B606E7-8CC1-48E9-944D-079CE1F77173/MyApp.app/v1.momd/v1.mom,

Note how we don't want to have CDEProjectBrowserItem2 and CDEProjectBrowserItem3.
I applied a fix, playing with a NSURL category in order to retrieve the app folder name, making sure that the `storePath` app name matches the `modelPath` app name.
There is an assumption that the app folder name is in the path component after "Applications", but I think it is fine, let me know what you think.