title: How to access application data on an iOS 8 device from terminal?
body: <p>We are running some tests on our iOS app.  The app generates a log file in Library/Caches/Logs/.  On an iOS 7 device, we could create an archive of the app, which would contain the app data, and copy the archive to our local machine from the device.  Using the <code>ideviceinstaller</code> utility from <code>libimobiledevice</code> (<a href="http://www.libimobiledevice.org/" rel="nofollow">http://www.libimobiledevice.org/</a>), we could then unzip the archive and extract the log file:</p>
  
  <pre><code># Archive the app and copy to our local machine
  ideviceinstaller --udid  $DEVICE_ID --archive ${BUNDLE_ID} -o copy=.
  
  # Unzip the archive and redirect the log file to a file in our current directory
  unzip -p ${BUNDLE_ID}.ipa "$(unzip -l ${BUNDLE_ID}.ipa | grep -o "Container/Library/Caches/Logs/${LOG_FILE_NAME}")" &gt; ./${LOG_FILE_NAME}
  </code></pre>
  
  <p>Unfortunately this no longer seems to work on an iOS 8 device, because of changes to where an app's data is stored in the file system.  In particular, apparently app data is no longer included in the app archive: <a href="https://developer.apple.com/library/ios/technotes/tn2406/_index.html" rel="nofollow">https://developer.apple.com/library/ios/technotes/tn2406/_index.html</a></p>
  
  <p>We need a way to access this log file on the device, and copy it to our local machine, via a shell script.  I'm pretty new to iOS development, so I'm sort of stumped as to how I might do this or whether it's still possible in iOS 8.</p>
  
  <p>Any suggestions would be greatly appreciated and please let me know if anything needs clarification.</p>