Check out example codes for "how to view documents folder simulator swift". It will help you in understanding the concepts better.

Code Example 1

xcrun simctl get_app_container booted [app identifier]

Code Example 2

alias cdmyapp='cd $(xcrun simctl get_app_container booted com.mycompany.myapp)'

Code Example 3

po NSHomeDirectory()

Learn ReactJs, React Native from akashmittal.com