Inspecting elements on an iPhone can be a valuable tool for developers and those curious about the web design or hidden information of web pages. With the use of the Shortcuts app, you can easily set up a method to view web page elements on your device. Follow the steps below to learn how.
How to Inspect Element on an iPhone
- Open the Shortcuts application on your iPhone.
- Tap the plus icon in the top right corner to create a new shortcut.
- Tap the search bar, type ‘share‘ and select the share action from the results.
- In the new action block, tap input and select shortcut input.
- Tap on the input button and select shortcut input again.
- Tap on the blue text to choose the types of content you want to receive. Tap on clear to deselect everything.
- Enable Safari web pages and tap on done.
- Now, tap on nowhere in the receive block.
- On the details page, enable the show in share sheet toggle and then tap on done.
- Tap the search bar again, type ‘run‘ and select run JavaScript on web page.
- The shortcut is now set up to extract all links from a web page from the share sheet using the default script.
- Following these steps, you can easily inspect element on an iPhone.
Understanding the Process
The ability to inspect elements directly from your iPhone offers a seamless way to analyze web pages on the go. By using the Shortcuts app, iPhone users can replicate some of the functionality typically reserved for desktops, enabling them to run JavaScript and extract information without needing additional apps or software.
Watch the video version: Watch on YouTube
This method leverages the iPhone’s built-in capabilities to adapt the classic web developer tools to a mobile environment. It provides a practical solution for developers needing to quickly assess web page elements directly from their device, ensuring compatibility and design correctness across platforms.
In addition to inspecting links and elements, setting up such shortcuts can enhance your understanding of how websites are structured. As this tutorial demonstrates, with the right tools and steps, even intricate tasks can be simplified for everyday use.
