-
Become a Simulator expert
Simulator runs your iOS, iPadOS, tvOS, or watchOS apps directly on your Mac — no separate device required. We'll give you a tour of the app's latest tools and features and show you how to sharpen your Simulator skills. Discover how to test pointer and trackpad support, adjust Simulator preferences, and use command line tools like simctl to help you simulate push notifications in a development environment.
While you can get a quick overview of Simulator in this session, for more detailed information about the tool you may want to refresh yourself on “Getting the Most Out of Simulator” from WWDC19.Recursos
Vídeos relacionados
WWDC19
-
Buscar neste vídeo...
-
-
11:32 - Grant permission to protected resources
xcrun simctl privacy booted grant calendar com.example.MyApp xcrun simctl privacy booted grant photos com.example.MyApp xcrun simctl privacy booted grant contacts com.example.MyApp -
11:54 - Revoke permission to protected resources
xcrun simctl privacy booted revoke calendar com.example.MyApp xcrun simctl privacy booted revoke all com.example.MyApp xcrun simctl privacy booted reset all -
12:47 - Sample push notification for Simulator
{ "Simulator Target Bundle": "com.example.MyApp", "aps": { "alert": { "title": "Push Notification", "subtitle": "New fruit smoothies are available", "body": "We know you'll love these delicious concoctions 🥰" } } } -
13:15 - Send a push notification to a specific Bundle ID
xcrun simctl push booted com.example.MyApp payload.json -
13:43 - Send a push notification to the Bundle ID in the payload
xcrun simctl push booted payload.json -
14:40 - Record a video
xcrun simctl io booted recordVideo video.mp4 -
15:48 - Record a video in H.264 without the device mask
xcrun simctl io booted recordVideo --codec h264 --mask ignored video.mp4 -
16:23 - Record a video of the external display
xcrun simctl io booted recordVideo --display external external.mp4 -
18:00 - Override the status bar
xcrun simctl status_bar booted override --time 12:01 --cellularBars 1 --dataNetwork 3g --wifiMode failed -
18:16 - Clear status bar overrides
xcrun simctl status_bar booted clear -
18:47 - Add a certificate to the root store
xcrun simctl keychain booted add-root-cert myCA.pem
-