How do I add a device to Xcode devices? - xcode

I have an iPad and an iPhone. My iPhone is listed under devices in Xcode, and I'm trying to add my iPad.
Q: How do I add a device in Xcode?

Sometimes plugging in the device does not bring up the window.
In this case, from the Xcode menu, select Window and then Organizer.

Connect your device to your Mac with cable.
Open XCode
Window -> Devices & Simulators
Tap on your device
Tap to check on "Show as run destination"
Tap to check on "Connect via network"

Open Xcode. Plug in the device. Follow the prompts.

Open Xcode
Window -> Devices & Simulators
On the bottom left of the Devices window is a "+" Sign, Click on it.
Choose a connected device from the list to setup
click "Next"
when complete Click "Done"
Disconnect and Reconnect the Device

Plug your device directly into your mac, don't go through a USB hub as in my case. As soon as I went directly from iPhone to mac, it showed up.

open xcode and in the above option => "Window" click and select " Devices and simulators ". In the opened window you can see bottom left side "+" button .
click and add your device

I added my iPhone,which had the same issue, by changing my deployment target to match the OS on my phone, selecting my phone in the simulation bar (by the play stop links) and clicking the fix issue link.

Connect the device -> Open Xcode -> Click the top runner bar, select the connected device (you may need to scroll up).

Related

How to close a simulator window without closing all of them?

I'm using the iOS simulator on a Mac connected to Visual Studio for debugging a Xamarin app. I launched it for an iPhone and then for an iPad. Then I wanted to close the iPhone window only but couldn’t find a way.
Use the File / Close Window (CMD-W) to close the current window (i.e. each Simulator is running in its own window).
As well as File/Close as shown by #SushiHangover, with Bezels turned off (Menu:Window/Show Device Bezels) the red 'Close' button on each window also closes just that simulator:
(You can use Hardware/Device from the menu to check which simulators are currently active.)

Wireless debugging icon not showing in my Xcode 9

I just download Xcode 9 and was going through wireless debugging tutorials . I went through this link Wireless debugging but could not make out why my wireless debugging icon is not showing. My device is iPhone 6s updated to iOS 11. and the debugging icon is missing . Snaphot . The icon is missing.
What I got from others tutorial, is the icon they are getting, which I am not getting. Like this in apple documents. .
Network icon is not showing because your device is not paired up to the MAC you are using. If it's not working by connecting to the same WiFi network. you can connect to same network via Bluetooth.
Turn on Bluetooth of your device.
Turn on Bluetooth of your MAC.
Pair up the MAC to the device Bluetooth.
You can see the network icon next to the device name in Xcode -> window -> Devices & Simulator -> select the device.
This worked for me. Hope this helps!
The following steps worked for me:
Connect the iPhone to your mac book
Wait until the device setup is completed
Make sure the mac book and your iPhone are connected to the same Wifi network
In Xcode, Open Window -> Devices and Simulators and see the device appearing under the list of Connected devices.
Select your device and check the "Connect via network" box
Disconnect the device from your mac.
The device will appear under the list of disconnected devices in the same window.
Right click on your device and select "Connect via IP Address"
Enter the IP address of your phone and click connect.
To get the IP address of your iPhone:
On your iPhone, go to Settings -> Wi-FI and tap on the connected wifi network.
You will be able to see the your iPhone's current IP address for the selected Wi-Fi network.
This is working for me without any issues. Hope it helps you too
After pairing the iPad with my mac over bluetooth I didn't got that network icon on the iPad on the device list. Then I start to check for install provisioning profile. And immediately Xcode automatically sync the profile and seems all good for me.
The iPad was new, and it didn't have the provisioning profile install on it.
To check the provisioning profile. Press command + shift + 2 to open the Devices and Simulators. Select the Device category. Under Device category there is the list of connected device. Just press the right button of the mouse or two finger tap on the device.
What worked for me was to un-pair the device, and then I tapped "Trust computer" on the iPhone and then the network globe reappeared.

Can I access iPhone Log on iOS8 from ICU running in Mavericks

A few iPhones in my company have been updated to IOS8 and I cannot see their console using iPhone Configuration Utility 3.5 (Mavericks). I can see the console on devices with iOS7.
I really don't want to install Yosemite on another partition just to be able to view logs. Is there some other tool that will allow me to view the logs on the iPhone?
Follow the steps below,
1) Upgrade/Use Xcode 6.
2) Connect device to system.
3) Go to 'Window' menu present in Xcode menu bar.
4) Select 'Devices'.
5) Click on device name which is showing in left side pan of Devices window under "DEVICES" heading.
6) Check the right side pane of Devices window it should be showing 'Device Information', 'Installed
Apps' and below that a Device console. If you are not able to see Device console click on Up headed arrow button that is 'Show the device console' button present at bottom of window.

Xcode Doesn't Recognize My Device After OS Upgrade

This has to be a simple configuration issue, but I don't know my way around the build settings very well.
I upgraded my iPad from 4.3 to 5.0. I am using Xcode 4.2. When I plug my device in, it is not showing up on run button, and I have a message that it can't run using the selected device.
What do I have to do?
Open Xcode, go to Window -> Organizer and find your device. Click the "Use for Development" button to get Xcode to recognise it again.
go to your iphone device, settings->Reset->Reset All Settings. Close Xcode, restart XCode, device should be in the list now.
Restarting USB process worked for me.
Run sudo pkill usbmuxd on terminal
or
Open Activity Monitor and select Disk by tapping from segment control and search usbmuxd, select the same and force quite/quite.
Note: before doing above stuff, remove device and quite Xcode.

Browse the files created on a device by the iOS application I'm developing, on workstation?

I'm developing an IOS app that creates files on the device, e.g. with NSKeyedArchiver.
During Android development it's possible to browse a device filesystem when it's connected to your workstation via USB, for instance to help with troubleshooting your app.
However for IOS I don't see anything similar under the Organizer in Xcode, to help me browse files my app creates from the workstation. Googling "iOO browse device files", "iPhone view files" etc. reveals solutions for jailbroken devices but not for regular devices provisioned for development.
How can I browse files on a device created by an iOS app I'm developing?
In Xcode's Organiser, go to your device's Summary tab. Find your application in the list, and click the disclosure triangle. Under it, you should see an icon saying "Application Data". Click the down pointing arrow to download the data, and it'll prompt you for somewhere to save it.
In Xcode 5, listed under your device in Organizer, click on "Applications" and you can see "Data files in Sandbox" in the bottom half of the window.
In Xcode 6, go to Window -> Devices, select the device, select the app name under Installed Apps, click the settings gearbox, then select Download container.... In finder, double finger tap the package and select Show package contents.
In Xcode 6, open the Devices window:
Then, select the app (in Installed Apps) and then click the gear icon and select Download Container.
Pls note, that you can view contents of downloaded .xcappdata container by right click on it and select "Show Package Contents"
iExplorer works like a charm! Just used it to export some app files! http://www.macroplant.com/iexplorer/download-ie3-mac.php
In Xcode9: / Window / Devices and Simulators
Select the desired installed app, click the gear at the bottom and Download container...
In Finder, "right-click" the downloaded file and Show Package Contents to open it in a new Finder window.
I hope it's useful. Peace.
XCode version : 10.2.1
goto window -> Devices and Simulators
and after that choose your device from the left list, choose the app from the installed app, so you can press show container for show app's contains on the new page on xcode, press download container to download it to your OSX, also you can replace an old container to the moment state with Replace container...

Resources