Skip to content

Instantly share code, notes, and snippets.

@rock88
Last active January 28, 2025 20:55
Show Gist options
  • Save rock88/a88798572fc128e08d51b8d2c85759e2 to your computer and use it in GitHub Desktop.
Save rock88/a88798572fc128e08d51b8d2c85759e2 to your computer and use it in GitHub Desktop.
Use Xcode 13.3 on macOS Big Sur

Xcode 13.3 required macOS 12.0 or later, but with this tips you can use it on a macOS 11 (11.6.1 for me). Xcode 13.2.1 should be installed anyway (/Applications/Xcode.app).

Install Xcode 13.3 on macOS Big Sur

  1. Download Xcode 13.3 from Apple Developer Portal;
  2. Unpack it and move to /Applications;
  3. Right click on Xcode_13.3.app and select Show Package Contents;
  4. Open Contents/Info.plist;
  5. Set your current macOS version to Minimum system version (I just set 11.0).

Now you can open Xcode_13.3 and compile and run basic projects on an iOS Simulator 15.4 🎉

Issues:

Cocoapods

If you use CoreData models or Frameworks in pods some scripts will fail with errors:

xcrun momc ...
Executable requires at least macOS 12.0, but is being run on macOS 11.6.1, and so is exiting.

/usr/bin/codesign ...
Executable requires at least macOS 12.0, but is being run on macOS 11.6.1, and so is exiting.

For fix it I just replace DEVELOPER_DIR to Xcode 13.2.1 path:

  1. Add post_install phase in Podfile;
  2. Insert this:
override_developer_dir = eval(Net::HTTP.get(URI('https://gist.githubusercontent.com/rock88/a88798572fc128e08d51b8d2c85759e2/raw/override_developer_dir.rb')))
override_developer_dir(__dir__)

Full part of Podfile:

post_install do |installer|
  override_developer_dir = eval(Net::HTTP.get(URI('https://gist.githubusercontent.com/rock88/a88798572fc128e08d51b8d2c85759e2/raw/override_developer_dir.rb')))
  override_developer_dir(__dir__)
end

If you not preffer to download override_developer_dir.rb on each pod install you can copy/paste override_developer_dir to your Podfile.

  1. Run pod install.

Script will open each *.sh file from Pods/Target Support Files/Pods-* and set DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer ENV var. So all Cocoapods scripts should run normally.

def override_developer_dir(root_dir)
override = "DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer"
for path in Dir["#{root_dir}/Pods/Target Support Files/Pods-*/*.sh"]
lines = File.read(path).split("\n")
if lines[2] != override
lines.insert(1, "\n#{override}\n")
File.write(path, lines.join("\n"))
puts "[!] Override DEVELOPER_DIR in #{File.basename(path)}".yellow
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment