Xcode cannot run using the selected dvice - xcode

i post this question because none of the solutions posted to
already existing threads helped for me.
today morning everything worked fin, i pressed on the Run-Button and
my iOS-Simulator stated out of Xcode showing my implemented App.
few hours later it shows this error-message:
"Xcode cannot run using the selected device. No provisioned iOS devices
are available with a compatible iOS version. Connect an iOS device with
a recent enough version of iOS to run your application or choose an
iOS simulator as the destination."
My Targets iOS SDK is 6.1
Under Summary i chose as Device an iPad (as before)
Under Summary i chose 6.1 as Deployment Target.
I have no "real" iOS Device at home so i always used the simulator.
As i said, since today afternoon not working.
what could be the prblem?

Related

Xcode 13: Build hangs with "iPhone is busy: making Apple Watch ready for development"

Issue: The build hangs with "iPhone is busy: making Apple Watch ready for development"
Further facts:
iOS 14.8
iPhone 8
watchOS 7.6.2
Xcode 13
Apple Watch Series 3 + Cellular (42mm)
Does anyone know a solution for that issue?
Many of the developers have the same issue:
https://developer.apple.com/forums/thread/691452
I have been struggling with this for some time now. If you don't need the Apple Watch, instead of turning it off completely, you can also turn on airplane mode if configured correctly.
On your watch, go to Settings App → Airplane Mode. Make sure that both WIFI and Bluetooth switches are turned off!
When the bluetooth switch is turned on, a connection will still be established even if your watch is in airplane mode AND bluetooth is turned off on the phone from Control Center. It took me some time to figure this out...
Update: The Bluetooth setting seems to turn itself on again after some time! No idea why... 🤷🏼‍♂️ Keep that in mind and check the setting again if flight mode does not fix your issue.
Using Flutter?
When running flutter doctor, it will give you a clear hint, that your watch is causing the issue.
When trying to build your app e.g. from Android Studio, you might instead find these messages in your log:
The requested device could not be found because no available devices matched the request.
Available destinations for the "dev" scheme:
[list of devices]
Could not build the precompiled application for the device.
Building a deployable iOS app requires a selected Development Team with a Provisioning Profile. Please ensure that a Development Team is selected by:
[instructions how to set the development team]
Ineligible destinations for the "dev" scheme:
[list of devices]
I put these messages here for people googling them. If you have an Apple Watch, then run flutter doctor to check if this is the root cause.
This is what works for me:
Turn off the Bluetooth from settings in your iPhone from Settings -> Bluetooth (Don't turn it off from the control center)
Quit Xcode
Launch it again
Build and Run
The solution is:
Waiting for 5-20 mins
Let your iPhone and Apple Watch on
I think all answers are overlooked, you don't need 5-20 mins if you let it finish the preparing process, it'll take just a few minutes, 5 mins top..
But regarding fixing this with an upgrade, that's not the case, and I would love to see it fixed, or offered with an option to exclude watch from the dev purpose unless really needed.
I facing this issue too. This is because the latest xcode only support until iOS 15.2 sdk, but my phone's iOS version is 15.3. Thus, xcode is downloading the iOS 15.3 sdk from your phone that's why takes time (I knew the message is not saying that)
However, I do some testing and it works for me.
Get the iOS 15.3 sdk (is 10BG!!!) from my friend xcode's Devices Support iOS folder /Users/XXX/Library/Developer/Xcode/iOS DeviceSupport and paste it to yours one.
Downloading the iphone OS device support file from https://github.com/filsv/iPhoneOSDeviceSupport/blob/0e8ef7bc51b982304ed3258454f88ae2d5615ac7/15.3.zip unzip it and paste it in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Restart Xcode.
Build success without waiting.
Origin From: https://developer.apple.com/forums/thread/691452?answerId=704424022#704424022
The Apple Watch configuration takes around 5 minutes. It's way better to postpone everything and let it run for 5 minutes then the other workarounds - such as disconnecting your watch, turning on/off your iphone, etc
In my case:
If my Apple Watch is turned on - then from Xcode I'm still able build and run the app just fine.
But when I'm using Flutter - it fails.
flutter devices shows my iphone as "Busy".
As soon as I turn off the Apple Watch, and then disconnect and reconnect the iPhone USB cable - all is good.
Since it's one of the earliest Apple Watch modules, the latest WatchOS that I can install is v6.3, although the latest available is WatchOS v8.x.
I suppose this issue doesn't occur with the latest WatchOS.
(I'm using iOS v15.2)
This still happens from time to time. The solution that has worked for me every time is to reboot the phone
Make sure you're running a version of Xcode that supports the SDK versions of your iOS/watchOS device. If you've recently updated either OS versions, you may need a matching Xcode update for this to work properly.
The real solution is:
If you don't need the apple watch you can just power off the Apple Watch and unplug/plug the iPhone. That's a quick fix. No need to unpair the watch no need to wait 5 - 20 mins
According to this post, this issue is fixed with an upgrade to iOS 15.0.2 / watchOS 8.0.1: https://developer.apple.com/forums/thread/691452

Failed to start remote service on device problem in xcode

I create a flutter app and now I'm trying to run it through XCode on my real iPhone, but after the installation finishes, I face the following problem:
Also with I trying to run the application on my real phone, after clicking on the application icon, I face a white screen appears, and then the application closes directly.
Catalina 10.15.3
IOS 14.2
XCODE 11.7
Also I was make a trust to app in phone
Does anyone know the reason for this problem?
This problem maybe because of two reasons:
First: Xcode 11.7 doesn't have support files for iOS 14 you can download it from here https://github.com/filsv/iPhoneOSDeviceSupport
Second: I have this problem now and I couldn't fix it.. but I have iPhone with iOS 14.2 and iPad with iOS 14 so the problem was just on the iPhone but after I updated the iPad with iOS 14.2 it happened with it.. so the problem maybe because of the iOS 14.2 so we have to wait for the update or because of the Xcode 11 version and we have to download the Xcode 12 version..
I hope we can find a solution quickly...
make sure to have the latest system update on your target device and the latest Xcode version as well. The error should disappear.
Best,
Ralf
I have fixed the problem by using the above solution but it has happened again. So, I have followed these instructions and fixed again:
https://stackoverflow.com/a/61665031/6586109
A good first place to look is Window > Devices & Simulators in xCode, then find the details for your device. There may be error information here that helps you find the fault.
Restarting devices and installing updates seem to fix this problem for a lot of people.
For me, there was a red notice in the device window about connection to the device and it turned out to be the cable that was at fault.
This was an official Apple cable, just a few months old, and still works fine for charging and data transfer; and I've been using it with xCode without problems for a couple of months. It seems to be possible for Apple cables to develop some tiny physical fault that seemingly only xCode is sensitive to.
Using a different cable worked first time for me.
There seem to be a few variations on the exact error message with the same root causes varying depending on exactly what xCode was trying to do at the exact moment it failed: I'm on xCode 12 and for me it was:
Failed to start remote service on device
Failed to start remote service com.apple.installation_proxy on device

How can I test app on older iPhone 3G with iOS v 4.2.1

I have been testing my app on my iPhone 4S and my wife's iPhone 3GS. I would also like to test it on the older iPhone 3G running iOS 4.2.1 (the highest version it will support).
When I connect the 3G to my Mac and attempt to provision it, I get two error messages:
Could Not Support Development
and
Xcode cannot find the software image to install this version
I am using the latest version of xCode (v. 4.4.1).
Is there some place to find the missing 'software image' in order to test my app on the 3G and older iOS devices?
If not, how does one know what devices the app will work with?
I do note that the newer iPhones that run iOS5 and above also support Automatic Reference Counting (ARC). I have checked the ARC button whenever I created a new project. Does one have to abandon ARC if one wants their app to work on an older pre iOS5-capable device?
...Dale
Is there some place to find the missing 'software image'?
I believe you can download it through iTunes by clicking restore in the device's summary page and then searching for the *.ipsw file. iTunes might even share the image once it is downloaded automatically.
Does one have to abandon ARC if one wants their app to work on an
older pre iOS5-capable device?
Not in entirety. iOS 4.2 supports the vast majority of ARC, But it does not support weak references.
Also, there are a few hoops you must jump through to target. I have an answer here that outlines them (with screenshots).
I know for a fact that Xcode 4.4.1 can use an iOS 4.2.1 device as a target, since I can test on a second generation iPod touch running 4.2.1.
Finally, If you are not able to obtain a software image, you could try adding your device by UDID directly on the provisioning portal through developer.apple.com.(The old fashioned way)

Issue with Xcode 4.1 & iOS 5

So basically i have upgraded to iOS5 and xcode 4.2 but after a little playing around i found out you can't submit apps to the app store with it (even if the apps are set to 4.3 or lower)
So i reinstalled xcode 4.1 (xcode did some back up thing so i still have 4.2) and started work on application building and such like. Submitted application to app store / testing on device everything running fine.
But suddenly (well just now) xcode has said:
The version of iOS does not match any of the versions
of iOS supported for development with this installation of the iOS
SDK. Please restore the device to a version of the OS listed below, or
update to the latest version of the iOS SDK; which is available here.
So i can no longer test apps on my device, nor can downgrade my iPod says apple...
but what im sooo confused about is that it was all working a few hours ago.
Why can't i do it now?
Anyone know a fix?
Thank you.
Eli
Apple has apparently told testers of iOS 5 that any devices updated to that beta cannot be downgraded back to iOS 4. They will only be able to further upgrade their device and eventually install the final iOS 5 release. From Apple:
Devices updated to iOS 5 beta can not be restored to earlier versions
of iOS. Devices will be able to upgrade to future beta releases and
the final iOS 5 software.
However, I've also seen this post: http://www.jailbreakmovies.com/2011/06/08/how-to-downgrade-ios-5-back-to-ios-4-3-3-tutorial-video/ which claims to be able to restore iOS 4.3 to a device. I haven't tried it, but if you're feeling adventurous and/or desperate, you might give it a go.

Xcode cannot run using the selected device No provisioned iOS devices are available

One of my coworkers set me up with a provisioning profile through our corporate profile. I have read through several tutorials and none of them corresponded to the steps he actually took to get it set up. In the end my device was listed under the devices section of the organizer with a green circle next to it (I am guessing that's good?) but when I try to run the application on my device I get the error I mentioned in the subject of this post. I should mention my device is jailbroken running iOS 4.2.6. Is the "jailbrokenness" of my device an issue?
This is like day one with Xcode and it is pretty overwhelming coming from the Linux command line and Emacs. I don't expect a complete walk through from any of you. But if you can point me to a nice long tutorial showing me how to set this up with the latest version of Xcode I would appreciate it.
Check if you can see your device in Organizer and verify iOS version installed on the device with the deployment target for your application. This is very often the case as you won't be able to deploy 4.3 application to 4.2.1 device (for example).
In Xcode Set the target to project_name | iOS Device
Then in Xcode From the product menu=>Build For=> Build For Testing

Resources