How to keep same document document path for ios simulator, do not change every xcode startup project
As you know, in xcode6 or xcode7 the app documents path will change for every startup project like below
/Users/jakey/Library/Developer/CoreSimulator/Devices/0149D36B-A46E-4326-BF59-AFEF7D2CA8B2/data/Containers/Data/Application/FDCA4FAF-4940-485B-A6B6-5CEE4C75B72F/Documents
but I often use some tools like navicat to access documents. sqlite if every time the path is changed navicat cannot connect db normally.
+3
source to share
2 answers
It's impossible. Each time you click Build and Run, your application is reinstalled, so its container changes.
Xcode 7 has a new simctl subcommand that you might find useful:
$ xcrun simctl get_app_container --help
Usage: simctl get_app_container <device> <app identifier>
You might want to make an alias like:
alias cdmyapp='cd $(xcrun simctl get_app_container booted com.mycompany.myapp)'
Then you can simply run 'cdmyapp' from Terminal.app to enter the application container.
+3
source to share