37

I'm getting message "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." when I try to run an Xcode iOS project on my iPhone 8. I'm using Xcode 13.2.1 and iOS 15.4 on my iPhone 8.

I've tried the different solutions given in other posts here on stackoverflow, but I haven't been able to fix the problem. This one seems to be the latest identical question, just with previous versions of Xcode and iOS.

This post in this forums gives the solution to restart the iOS device and I did that and also restarted the mac. My Mac has macOS Monterey 12.3. My Xcode, Mac, and iPhone 8 all have the most recent updates. That post gives an answer for the same problem but with iOS 15.2.

I have recently changed settings in my iPhone 8 in Accessibility. Could that affect anything?

I found this error in the Xcode console for my device. Does this say anything about my problem?

com.apple.analyticsd xpc error 08:10:31.756711-0500 analyticsd [XPC Server] managed connection recieved connection invalidated: Connection invalid

1
  • Restart you iPhone and it'll work just fine. Thanks
    – Sanjeevcn
    Jun 30 at 5:22

9 Answers 9

93
  1. Check /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ for directory name 15.4 (your iOS version).
  2. If the directory is missing download support files for 15.4 (your iOS version) from https://github.com/filsv/iPhoneOSDeviceSupport and place it in the above path.
  3. Restart Xcode.
6
  • 3
    Thanks for this, which sorted everything. Once I downloaded the 15.4.zip file from the link above, I unzipped it in the Downloads directory, then moved the 15.4 folder to the DeviceSupport directory. I did that with the help of this article: medium.com/@nayananp/…. I then used 'chown' and 'xattr' to make everything the same as regards file groups and owners. Then shut down Xcode, my Mac, and my phone. Once I restarted everything and plugged my iPhone back into my Mac, I could finally recompile and see the app on the phone! May 4 at 15:54
  • works like a charm. Its a generic fix which can be used to solve such incompatibilities in future aswell. Thankyou
    – srv_sud
    May 14 at 7:18
  • It's help to me.
    – flyer2001
    May 18 at 8:19
  • Great!! Solved it!! I needed iOS 15.5 and found it here: github.com/iGhibli/iOS-DeviceSupport/tree/master/DeviceSupport
    – Paulo Belo
    Jun 24 at 18:57
  • I'm stuck on MacOS 11.6.7 as I use an old MacBook Pro (Late 2013) so I can't get Xcode 13, but downloading the 15.4 support files fixed everything for me and I'm back up and running again on my new iPad 9th gen (with iOS 15.5) I didn't need to do any chown-ing or xattr-ing, I just downloaded the 15.4 zip file, unzipped it, and moved it to the folder specified above and it all worked as soon as I started Xcode again. Jul 5 at 14:31
33

I have the latest version of :

  • iOS
  • Xcode

Still was not able to run the app on my device.

Solution that worked for me: simple iPhone restart

5
  • 4
    once again "Have you tried turning if off and on again?" saves the day. TY for reminding me ;)
    – Sebastian
    May 3 at 9:34
  • 1
    just a simple restart of the ios worked for me too! :D
    – Johanna
    Jun 2 at 8:16
  • 1
    This is what worked for me. Embarrassed I didn't think of it first. Jul 1 at 3:58
  • 1
    Lol such a shame. Indeed restarting my iPhone 11 Pro Max works! Jul 1 at 20:53
  • I restarted my iphone and still didn't work :( Jul 1 at 22:50
11

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

https://stackoverflow.com/a/72143610/15716725

1
  • this literally saved my life
    – Ayse8888
    Jul 6 at 11:15
8

for Xcode 13.2.1, and running on the device with iOS version 15.5 https://github.com/filsv/iOSDeviceSupport/blob/master/15.5.zip download this zip and extract it into

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ for directory name 15.5 (your iOS version).

and restart the xocode

enter image description here

3

I'm using Xcode 13.2.1 and iOS 15.4 on my iPhone 8

That's the problem. Your Xcode is incompatible with your iPhone system. Update to Xcode 13.3.

My Xcode, Mac, and iPhone 8 all have the most recent updates

No, they don't.

1

Simply restart iphone works for me!

2
  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jun 17 at 10:47
  • I can confirm that simply restarting your iPhone / device just works fine.
    – Sanjeevcn
    Jun 30 at 5:21
0

I have the same problem after "updating" both iPad and MacOS

They worked before but now no.

After update complete they are both asking to be updated again.

Currently at 12.3 for macOS and 15.4 for iOS

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/ lists 15.2 as highest.

Once again let down by Apple's engineering teams. "Just works". Nope!

1
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 4 at 1:59
0

iPhone restart worked, I have Xcode Version 13.4.1 (13F100) and iOS 15.5

0

My iPhone was 15.5, and I checked /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport, there is no such 15.5, then I noticed update notification for Xcode in AppStore, which is said Version 13.4.1 - Xcode 13.4.1 includes SDKs for iOS 15.5, ..., then I just need to execute Xcode update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.