33

Background on problem:

I have an iPhone 6s that has updated itself to iOS 13.4. Before the iOS update, I could code + run my app on the device from Xcode, great.

Now I can't run my app from Xcode on the device to test my code, as it says:

Xcode could not locate device support files
This iPhone 6s is running iOS 13.4 (17E255), which may not be supported by this version of Xcode. An updated version of Xcode may be found on the App Store or at developer.apple.com.

So I tried installing the latest Xcode (11.4) which now says I have to update my whole OS to Catalina.

I don't want to do this as my system is working fine and I have heard bad things about that release.

Question:

Is there a way I can get Xcode building to my iPhone without updating my whole OS and potentially screwing up my whole machine?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Dave
  • 5,283
  • 7
  • 44
  • 66

5 Answers5

32

You cannot run Xcode 11.4 on Mojave but you can add support for iOS 13.4

  • Download the 13.4 image from this repo
  • Quit Xcode
  • Unzip the archive and move the folder into /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
  • Launch Xcode

Consider that this way adds only the support for iOS 13.4, nothing else.

Update: This does not work with iOS 14 because iOS 14 requires Xcode 12.

vadian
  • 274,689
  • 30
  • 353
  • 361
  • 2
    Why don't apple make that known?! Thank you! Have a great day and keep safe. – Dave Apr 03 '20 at 15:21
  • 8
    I would not recommend downloading files from an untrusted source to add add these files to your Xcode installation. Instead, download Xcode 11.4 directly from Apple and extract the `DeviceSupport` files from there. That way, you can be confident that the files haven't been modified. – Theo Apr 20 '20 at 09:20
  • 1
    Thank you soo much. I don;t understand why they make you update to craptalina. what a mess – Unispaw Apr 23 '20 at 15:56
  • 1
    As @Theo says that it is better to download from reliable sources, I downloaded Xcode 11.4 from Xcode developer resources website, extracted the xip file and copied DeviceSupport files for missing iOS versions present at `Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport` to older `Xcode.app` at same location. It worked! – Vikram Rao May 16 '20 at 18:05
  • Anyone know if the 13.5 image from Xcode 11.5 can be moved into in 11.3.1 this way? Downloading it now but I can't really test it unless/until I take my phone to 13.5. I'm reluctant to do that unless I know it will still work with my Xcode in Mojave. – Wayne Henderson May 24 '20 at 17:38
  • 2
    This method also works for 13.5 on Xcode 11.3, the first run may take 2-3 minutes to launch – N S May 28 '20 at 11:26
  • 1
    Worked for me up to and including iOS 13.7, but no longer with iOS 14. – LPG Sep 25 '20 at 23:16
  • What's the expected behavior of "not working on iOS14"? My app on iOS14 just blank screen with "EXC_BAD_ACCESS", but I don't know if there's a problem in my program, or it is the expected behavior of this version of xcode not working with iOS14 – tga Nov 17 '20 at 23:00
  • @tga What is unclear with *It does not work*? Once again: iOS 14 requires Xcode 12, period. – vadian Nov 18 '20 at 05:32
  • That's not true you can run Xcode 11.4.1 on Mojave. Also @vadian don't say "period" I believe there are ways to support ios 14 – Sebastian Jun 20 '22 at 20:57
26

Here's an alternative solution that doesn't require downloading files from an untrusted source:

  1. Install the latest release of Xcode that runs on Mojave (currently Xcode 11.3.1). It can be downloaded from Apple's developer pages.

  2. From the same page, download a release of Xcode that supports iOS 13.4 (for example Xcode 11.4.1). Unzip it, rename it to "Xcode-11.4.1.app" and move it to the Applications folder, but don't run it.

  3. Add a symbolic link for iOS 13.4 from the DeviceSupport folder in Xcode 11.4.1 to Xcode 11.3.1, as described in Peter Steinberger's Gist.

If you use the versions used in this answer, the command to add the symbolic link would be

sudo ln -s /Applications/Xcode-11.4.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.4 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
Theo
  • 3,826
  • 30
  • 59
  • 6
    Why not just copy the 13.4 folder for iOS/tvOS from Xcode 11.4 to your working copy of Xcode 11.3.1? – Trygve May 06 '20 at 01:39
  • 2
    Sure, that would also work. – Theo May 06 '20 at 09:00
  • After copying the files I have an error while trying to open Xcode: Required content for platform iOS Simulator is missing. This error does not disappear after undoing the paste operation. – Vladimir Kuzomenskyi Jul 06 '20 at 18:55
  • https://stackoverflow.com/questions/40296756/homebrew-saying-xcode-is-outdated#comment122386112_56252549 was an even easier option for me (didn't need to upgrade Xcode). – Ryan Sep 19 '21 at 14:07
  • @Ryan this question is unrelated to Homebrew. – Theo Sep 20 '21 at 13:54
13

You can run Xcode 11.4 - 11.7 on your Mac which is running 10.14.

  1. Download Xcode 11.4 ~ 11.7 from https://developer.apple.com/download/
  2. Extract the .xip file, and you will get Xcode.app
  3. Modify LSMinimumSystemVersion in Xcode.app/Contents/Info.plist from 10.15.x to 10.14
  4. Now you can use Xcode 11.4 ~ 11.7 without upgrading to Catalina.

However, this trick doesn't work for Xcode 12, which requires some frameworks that do not exists in macOS Mojave.

Hiraku
  • 361
  • 3
  • 13
  • @MarekH I still got `You can’t use this version of the application “Xcode” with this version of macOS. You have macOS 10.14.6. The application requires macOS 10.15.2 or later.` How you guys solve it? – Oliver D Oct 27 '20 at 10:11
  • 1
    Just follow the instructions and edit info.plist and you are good to go. If you tried to open it (unedited) macos remembers and doesn't check again (just move xcode to other folder edit and open again) – Marek H Oct 27 '20 at 12:42
  • My Info.plist comes somehow semi encrypted CFBundleIconName_CFBundleHelpBookName_CFBundleHelpBookFolder^NSExtensionSDK_CFBundleExecutable_LSMinimumSystemVersion_CFBundleSignatureZDTCompilerß – I managed to decrypt it on http://www.applicationloader.net/appuploader/plist.php get the proper fields and 15 as minimum version changed to 14 but after repacling still xcode complains I need 15. Any trick to get this method to work? – becker Jan 02 '21 at 15:33
  • This worked for me but why? I mean, why does it seem to require Catalina even though it runs fine on Mojave? Also, I thought that Xcode 11.7 would allow me to develop for iOS 14 on Mojave and went to all this trouble before checking the compatibility table on Wikipedia so RIP me. – Indiana Kernick Jan 28 '21 at 03:15
  • Thanks, I've installed Xcode 11.6 on macOS 10.14.6, it works. – Mykola Mar 12 '21 at 21:34
  • This dosent work. Is your info.plist in anyway encrypted or is it just plain .plist? Mine is encrypted and after decoding it, and converting it back to .plist, it still dosent work. – Adeolaex Aug 11 '21 at 16:13
  • you should copy that frameworks to the Mojave then and put it in proper places. – Sebastian Jun 20 '22 at 20:57
1

My Apple TV 4K was running tvOS 13.3 and I upgraded to 13.4 which required that I use this technique to keep working with Xcode 11.3.1.

What is odd is that in the DeviceSupport folder, Xcode 11.3.1 only ships with tvOS up to 13.2. So how did it ever work with a hardware device running 13.3? I guess 13.2 and 13.3 are close enough that 13.2 still works.

13.4 does not work out of the box, so I copied both 13.3 and 13.4 from the Xcode 11.4.1 app into my 11.3.1 app. All is well again.

Trygve
  • 1,317
  • 10
  • 27
1

You can run Xcode 11.4 - 11.7 on your Mac which is running 10.14.

  • Download Xcode 11.4 ~ 11.7 from https://developer.apple.com/download/
  • Extract the .xip file, and you will get Xcode.app
  • Modify LSMinimumSystemVersion in Xcode.app/Contents/Info.plist from 10.15.x to 10.14.6

Now you can use Xcode 11.4 ~ 11.7 without upgrading to Catalina. However, this trick doesn't work for Xcode 12. I tried this trick on my mac mojave 10.4.6

ImShyam
  • 11
  • 2