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

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

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

Problems with certificates, provisioning profiles, and bundle ids. iOS development

I have had many problems with certificates, provisioning profiles and bundle ids in the past and here is the latest.
When trying to run my App on an iOS device I get the following error:
Your application failed code-signing checks. Check your certificates, provisioning profiles, and bundle ids. Probably your device is not part of the selected provisioning profile (error: 0xe8008015).
I am aware of the following questions that touch similar topics but I seem to have perhaps a combination of them with something else:
Invalid Provisioning Profile- Missing Code-Signing Certificate
Xcode fails with “Code Signing” Error
why does xamarin suddenly not let me deploy to iOS devices
iOS 8, How to use device for development?
In the past the following things fixed a similar type of error message, however, this time the error at most changed slightly:
Go to Apple Member center and check that the device I am using is listed under "iOS devices"
Go to "Provisioning Profile" -> "Development" and check the profile is active
3.Check the device is listed in the provisioning profile. Re-download the provisioning profile.
4.Clean and build the solution a lot.
Any help would be appreciated.
I am using a macbook air running OSX 10.9.5 and iPad with iOS 8.2.
Xamarin version 5.7.2
Xcode version 6.01
As I was typing the last line of my question it occurred to me that I should check if my Xcode is up to date: It wasn't!
Solution:
Updated Xcode to the latest version (i.e. 6.2). In the update details it says: "Adds support for iOS 8.2 and WatchKit to create apps...".
While Xcode was updating I also did the following:
Correct a spelling mistake in my bundle identifier (To be EXACTLY the same as in my provisioning profile).
In Apple member center I had the possibility to update the list of devices. This is since I renewed my licence not long ago and it gave me the option to reset my previous list. I just followed the instructions and left exactly the same devices as I had previously.
After X-code updated I cleaned the solution and DONE.
I had few things going on so perhaps this won't be really useful to anyone but who knows... I hope this helps

Resetting Xcode's device/version list to run

I want to test/run my app on different iOS versions in Xcode, but somehow I can't see any option to change iOS simulator version (I have both 6 and 7 SDK/Simulator installed) in run targets. I'm also seeing all of my attached devices twice (I have only ONE iPod, but when I connect something else, they all display twice):
There's probably a bug with the device list of Xcode. How can I reset this list? I've tried resetting the scheme, but scheme is project related anyway. The problem occurs in all projects, not only a single project.
First of all, you have to install the 6.1 Simulator.
After that, you can choose which simulator version to use:
I've figured out the problem. I was on the "Latest iOS SDK" which was 7.1 SDK (I also have XCode 5.1DP installed). I've changed the base SDK to 7.0 and I am again able to choose. I still have two entries for each physical device but I can live with that.

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)

Xcode 4.3.2 and iOS 5.1.1 + jailbreak: App installs but crash on launch

I don't have the Apple 79€/year account. In iOS 5.0 and Xcode 4.2.1 I changed SDKSettings.plist ecc... And it works. In iOS 5.1.1 and Xcode 4.3.2 no, I already changed settings ecc but don't work, the app installs on device but crash on launch... How can I run my app on device without crashes? Thanks, and sorry for my english.
I have had this issue before on a jailbroken device. You have a few solutions depending on the exact issue. First you can install app sync in order to allow unsigned code to work on your device if you are not using a valid code signing identity. The second option is to actually get a valid code signing identity along with the provision profile so you can run the application correctly. This involves paying for the developer program so this may not be the best option.
Last is a very common issue with jailbroken devices. Which is that you will receive an error such as "failed to get the task for process xxxxx". This tends to happen a lot with jailbroken devices. This is because Xcode notices you are not using a provision profile that is required to report error logs. All you have to do is launch the application again on the device and everything should work.
This is just Xcode not being able to fully launch your application because of the missing provision profile so it results in a crash. If none of these solutions solve your problem please post a more detailed explanation of the issue you are having.

Resources