2017-10-15 289 views
0

在Xcode 9出現所有問題之後,我想避免在社區知道它的穩定之前不得不升級到它。但是,我需要在Xcode 8上運行iOS 11 Simulator,並且無法想象這樣做。是否有可能在Xcode 8上運行iOS 11模擬器?

我發現如何在Xcode 8中支持iOS 11設備,但我也需要運行iOS 11模擬器。

這可能嗎?如果是這樣,請指導我如何做到這一點。

+0

我不會推薦它。例如,Xcode 8有舊的框架。 Xcode 9有新的框架。如果某些框架代碼在Xcode 9中被棄用會怎麼樣?如果你想要Xcode 8,那麼不要更新Xcode 8,而要從網站上下載Xcode 9並行使用它。 – SkrewEverything

回答

0

不支持此功能,但可以通過複製 iOS的11 simruntime束實現這一目標到〜/庫/開發商/ CoreSimulator /型材/運行時,然後從iOS的10加platform_launch_helper到iOS版11(它被刪除,但Xcode 8需要它)。

假設您的Xcode 9是/Applications/Xcode-9.app和Xcode中8在/Applications/Xcode-8.app,你可以做到這一點:

mkdir -p ~/Library/Developer/CoreSimulator/Profiles/Runtimes 
cp -a /Applications/Xcode-9.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime ~/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS11.0.simruntime 
ln -s /Applications/Xcode-8.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/libexec/platform_launch_helper ~/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/platform_launch_helper 

注:一種符號鏈接主包將不起作用。你需要複製它。如果您使用符號鏈接,CoreSimulatorBridge作業將無法加載,您將無法安裝應用程序。

如果您在未來更新的Xcode 9,你應該重做是爲了確保你在你的本地副本的最新更新。

+0

謝謝。我將在稍後嘗試。 – rolinger

相關問題