<commit_before># ionic-auto-webinspector


## What is it:

A set of two Applescripts and two hooks for automatically launching the Safari Web Inspector after you run your app in the simulator or on your iOS device. The hooks refresh your app once the Inspector is launched so you get your bootup logs. Just install the hooks, change a couple variables for your setup and run `ionic emulate ios` or `ionic run ios` and let the hook work for you. 

## How to use it:

### Step 1:

#### If you want to use the Simulator:

Open `/scripts/deploy-webinspector-on-simulator.applescript`

On line 9 you'll see:

`set initial_view to "YOUR_INITIAL_VIEW"`

Where `initial_view` should be set to the initial page your app bootstraps. For ionic2/3 starter apps, this is `"Home"`. For all ionic-v1 apps, yours will *always* be `"index.html"`. 

**If you're not sure what yours is**, launch your app in Xcode as you normally would. Then go to Develop > Simulator and you'll see what your initial view name is:

![Screenshot 1](/readme_imgs/screenshot1.png?raw=true "How to find your initial view name")

If yours doesnt say  `"Home"`, change it on line 9 to whatever yours is. 

#### If you want to use your iOS device:

You have to change two variables in the script, your device name and the initial view name.<commit_msg>writing docs is hard<commit_after># ionic-auto-webinspector


## What is it:

A set of two Applescripts and two hooks for automatically launching the Safari Web Inspector after you run your app in the simulator or on your iOS device. The hooks refresh your app once the Inspector is launched so you get your bootup logs. Just install the hooks, change a couple variables for your setup and run `ionic emulate ios` or `ionic run ios` and let the hook work for you. 

This repo contains the hooks (in `config.xml`) & their scripts (in `/scripts`). Included in an ionic app to demo it working.

## How to use it:

### Step 1:

#### If you want to use the Simulator:

Open `/scripts/deploy-webinspector-on-simulator.applescript`

On line 9 you'll see:

`set initial_view to "YOUR_INITIAL_VIEW"`

Where `initial_view` should be set to the initial page your app bootstraps. For ionic2/3 starter apps, this is `"Home"`. For all ionic-v1 apps, yours will *always* be `"index.html"`. 

**If you're not sure what yours is**, launch your app in Xcode as you normally would. Then go to Develop > Simulator and you'll see what your initial view name is:

![Screenshot 1](/readme_imgs/screenshot1.png?raw=true "How to find your initial view name")

If yours doesnt say  `"Home"`, change it on line 9 to whatever yours is. 

#### If you want to use your iOS device:

You have to change two variables in the script, your device name and the initial view name.
{'fraction_non_alphanumeric': 0.07591718125681075, 'fraction_numerical': 0.005811841627315656, 'mean_word_length': 4.138059701492537, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1807142', 'n_tokens_mistral': 840, 'n_tokens_neox': 781, 'n_words': 434}