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).
- Download Xcode 13.3 from Apple Developer Portal;
- Unpack it and move to
/Applications; - Right click on
Xcode_13.3.appand selectShow Package Contents; - Open
Contents/Info.plist; - 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 🎉
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:
- Add
post_installphase in Podfile; - 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.
- 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.