# Debugging on iOS
# Starting up
- If you haven't setup Impact for the first time yet, follow the instructions Pitcher Impact initial setup section.
- Start iOS simulator and start Pitcher application
- Select a preferred instance
- When UI opens, launch the interactive you want to debug
- Open Safari and activate Develop menu (needs to be done once)
- Click Develop → Simulator → Interactive name
- 🎉 Safari debugger should be opened as attached to your application in WebView. You are now ready to start watching your changes in your Vue application
# Updating package.json
Before starting, we need to configure our package.json to automate replacing files in simulator folders.
- Go to admin panel and select the instance
- When you have opened your instance, you will see your file list. Find the file id of your application (example: 720440)
- In
package.json
findios:watch
script and replaceHERECOMESMYFILEID
with the file id you copied in step 2 - 🎉 You are now ready to watch changes in your Vue project
# Start debugging
After starting up the simulator and updating your package.json
, Run: npm run ios:watch
in terminal
This setup will now:
- watch your file changes in your Vue project
- build your code on each change
- replace interactive files in pitcher folders
WARNING
You still need to refresh WebView (command + R from Safari debugger) to see changes
# Finding local database
To find the local DB for debugging in SQLite editor, run this in terminal:
find ~/Library/Developer/CoreSimulator/Devices -name pitcher.sql
Open this file with an SQL editor.
# FAQ
# Logging in SFDC asks for verification code
Verification codes are sent to developer group mails. Simply ask someone in your team to get access to the groups.
# ios:watch running but my changes are not applied
This issue might occur when you update XCode or simply delete Pitcher.app in your simulator. The reason is that a new simulator & simulator folder is created under ~/Library/Developer/CoreSimulator/Devices
folder, and your files are copied to the old folder, therefore you can't see the updates inside simulator. To get rid of this issue:
- Go to
~/Library/Developer/CoreSimulator/Devices
- Search for the fileID
- Find out which folder is the active folder that is used by the simulator inside safari devtools
- Delete duplicated folder (the one that is not used) from the file system