Contents

Sharing data with Simulator

Enter text directly in Simulator, or share location data, images, web addresses, files, or data from the clipboard with Simulator.

Overview

Some app testing scenarios require location data, specific images, or other data to be present in Simulator. In other cases, such as diagnosing an issue or confirming functionality, it’s useful to capture data from Simulator. Depending on the type of data, there are several methods to get data on your Mac into a simulated device, or to get data from a simulated device to your Mac.

Share a location with Simulator

Send your current location to Simulator from Maps.app on your Mac by clicking the Share button, then select Simulator from the share destination list. Choose the simulated device from the drop-down list. The simulated device updates its location to your current location.

To send a selected location from Maps.app to Simulator, first select a location in Maps.app. Then, click the Share button in the view for the location. Select Simulator from the share destination list, then choose the simulated device from the drop-down list. The simulated device updates its location to the location you shared.

Share a web address with Simulator

To share a web address with Simulator from your Mac, Control-click a web link, then select Share. Alternatively, open a web link in Safari, then select Share. In the Share menu, select Simulator, then choose a simulated device from the drop-down list. The simulated device opens the web link in Safari.

Sync or share clipboard data with Simulator

You can sync Simulator’s clipboard with your Mac, or copy it back and forth.

To sync the Simulator clipboard with the Mac, choose Edit > Automatically Sync Pasteboard. A checkmark indicates that the clipboard is synchronized.

To copy clipboard from Simulator to the Mac, choose Edit > Get Pasteboard.

To copy the clipboard on the Mac to Simulator, choose Edit > Send Pasteboard.

Add images to Photos in Simulator

To put image in Simulator’s Photos app, select one or more images from your Mac, or from Photos.app on your Mac. Drag the images to Simulator. Alternatively, select Share, then select Simulator from the share destination list. Choose the simulated device from the drop-down list. Simulator adds the images and opens Photos to display them.

Add files to Simulator

To add files to Simulator, select one or more files in Finder on your Mac, then click the Share button. Select Simulator from the share destination list. Choose the simulated device from the drop-down list. Simulator opens the Files app, and lets you select where to save the files.

Enter text using the macOS keyboard

Enter text as input to the simulated device using the keyboard on your Mac.

To connect your Mac keyboard to the simulated device, select I/O > Keyboard > Connect Hardware Keyboard.

To show or hide the onscreen keyboard when a hardware keyboard is connected to the device, choose I/O > Keyboard > Toggle Software Keyboard.

To synchronize the iOS and Mac keyboard languages, select I/O > Keyboard > Use the Same Keyboard Language as macOS.

Use game controller input

For a visionOS simulator, you can share the input from a game controller connected to your Mac.

To connect your Mac game controller to an app running in the simulated device, select I/O > Input > Send Game Controller to Device.

See Also

Simulator testing considerations