简体   繁体   English

如何将 xcode 版本项目(13+)打开到 xcode 版本(12 或更低)?

[英]How to open higher xcode version project(13+) into lower xcode version(12 or lower)?

I recently updated my XCode to latest(period) 13.3 and working on a project on that, Now when i moved that project to other mac which has MacOS Catalina and has XCode version 12.3 .我最近将我的XCode 更新为最新(期间)13.3并在该项目上工作,现在当我将该项目移至其他具有MacOS Catalina 且具有 XCode 版本 12.3的 mac 时。

When i try to open the project it keeps showing me this dialogue当我尝试打开项目时,它一直向我显示此对话

在此处输入图像描述

But i found a solution to make it work on lower version XCode which can be useful to other people too, So i am including answer too.但我找到了一个解决方案,使其在较低版本 XCode 上工作,这对其他人也很有用,所以我也包括了答案。

Hope It Helps:)希望能帮助到你:)

Just have to follow steps given below只需要按照下面给出的步骤

  1. Right Click On Your_Project_Name.xcodeproj and select Show Package Contents from the option menu.右键单击Your_Project_Name.xcodeproj和 select 从选项菜单中Show Package Contents { Even if you have .xcworkspace , ignore it for now } { 即使你有.xcworkspace ,暂时忽略它 }

  2. Open project.pbxproj from opened folder.从打开的文件夹中打开project.pbxproj

  3. Change object version to 46 like given below将 object 版本更改为46 ,如下所示在此处输入图像描述

  4. Hit Command(⌘) + S to save it and close the window.Command(⌘) + S保存并关闭 window。

  5. If you have pods installed on that project then you have to reinstall them again { I guess you already know how to do that or follow setps given below }如果你在那个项目上安装了pods ,那么你必须重新安装它们{我想你已经知道如何去做或者按照下面给出的设置}

    • Open Terminal打开终端
    • Run Command cd PATH_TO_YOUR_PROJECT_FOLDER , Hit Enter运行命令cd PATH_TO_YOUR_PROJECT_FOLDER ,回车
    • Run pod install {No need to open podfile as we never made a change to it} and we're done运行pod install {无需打开 podfile,因为我们从未对其进行过更改},我们就完成了
  6. Go back to project folder and open Your_Project_Name.xcodeproj or Your_Project_Name.xcworkspace Go 回到项目文件夹,打开Your_Project_Name.xcodeproj或者Your_Project_Name.xcworkspace

NOTE: Since It is work around way, we can not run this on newer iOS version simulator on which we want to test code However, we can run the code on physical device which has newer iOS version { which is also tricky part!注意:由于它是解决方法,我们无法在我们想要测试代码的较新的 iOS 版本模拟器上运行它但是,我们可以在具有较新的 iOS 版本的物理设备上运行代码 { 这也是棘手的部分! } }

TO RUN THE CODE ON LATEST IOS PHYSICAL DEVICE, FOLLOW BELOW STEPS要在最新的 IOS 物理设备上运行代码,请按照以下步骤操作

  1. Download zip of your desired iOS version to run from the link从链接下载您想要的 iOS 版本的 zip 以运行
  2. Close the XCode App.关闭XCode App。
  3. Right click on XCode App from Application and select Show Package Contents右击 XCode App from Application and select Show Package Contents
  4. Move the downloaded folder to Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport .将下载的文件夹移动到Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
  5. Open the project and run it on physical device打开项目并在物理设备上运行

If you get error of Unable to install the Application , click on Details and try to resolve it.如果您收到Unable to install the Application错误,请单击 Details 并尝试解决它。

If your error says The code signature version is no longer supported then check out this answer, it solved the error.如果您的错误The code signature version is no longer supported请查看此答案,它解决了错误。

Hope It Helps !!!希望能帮助到你 !!!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM