Skip to content

Instantly share code, notes, and snippets.

@chetstone chetstone/
Last active Sep 13, 2018

What would you like to do?
Inspecting React-Native AsyncStorage in iOS Simulator

First, cd into the Async directory.

cd `xcrun simctl get_app_container booted $BUNDLE_ID data`/Documents/RCTAsyncLocalStorage_V1

Then review the manifest:

jq < manifest.json

Then to pretty-print a non-null value in the manifest:

jq '."somekey"|fromjson' < manifest.json

For null values, find the file that has the value:

md5 -s "otherkey"

Then pretty-print that file:

jq < 90f5ba064f8280d4c94b1f0b1a85a79e

Helpful shell aliases

    alias cdasync='cd $(xcrun simctl get_app_container booted $BUNDLE_ID data)/Documents/RCTAsyncLocalStorage_V1'
    function jqkey {
        if  [[ $( cat  manifest.json | jq '.["'"$1"'"]' ) == null ]]
            f=$(md5 -q -s $1)
            echo  NULL -- Printing file $f
            cat $f | jq
            cat  manifest.json | jq '.["'"$1"'"]|fromjson'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.