yukiarrr / ios-build-action

Build iOS project (.xcodeproj, .xcworkspace), and export ipa
MIT License
279 stars 135 forks source link

Support for custom xcode version #88

Closed CptFabulouso closed 1 year ago

CptFabulouso commented 1 year ago

I am building React Native project, which currently fails on xCode 14 and I need to use xCode 13. Can we add support to specify which xCode version use to build the project? In the error there's line Specify the Xcode version in your Fastfile, so it should be possible. The error:

** ARCHIVE FAILED **
[13:16:18]: Exit status: 65
[13:16:18]: 
[13:16:18]: Maybe the error shown is caused by using the wrong version of Xcode
[13:16:18]: Found multiple versions of Xcode in '/Applications/'
[13:16:18]: Make sure you selected the right version for your project
[13:16:18]: This build process was executed using '/Applications/Xcode_14.0.1.app'
[13:16:18]: If you want to update your Xcode path, either
[13:16:18]: 
[13:16:18]: - Specify the Xcode version in your Fastfile
[13:16:18]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[13:16:18]: 
[13:16:18]: - Specify an absolute path to your Xcode installation in your Fastfile
[13:16:18]: ▸ xcode_select "/Applications/Xcode8.app"
[13:16:18]: 
[13:16:18]: - Manually update the path using
[13:16:18]: ▸ sudo xcode-select -s /Applications/Xcode.app
[13:16:18]: 
chaehonglee commented 1 year ago

I am also facing the same issue.

** ARCHIVE FAILED **
[04:31:27]: Exit status: 65
[04:31:27]: 
[04:31:27]: Maybe the error shown is caused by using the wrong version of Xcode
[04:31:27]: Found multiple versions of Xcode in '/Applications/'
[04:31:27]: Make sure you selected the right version for your project
[04:31:27]: This build process was executed using '/Applications/Xcode_14.0.1.app'
[04:31:27]: If you want to update your Xcode path, either
[04:31:27]: 
[04:31:27]: - Specify the Xcode version in your Fastfile
[04:31:27]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[04:31:27]: 
[04:31:27]: - Specify an absolute path to your Xcode installation in your Fastfile
[04:31:27]: ▸ xcode_select "/Applications/Xcode8.app"
[04:31:27]: 
[04:31:27]: - Manually update the path using
[04:31:27]: ▸ sudo xcode-select -s /Applications/Xcode.app
[04:31:27]: 
chaehonglee commented 1 year ago

Hi I was able to solve this issue by adding the following line:

      - name: Select Xcode version
        run: sudo xcode-select -s '/Applications/Xcode_13.4.1.app/Contents/Developer'
mmaetzler commented 1 year ago

FYI, there is also this GH action to select the xcode version: maxim-lobanov/setup-xcode

CptFabulouso commented 1 year ago

Thank you, I did not know it can be selected outside of the action. So I think this can be closed