Error being thrown when trying to debug from JetBrains Rider: error HE0004: Could not load the framework 'DVTITunesSoftwareServiceFoundation'

Viewed 1078

I am unable to debug a Xamarin.iOS application out of JetBrains Rider 2022.2.2. This is the error that gets thrown when trying to deploy to the simulator:

error HE0004: Could not load the framework 'DVTITunesSoftwareServiceFoundation' (path: /Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation): 
dlopen(/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/DVTITunesSoftwareServiceFoundation, 0x0001): Library not loaded: '@rpath/ContentDelivery.framework/Versions/A/ContentDelivery'
  Referenced from: '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/DVTITunesSoftwareServiceFoundation'
  Reason: tried: '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/15.12.0.2/lib/mlaunch/mlaunch.app/Contents/MacOS/../Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/usr/lib/swift/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Library/Frameworks/Xamarin.iOS.framework/Versions/15.12.0.2/lib/mlaunch/mlaunch.app/Contents/MacOS/../Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/Applications/Xcode.app/Contents/SharedFrameworks/DVTITunesSoftwareServiceFoundation.framework/Versions/A/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file), '/System/Library/Frameworks/ContentDelivery.framework/Versions/A/ContentDelivery' (no such file)
3 Answers

I had the same problem. Let me guess... You just upgraded to XCode14 and the corresponding Command Line Tools?

Downgrading XCode and Command Line Tools to 13.4.1 helped me.

What worked for me

Go To https://developer.apple.com/download/all/?q=command%20line%20tools

Download XCode and Command Line Tools for Xcode 13.4. Unpack Xcode (13.4.1) and rename it (for example Xcode 13) and place it parallel to Xcode (14) in the programfolder.

Xcode 14 and 13 parallel installed.

Then install the Command Line Tool.

Now in Xcode (still 14) > Preferences > Location > Command Line Tools, select version 13.4.1 instead of 14. You can see the Path for it is "Application/Xcode 13".

enter image description here

For safety restart tools, and it worked again...

Hope it works for you too!

Here is how I made it work:

  1. Download the former version here (note: you need a developer account)
  2. Double-click on the downloaded .xip file to install XCode 13.4.1
  3. Rename the newly installed XCode application into Xcode.13.4.1.app and move it into your Applications folder
  4. Open the usual XCode application and go to the preferences
  5. In the locations tab you will be able to select XCode 13.4.1 for Command Line Tools

enter image description here

Related