Build, run & install

Preview devices start with Siri, Spotlight indexing, iCloud and a few other services turned off. Ask an Agent to turn on the ones your app needs, then try again.

A new Preview device starts with the background services apps rarely need turned off, to save memory. If your app uses one of them, the feature that needs it may do nothing in Preview, even when your code is right. An Agent can turn a service back on for the device with simulator services (see services in simulator).

Which services start off

The simulator help names these among the services a new device starts without:

Service Id the help gives it
Siri siri
Spotlight indexing search
iCloud icloud
Photo analysis, Messages, Family Controls, HomeKit The Agent finds them in the device’s list.

The list isn’t complete: the Agent lists the device’s services, by category and feature, to see the rest.

Ask an Agent to turn one on

  1. Note the device you’re looking at: its name is on the device menu, in the navigation bar on iPhone and over the device on the Mac.

  2. In the project’s chat, say which feature does nothing, and on which device, for example:

    On the iPhone in Preview, my notes don't show up in Spotlight search. Turn on what the app needs for that.
  3. The Agent lists the device’s services, then turns on the ones your feature needs with simulator services enable.

  4. It tells you which ones it turned on, and any that came back as pending or failed (see below).

  5. Try the feature again in Preview.

If you know the service, name it:

Turn on Siri and iCloud on the iPad in Preview.

The Agent can also turn everything on (all), but the help says these services start off to save memory, so ask for the ones your app uses. To turn them off again, ask for that: the Agent uses simulator services disable.

When a service doesn’t start

What the Agent reports What it means
pending The service starts only the next time the device starts up. In a cloud Team, a device started again is a fresh one, with the service off again, so it stays off for now. The simulator help doesn’t say what happens on a local Team’s device.
failed The service couldn’t be changed, and the command reports a failure after it lists the result. Ask the Agent what it says.

Either way, try the feature on your own iPhone or iPad. See Install your app on your iPhone.

The change stays on the device

The Preview devices are shared by the Team. A service you had turned on stays on for everyone who uses that device, and for Agents that test on it, until someone turns it off. In a cloud Team, a device other than the default one shuts down when nobody watches or uses it for a while, and every device does when the Team goes to sleep. A device started again is a fresh one, with these services off again. Ask the Agent again when you come back.

Before you test

  • Siri: Preview plays the device’s sound to you, but doesn’t send your voice to the device, so you can’t speak to Siri in Preview. AirBuild’s Siri & Shortcuts page also says “This is what the build declares. Whether Siri runs an App Intent is tested on a device.” See Let people use your app from Siri and Shortcuts.
  • iCloud: the app also needs the iCloud capability. See Turn on iCloud, App Groups or another capability. The simulator help doesn’t say whether iCloud in Preview also needs an Apple Account signed in on the device.

Questions

Can I turn these on myself in Preview?
No. Preview has no switch for them. Ask an Agent in the project’s chat.
It worked yesterday, and today the feature does nothing again.
In a cloud Team, a device that shut down comes back as a fresh one, with the services off. Ask the Agent to turn them on again.
The Agent says the service is pending.
It won’t start on this device for now. Try the feature on your own iPhone or iPad.
Does this change anything on my own iPhone?
No. It changes only the Preview device. On your iPhone, Siri, Spotlight and iCloud are as you set them in its Settings app.
The feature makes my app close.
Have an Agent read the device’s log while it happens. See Find out why your app closes or crashes in Preview.