I am trying to figure out what the differences is testing on different layers in regards to accessing the main bundle, documents directory etc.
I know that when testing on the simulator it creates a copy of the execution environment which is separate from xcode. What about on the device and on app store and what is the difference?
The simulator is there as a quick guide. It shouldn’t be relied on as the only method of testing. There are differences between the simulator and device (simulator is not case sensitive, for example) and the simulator can’t provide all functions as the device (compass, camera for example)
There should be no difference between how your code accesses documents directory, etc between the two. As long as you code the correct way (for example, case sensitively), your code should work on both.
When you release to the AppStore, there should be no difference to what you were running on your device. It is just bundled up and signed with the appropriate certificates.