Stop Using iPhone For Development - iphone

So I plugged in an iPhone, and pressed the big Use Device For Development button, and now I want to disable that, as I no longer need it.
The Developer item in Settings.app on the device is annoying. How do I stop using it for development?

Hold down the Home and Sleep/Wake buttons until you see the Apple logo. Once restarted you will no longer see the Developer entry in Settings.app. You will also need to ignore the device in Xcode or it will just activate the tools again the next time you connect your iPhone.

You should be able to right click it in Organizer and hit "Ignore Device" or something along those lines.

For iPhones without a home button, press the sleep/wake button and the volume down button at the same time until you see "Slide to Power Off". Proceed to power off the device, and then restart it (hold the sleep/wake button until the Apple logo appears). Once the device boots, the Developer option in settings should be gone. Reconnecting the device to Xcode will cause this option to reappear.

Related

Keep iphone unlocked when building it in xcode

When I use the build button in xcode to run my cordova app on the phone, if the build process take too long I get a "Device locked" error.
Is there a way or any hack I can do to keep my iphone unlocked when it's building? Is there a way to tell xcode to keep my phone unlocked?
The easiest fix for this is to disable sleep mode (for up until ~1hr) for your phone. Then you won't have to worry about it locking.
Open the Settings app.
Tap Display & Brightness.
Tap Auto-Lock.
If this option is grayed out, visit this Lock screen settings tip to
learn what to do. Set the lock feature to a time that works for you.
To fiddle with the phone's auto lock duration whenever you're working, and then changing it back to normal is not ideal for me since I use my primary phone for testing apps too. My workaround was to run a youtube video on silent and let iOS switch it to my testing app whenever the build is ready!

How do I force-quit an individual app on an actual Apple Watch (not in the simulators)?

When developing an app, it is sometimes useful to force-quit an application without having to re-start the entire device.
On my iPhone, I can force-quit the active app by double-clicking the home button and swiping the app to the top.
For the actual Apple Watch (not the simulators), force-quitting an app is particularly useful since there are sometimes connection problems between Xcode and the watch app. Also, sometimes I would like to force-quit my Apple Watch app when it is not connected to Xcode.
So, how can I force-quit / terminate the active app on the Apple Watch without restarting the entire device?
When the app that you would like to terminate is open:
Press and hold the side button and wait until the shut down screen appear. Then let go of the side button.
Press and hold the side button again until the home screen appears.
Your formerly active app has now been terminated.
PS: The side button is the button below the Digital Crown.

Setting Wallpaper (Background image) in iOS Simulator home screen or lockscreen

I was scratching my brains over something when this popped in my mind. Can we set the simulator's home-screen background image to an image of our choice? Case in point is Xcode 3.2.2 simulator 3.1.3.
Certain versions of the simulator appear to support this, not just for the home screen but for the lock screen too (which you get to with Command ⌘+L):
Drag an image from your Mac to the simulator.
Mobile Safari opens. Click and hold the image.
Choose Save Image.
Go to Photos.app, and into the photo album.
Choose your image, and set it as the home screen background like you do on a device.
You may need to restart the simulator.
Note that since this isn't exactly officially supported, it may or may not work for you depending on your version of Xcode or the simulator.
It is possible (again) with the iOS Simulator version 6 (for iOS6).
First, add some images to your photo library. You can do this by using Mobile Safari (either surf the web or drag a local image to the simulator). Then perform a long press and save to camera roll.
Second, open "Photos", select the image and set as Background.
Third, restart the simulator (this irritated me at first, as it doesn't seem to work immediately)
How to do this for the Simulator in 11.4.
Drag and drop a photo on the phone.
Go to photo app and view app.
On the bottom bar you should see 3 icons. Hit the icon with the Arrow coming out of the box like you would AirDrop it to someone.
On the Options panel you should see Use as Wallpaper right below the AirPlay option.
Cheers
Hmm. Probably, since you cannot set backgroundimage on your homescreen(exept from the locked view) on on actual iPhone pre iOS4, you cannot do so in the simulator either.
Dragged the image onto the simulator (iOS 9.3) as #boltclock suggests, but nothing happened. However, I then noticed that the images I dragged were showing up in the Photos app on the simulator. From there I just set the wallpapers the same way that you set them on a physical device. Did not need to restart the simulator.
I thought I wasn't able to do this, but then I dragged the bottom row of options to the left and low and behold, there is the "Set as wallpaper" option.
:-)
Since this is an old question, I want to confirm this works in Simulator 13.2 for the iPhone 13 Pro Max (I'm running it on on macOS 12.2 Monterey).
In the simulator take Safari to the image you want to set as the background
Right click (or 2-finger press-click on trackpad)
Selected "Add to Photo"s from Pop-up menu
Open Photos app, and click the 'sharing' icon (box with up arrow coming out of it)
Scroll the popup upwards until you see the "Use As Wallpaper" menu item (if you have a Magic Trackpad, you can scroll with a three-finger swipe-up up on the screen)
That's it. You can set the Home and Lock screen that way.
While developing an iOS iPhone app using the simulator, I copied a space scene with just stars for the background and and moved the app icons all to the home screen except left my app icon alone on a different page that way I minimized light and clutter.

Xcode: iPhone screenshots no longer work

I can't be sure when this stopped working because I haven't used it for a while, but it was possibly since I upgraded to the 3.2 SDK. In Organizer, when I select the "Screenshots" tab and press "Capture", nothing happens.
I've tried this with three different devices and I've restarted my Mac. What's happened, and how can I fix it?
I don't have the solution for your problem, but here's a workaround:
Use the device to make your screenshots (press the home and lock buttons simultaneously). The resulting screenshot will be saved on the device.
To transfer the screenshot to your desktop don't use slow-ish iPhoto or iTunes to synchronize. Instead import the images using Preview.app. There's a command in the file menu to import images from your iPhone when it's connected.
On xcode 4.0 (+), you can go to organizer and create a screenshot of device.
Window -> Organizer -> click the device tab and then screenshot button.
Hold command-shift-4. Then drag it across the iPhone screen. This key combination give you the ability to take a screen shot with the size you want.

Does iphone 4 have automatic data persistence?

I loaded some app projects that I had been developing using the iPhone 3.1.3 Simulator. Now I got the 4.0 package, and for some reason when I hit the home button of the simulator to go the home screen and then go back to the app, it's in the same position as I left it. Is this now standard? What if I don't want it to do this? I'd rather have it restart every time.
What you're describing is fast App switching, which is new in iOS 4.
If you want your application to quit each time the user presses the Home button, add the UIApplicationExitsOnSuspend property key to your info.plist and set it to YES (check the box).