Shut down iPhone in simulator - iphone

This might seem like a strange question, but can I actually shut down the iPhone and restart it in the iPhone simulator? I want to do this to see if my settings are saved and reloaded when the app is relaunched AFTER shutdown.
Thanks

Yes. Press Command+Q to quit the simulator.
This will close all the apps running in the simulator.
Pressing the home button only returns to the home screen without quitting the apps(ios 4 or later) because of multitasking.
You can also double tap the home button, click and hold on the icons at the bottom of the screen till a red circle appear, and click on the red circle to close the running app.

As of XCode 9, the best way to close a single simulator is using the Cmd + W shortcut, or going to File -> Close Window.

If your'e xcode 9.You can now shutdown the simulator by long-pressing the power button.

To close/shutdown one simulated device without closing other simulations, select the device you want to shut down then go to "File" and choose "Close Window".

Related

Disable iPhone backup in Catalina

In OSX before Catalina we could use:
defaults write com.apple.iTunes DeviceBackupsDisabled -bool true
to disable iPhone backups
Does anyone know how to disable in Catalina?
Set the privilege to Read only for the Backup folder (~/Library/Application Support/MobileSync/Backup).
I got a solution for this.
update mac OS to 10.15.1
Then uncheck above option called 'Automatically sync when this iPhone is connected'
Connect your device to your Mac.
In the Finder on your Mac, select the device (your iPhone) in the Finder sidebar.
Select General in the button bar.
[ ] Automatically sync when this iPhone is connected - UNCHECK
Automatically sync when this [device] is connected: To automatically sync when you connect your device, select this tickbox.
Click Apply.
In case a case happens:
When clicking on it to uncheck, then nothing happens besides the Apply button turning grayed out, rendering it totally useless. When coming back to the devices, it's checked and it syncs.
Solution:
Open Activity Monitor
Find process AppleMobileBackup and select it or click on it to be highlighted
Go to menu View→ Quit Process (Alt/Option +  Apple/Command-Cmd + Q → shortcut: ⌥⌘Q )
Press Force Quit
Wait a few seconds and you will be able to press Apply button to turn off automatic sync.
Unchecking doesn't work. every time I reconnect the iPhone it has all the default tick boxes checked - including "Automatically sync when this iPhone is connected" There is no way to prevent Apple from forcing you to sync via finder.

how to re-open Xcode debug log after device crashes, while debugging multiple devices

I start each of three iPad's running my app in each one's own Xcode window, each showing the debug log (NSLog) output for each iPad. So there are three windows showing three iPad's running my app.
When iPad #1 crashes, after a few minutes, my app view disappears and iPad home is shown.
But on Xcode, the window that was showing iPad #1 debug log switches to the debug log of one of the remaining iPad's that are still running.
How can I view the debug NSLog logs for iPad #1 again, so I can see what it was doing when it crashed?
Yes, that was it:
cmd-7
or
View menu > Navigators > Show Log Navigator
then find "Debug" row in the pane on the left, and DOUBLE-CLICK its little right-arrow icon on its left.
I was confused because I single-clicked and it updated the title of the tab of the window to the right but didn't update it. Double-clicking opens a new window with the desired log.
Thanks!

IPhone app crash report

I am building an iphone app.However my app crashes at a point when i run simulator.I want to know the reason.But i don't know how to see crash logs. Please give me some information about how to see crash logs.
in Xcode open the console Window and you will see the crash log.
Use this shortcut to view the console window if it's not already showing:
Debug Area show/hide : ⇧ ⌘ Y
Press the middle button of the view group buttons. It will bring the console and you will see if something happens.

How to exit an app in iphone

Now i have to click the Home button twice and press one app until the close button appear, so many steps. Is there any quick way to exit currently opened app?
You can't with the current SDK.

What can be causing the problem that I can't make a screenshot from my iPhone app in the Organizer window?

For some reason, when I press "Capture" while my device is connected and running the app (launched via Build & Run in Xcode), nothing happens. Never get a screenshot. iPhone OS 3.0. What can be the problem.
I've had this problem—it seems to be caused by there being a screenshot currently selected in the Organizer. Click on the left-hand screenshot pane to highlight it (i.e. deselect whatever screenshot thumbnail is selected), then hit the Capture button.