xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 243 forks source link

Simulator install fails on Apple Silicon #464

Open ghost opened 2 years ago

ghost commented 2 years ago

I have tried installing a simulator on three different Apple Silicon devices (two M1 MacBooks and one M1 Mac Mini). For all machines, the Xcode install works fine but then the simulator install fails always here:

> xcversion simulators --install='iOS 15.0' --no-progress
Installing iOS 15.0 Simulator for Xcode 13.4.0...
Mounting DMG
Expanding pkg
Expanded pkg into /Users/anka/Library/Caches/XcodeInstall/com.apple.pkg.iPhoneSimulatorSDK15_0
Unmounting DMG
Setting package installation location
Rebuilding package
Please authenticate to install iOS 15.0 Simulator...
[!] Could not install iOS 15.0 Simulator, please try again

It seems enabling system extensions would be needed, this popped up during the install:

Screenshot 2022-08-11 at 16 06 03

I did not find any mention of this in the docs.

What is the support status on Apple Silicon for simulator install? Is allowing system / kernel extensions required for it to work?

ghost commented 2 years ago

Tried installing with the kernel extensions allowed, still fails 😞

Xcode version is 13.4.1, installed with the same tool.

Nezz commented 2 years ago

I think the system extension thing is a red herring. The actual issue seems to be that the DMG xcode-install downloads (e.g. https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK15_4-15.4.1.1650505652.dmg) is for x86.

This error is displayed when trying to run the installer from Finder:

Screen Shot 2022-08-19 at 11 18 32 AM
fkoner commented 2 years ago

Which terminal are you using? I had a similar issue. Maybe is not related, but in my case I was using iTerm. Once I enabled Full Disk Access to Iterm I was able to install the simulator.

Which is the output of this command:

cat /var/log/install.log

That output helped me a lot to understand the root cause.

Hope this helps.

ghost commented 2 years ago

Disabling SIP worked