xcode organizer doesn't detect my device - ios

I couldn't see my device in the organizer, although I installed the latest version on my device, so the problem doesn't related to the iOS deployment target.

if you are using iOS 7 in your device then first time when you connect your device to system there is one popup will appear in your device for permission and you need to click on Trust, after that your device will be detected for development in xCode

Related

Prevent Xcode from preparing Apple Watch when running for iOS

I have an iOS app that I want to test on my personal iOS device. I also wear an Apple Watch that's connected normally to this iPhone.
I have not knowingly created any kind of Apple Watch target or code in my Xcode project. I do not want to run or test the app on my Apple Watch. I have not set up the Apple Watch as some kind of development target in Xcode... it's just connected to my iPhone.
Despite this, Xcode continually tries to ready my Apple Watch for development alongside the iPhone. It delays running the iOS app on the iPhone so that it can "prepare" and "fetch" various things from the Watch. These spinners never end and as a result I am unable to deploy the iOS app to the iPhone.
iPhone is busy: Preparing Apple Watch for development via iPhone
Xcode will continue when iPhone is finished.
iPhone is busy: Fetching debug symbols for Apple Watch paired to iPhone
Fetching debug symbols for the watch
Installing Symbols for watchOS 7.4
Apple Watch via iPhone: Failed to prepare device for development.
This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility.
How can I fully hide this Apple Watch from being seen by Xcode? Disable any kind of development on the Watch? Deploy the iOS app to the iPhone without involving the connected Apple Watch at all?
I'm not interested in "fixing" the errors and warnings... I want the Apple Watch to not be used at all by Xcode.
Found this workaround, worked for me.
Unplug iPhone
Switch flight mode on the Watch
Switch off Bluetooth on the Watch
Plug the iPhone back in and build
Good luck!
https://developer.apple.com/forums/thread/691452?answerId=704424022#704424022
Additionally, make sure you've updated Xcode to a version that supports your iOS/watchOS version (proper SDKs) - I've found this to be necessary to avoid the interminable 'preparing...' phase.
For me just turning off Wifi and Bluetooth on the phone worked. So follow the below steps:
Stop the Xcode project
Turn off WIFI and Bluetooth on your phone only
Run the Xcode project
If you've installed Xcode from Mac App Store, I've experienced a few cases where Xcode just won't update. (and it says "no update" even if you check for update from the app menu)
Solution: login to your Apple Developer account, then click this link.
https://developer.apple.com/download/all/?q=Xcode
Download the latest version of Xcode .xip file (as of today Xcode 13.3.xip) then move the file to /Applications.
Delete current install of Xcode, then double-click the .xip just downloaded to install it.
It should then work and continue to receive future updates.
Just powering off the watch, unplug/replug device, and restart Xcode worked for me!

Instrument with iOS 9.3.1 [duplicate]

I have been trying unsuccessfully to profile my device (via Instruments) using the latest version of Xcode 7.0.1 (7A1001 released 9/28), as well as the previous version of Xcode 7 (7A218), as well as Xcode 7.1 Beta 2 (7B75).
My device is an iPhone 6+ with iOS 9.0.1 installed - the latest GM release of iOS9. I am able to run / debug applications on this device without issues.
In the screenshots below you can see that my device is disabled (greyed out) in all screenshots in all versions. I am able to profile other devices running iOS 8.4.1 without any issues.
Does the current version of Xcode not support profiling against iOS 9.0.1 or is there some kind of configuration setting or known work around for this?
Xcode 7.0.1:
Xcode 7.0:
Xcode 7.1 beta 2:
TL;DR - Perform a complete reboot of your device; restart Xcode & instruments; select "Open Xcode" if prompted to enable the device for development.
Update 3/31/2016: I haven't encountered any issues with the latest version(s) of Xcode (7.2.x, 7.3), so it seems that the stability here has been improved.
I believe I may have finally gotten this to work properly. Detailed steps:
Unplug the device from your Mac & power down the device completely (hold the power button for several seconds; slide to power off).
Close Xcode and Instruments.
Restart the device & once it has booted completely re-connect it to your Mac.
Re-launch Xcode. Here, my device showed as disabled and Xcode indicated that the device was not available for use.
Open your project; clean (Shift+Command+K), Build (Command+B), Profile (Command+I).
After Instruments launched I noticed that the device was enabled. Upon selecting it, a message was displayed with the title "Enable this device for development?" and message "This will open Xcode and enable this device for development." (Note that this only happened to me the first time I went through this process even though I had already been using the device for development - whereas some users have also reported that they are not presented with this dialogue.)
Click "Open Xcode". Here Xcode did not prompt me for anything nor was anything displayed - no additional messages indicating anything had been done or that the device was or was not available for development. Opening the Devices window, the device appeared to be available. (I have not been presented with this option for subsequent occurrences.)
Now I was able to select the device in Instruments and profile it.
As a side note, I was also again able to delete installed apps from the Devices window (I realized that this was not possible to do previously).
I'm unsure how my device ended up in this state however I will be on the lookout to see if this continues to occur.
Please note that this was done using Xcode 7.0.1.
Update: My device seems to lapse back into not being able to be used for profiling some time after performing these steps - I've had to reboot my device again in order for it to be available for profiling. Not sure what is triggering this behavior but I will file a Radar for this.
Close instruments -> reset your device by long pressing home and power button -> restart instruments. Works for Xcode 7.3.
According to Apple staff on the developer forums the behaviour of this issue is greatly improved in the Xcode 7.3 betas, so one easy solution is to try upgrading Xcode. I've upgraded and it seems to be behaving so far.
This issue still occurred with XCode 10.3 and iOS 12.4.2
I restarted the device only, and it worked.

Unable to profile app on device with iOS 9.0.1 using Xcode 7, 7.0.1 or 7.1 beta

I have been trying unsuccessfully to profile my device (via Instruments) using the latest version of Xcode 7.0.1 (7A1001 released 9/28), as well as the previous version of Xcode 7 (7A218), as well as Xcode 7.1 Beta 2 (7B75).
My device is an iPhone 6+ with iOS 9.0.1 installed - the latest GM release of iOS9. I am able to run / debug applications on this device without issues.
In the screenshots below you can see that my device is disabled (greyed out) in all screenshots in all versions. I am able to profile other devices running iOS 8.4.1 without any issues.
Does the current version of Xcode not support profiling against iOS 9.0.1 or is there some kind of configuration setting or known work around for this?
Xcode 7.0.1:
Xcode 7.0:
Xcode 7.1 beta 2:
TL;DR - Perform a complete reboot of your device; restart Xcode & instruments; select "Open Xcode" if prompted to enable the device for development.
Update 3/31/2016: I haven't encountered any issues with the latest version(s) of Xcode (7.2.x, 7.3), so it seems that the stability here has been improved.
I believe I may have finally gotten this to work properly. Detailed steps:
Unplug the device from your Mac & power down the device completely (hold the power button for several seconds; slide to power off).
Close Xcode and Instruments.
Restart the device & once it has booted completely re-connect it to your Mac.
Re-launch Xcode. Here, my device showed as disabled and Xcode indicated that the device was not available for use.
Open your project; clean (Shift+Command+K), Build (Command+B), Profile (Command+I).
After Instruments launched I noticed that the device was enabled. Upon selecting it, a message was displayed with the title "Enable this device for development?" and message "This will open Xcode and enable this device for development." (Note that this only happened to me the first time I went through this process even though I had already been using the device for development - whereas some users have also reported that they are not presented with this dialogue.)
Click "Open Xcode". Here Xcode did not prompt me for anything nor was anything displayed - no additional messages indicating anything had been done or that the device was or was not available for development. Opening the Devices window, the device appeared to be available. (I have not been presented with this option for subsequent occurrences.)
Now I was able to select the device in Instruments and profile it.
As a side note, I was also again able to delete installed apps from the Devices window (I realized that this was not possible to do previously).
I'm unsure how my device ended up in this state however I will be on the lookout to see if this continues to occur.
Please note that this was done using Xcode 7.0.1.
Update: My device seems to lapse back into not being able to be used for profiling some time after performing these steps - I've had to reboot my device again in order for it to be available for profiling. Not sure what is triggering this behavior but I will file a Radar for this.
Close instruments -> reset your device by long pressing home and power button -> restart instruments. Works for Xcode 7.3.
According to Apple staff on the developer forums the behaviour of this issue is greatly improved in the Xcode 7.3 betas, so one easy solution is to try upgrading Xcode. I've upgraded and it seems to be behaving so far.
This issue still occurred with XCode 10.3 and iOS 12.4.2
I restarted the device only, and it worked.

Xcode 6.1.1, Yosemite, cannot add iOS device for testing

Since updating to Xcode 6.1, I cannot add any iOS devices to run on. Clicking add in the device window only asks to install more simulators. Itunes is 'seeing' the devices connected to the computer, but not Xcode.
Normally the devices I have on hand are an ipad2 running ios 7 and an older ipod touch running ios 5.1. I have set the build targets in the xcode project to include at least ios7.x but still can't see any device.
I have reviewed all my certificates and provisioning profiles in the developer portal. The ones generated by Xcode 6 seem to all start with "XC:..." If I generate and then download any of the older ones, they are greyed out in the add provisioning profile window from devices in Xcode.
Obviously, its critical that I can run on attached devices. Any suggestions would be appreciated.
thanks
r
Go to Windows -> Devices (or ⌘Shift2). Click on the device in the left column, and then "Use for development." If you don't see it there, you may need to restart Xcode, the device, and/or your computer.

Device is not detecting in iOS

I am new to iOS,
I built a code in Xcode 6.1 deployment Target, but it is not working in 6.1.3 simulator or with 6.1.3 device OS.
Thanks in advance
There might be following reasons for your problem:
Your deployment target is greater than your device iOS version.
Provisioning profile is not configured properly for your device.
You don't have a developer certificate in XCode to work with the device.
You Device is not ready for development.
What you can do:
1. Just quit iTunes, and disconnect - reconnect your device.
2. you could try removing the device from Organizer and re-adding it.
3. Try clicking "Use for Development" on your device in the Xcode Organizer.
4. Stupid but try this also closing and re-opening xcode.
And for simulator problem, You might have to reset contents & settings for particular simulator. Worked for me...

Resources