-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to call diagnosticsForApplicationWithBundleID from fbsimctl? #391
Comments
This can currently be inferred from a running Application, but not for an Application that is not running. We could expose this in |
We could persist this data by writing to a file that maps bundle_id to Application Documents jail every time |
I'm currently using this approach. I calculate the data application path: def app_path(bundle_id)
path = `xcrun simctl get_app_container booted #{bundle_id}`.strip
raise 'get_app_container command failed' unless $CHILD_STATUS.success?
path = join(path, '../' * 4, 'Data/Application')
raise "path doesn't exit: #{path}" unless File.exist? path
path
end then parse the plists until I find a match: def metadata_id(plist)
result = `/usr/libexec/PlistBuddy -c 'Print MCMMetadataIdentifier' "#{plist}"`.strip
raise 'PlistBuddy command failed' unless $CHILD_STATUS.success?
result
end
I think exposing the currently app's directory is sufficient for my use case. EarlGrey writes data to this directory and I'm trying to copy the results to a new folder after the tests finish executing.
If there was a fbsimctl command to list all the currently known bundle_id mappings then I think that'd work as well. |
I wasn't aware that it was possible to get the App Container in that way, but I suppose that makes sense given iOS has to know the path of the Application container in any case. With that knowledge it should absolutely be possible to add this as an API in |
This is how we have been finding the data container in Calabash iOS and in Xamarin UITest. |
I'm trying to get the
data/Containers/Data/Application/<app_id>
path using thediagnose
command.$ fbsimctl --state=booted diagnose bundle.id
xcrun works.
The text was updated successfully, but these errors were encountered: