- March 23, 2015
- Categories: Mobile
Testing an iOS browser using Safari on Desktop
Prerequisites
- Safari v7+ or greater is required to debug on iOS8 - NOTE: At time of writing, this is the current iOS iteration.
- Safari v6 is required to debug on < iOS8. (Example: iOS7/6/5).
Steps
- On your mobile device goto "Settings" > "Safari" > "Advanced" and enable "Web Inspector".
- Plug your device into your development machine via. USB
- Ensure you have the "Develop" menu option enabled in Safari on your desktop. If not, from Safari on your desktop. "Preferences" > "Advanced" > "Show Develop Menu".
- With your device now plugged in you should see: [Your Device Name] iPhone|iPad (Example: "Tony's iPhone") appear in the "Develop" menu. Selecting this menu item will then show you all of the browser tabs you have open in Safari on your mobile device. Similarly to Android; you will then be able to use the Developer Tools on your desktop to debug the browser on your mobile device.
Testing a Droid browser using Chrome on Desktop
Prerequisites
- Both the device and your development machine must have a newer version of Chrome on them (v32 or greater). In the case of mobile devices, access the Google Play (App Store) and download the latest version of Chrome.
Steps
- On the mobile device goto "Settings" > "About Device" > "Developer Options". (If Developer Options isn't enabled, find "Build Number" and tap 7 times (not kidding!), you will see an option to enabled "Developer Options").
- In Developer Options select "Enable USB Debugging"
- Plug your device into your development machine via. USBFrom your development machine, in the URL bar of Chrome type "chrome://inspect/" > And then choose "Devices".
- You should then see a list of all the browser tabs open on the mobile device from your desktop. You can then use the Developer Tools in your desktop browser to control and get debug information about the browser on your mobile device!
Further Reading:
- Reference Article - http://www.smashingmagazine.com/2014/09/03/testing-mobile-emulators-simulators-remote-debugging/2/
- Apple Specifics - https://developer.apple.com/safari/tools/
- Android Specifics - https://developer.chrome.com/devtools/docs/remote-debugging