Closed oyenigun closed 1 year ago
Hi, I will need more information than that.
where do you want to set the xcode version?
I think you should ask this on the attached issue link. How & where do they want it to be set.
Actually the first suggestion is what I need.. How exactly should I pass the xcode version as argument to FlutterBuild@0 Task?
Thank you.
You should go through the readme once.
(Optional). Set extraArgs if you want to pass more official/custom command arguments, Space Separated. Example: "--no-tree-shake-icons --publish-to-play"
extraArgs
can be passed to give custom arguments. If you are using yaml it will be like extraArgs: --xcode-version=1
. If you are on classic editor then just pass in --xcode-version=1
to extraArgs
input field.
Please close this issue if that helps you and resolves your problem.
I tried pass like below;
- task: FlutterBuild@0
inputs:
target: 'ios'
projectDirectory: '.'
entryPoint: "lib/main.dart"
iosCodesign: false
extraArgs: '--no-sound-null-safety --xcode-version=14.3'
But it didn't work;
Starting: FlutterBuild
==============================================================================
Task : Flutter Build Task
Description : Build a Flutter application project.
Version : 0.3.10
Author : Hey24sheep
Help : [More Information](https://github.com/hey24sheep/azure-flutter-tasks)
==============================================================================
/Users/runner/hostedtoolcache/Flutter/3.7.12/macos/flutter/bin/flutter build ios --no-codesign --target=lib/main.dart --no-sound-null-safety --xcode-version=14.3
Could not find an option named "xcode-version".
Are you sure that Flutter SDK support this flag or you are just guessing?
Because I gave an example flag. It's not a real flag for Flutter. I think you should ask this question on Flutter or the inweb's git repository that you mentioned above.
Hey @oyenigun, you should define a step for your pipeline to select a specific version of Xcode:
- script: |
sudo xcode-select -s /Applications/Xcode_14.3.app
displayName: Use Xcode version 14.3
@Cteq3132 thank you for the help. I have added your answer into a wiki.
Thank you @Cteq3132, @hey24sheep ; I defined a step in my pipeline as suggested and it worked for specify XCode version. I faced error below but it is completely about Azure Build machines don't have XCode 14.3, it was successfull when i tried to "XCode 14.2".
xcode-select: error: invalid developer directory '/Applications/Xcode_14.3.app/Contents/Developer'
Hi @hey24sheep, We have a library dependency that has a build problem depending on the Xcode version. So we need to set xCode version. Is there any way to set XcodeVersion during FlutterBuild@0 ?
Error detail;
Possible solution (set xCode version): https://github.com/pichillilorenzo/flutter_inappwebview/issues/1697#issuecomment-1596805795
Thank you.