4

A few days ago, I was able to build an iOS app, which I'm working on using Xcode, on my iPhone but this morning when I tried to build and run the app, I get the error message below and cannot build the app now.

Please check the connection to the device, and review all errors in the Devices and Simulators window.

I've already added my apple id in the account preferences and assigned the project to a team on the Signing & Capabilities pane of the project editor.

And this is the screenshot of the error in the Devices and Simulators window. enter image description here My Xcode version is 13.0 and iPhone is 14.7.1

I get the notification of "build succeed" but nothing shows up on my iPhone, so could anyone please tell me what should take a look at or what can I do next?

Yuuu
  • 715
  • 1
  • 9
  • 32
  • 2
    Quit and restart Xcode. Turn your phone on and off. Restart your Mac. One of these will probably fix it. – Paulw11 Sep 27 '21 at 03:53
  • 2
    @Paulw11 thank you so much for your response. I tried that but it did not work this time... – Yuuu Sep 27 '21 at 04:43
  • Try going in to Settings->Developer and "clear trusted computers" on your phone – Paulw11 Sep 27 '21 at 06:57
  • If you go through using this way https://stackoverflow.com/a/71701826/13889070 you will get a proper solution to your problem. – Rajni Gujarati Apr 23 '22 at 13:41

6 Answers6

9

Following solution work for me

  1. First check compatibility version for xcode with iOS version from following https://developer.apple.com/support/xcode/
  2. Now check the list of devices support to your Xcode from 'Device Support'
  3. To get into 'Device Support' :: Open Finder -> Applications -> Scroll to Xcode -> Right Click -> Show Package Contents -> Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport This is the list of devices folder support for your Xcode
  4. Now check for your iOS version from iPhone device :: Open Settings from iPhone -> General -> About -> Software Version
  5. If the 'Device Support' folder does not contains the folder of your iPhone iOS Version, then you need to add respective folder from following link https://github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport
  6. From above Github page, select device version & download zip file
  7. Now extract file & you will get the folder for your iOS version
  8. Copy this folder into Finder -> Applications -> Scroll to Xcode -> Right Click -> Show Package Contents -> Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport
  9. Disconnect device (if connected), restart xcode
  10. Before connecting device, delete derived data from xcode & clean cache using cmd + shft + k. Then make sure to reset 'Location & Privacy' from device :: From iPhone device go to Settings -> General -> Transfer or Rest Phone -> Reset -> Reset Location & Privacy -> Enter passcode to continue
  11. Now connect your iPhone device with macbook (through cable), xcode will detect your device & you can run your application
Ryan M
  • 18,333
  • 31
  • 67
  • 74
khirish
  • 537
  • 1
  • 7
  • 9
  • Thanks this worked great for me for iOS 16.2! The latest in Contents -> Developer -> Platforms -> iPhoneOS.platform -> DeviceSupport was 16.1 but worked with the installed version of 16.2. – NathanNovak Dec 26 '22 at 16:51
1

I deleted deriveddata and it worked.

Yuuu
  • 715
  • 1
  • 9
  • 32
1

I had this problem today on my iPhone 12 Pro Max iOS 15.1 Xcode 13.1, restarts of the iPhone and Mac didn't help.

In the end I made sure that the paired Apple Watch was unlocked and trusted after that no more error and I was able to build to the iPhone.

Dan
  • 11
  • 2
1

I was running the latest version of iOS v15.3.1 and after hours of pain I found that the solution was to update Xcode to the latest version

0

Try the following operations,it works for me

1、deleted deriveddata 2、Turn off the phone and turn it on again

muhlenXi
  • 1
  • 1
  • I followed the advice of @khirish but my folder DID contain the relevant iOS version. I deleted derived data, cleaned xcode and restarted the phone and everything seemed to work. Actually I also unpaired my apple watch. I have had more of these issues since pairing a watch in the last couple of months than I've had in about 3 years of development. – its_broke_again Apr 26 '23 at 16:56
0

iOS 15.6 beta:

https://developer.apple.com/documentation/ios-ipados-release-notes/ios-ipados-15_6-release-notes

Known Issues

Xcode 13.4 is unable to prepare iOS 15.6 beta devices for development. (93452791)

Workaround: Use Xcode 13.3.1.

Alino
  • 153
  • 1
  • 9