Azure管道 Flutter Firebase项目IOS构建错误

yshpjwxd  于 2023-11-19  发布在  iOS
关注(0)|答案(1)|浏览(184)

使用azure pipeline构建flutter firebase项目,flutter build和pod install都成功,但xcode找不到模块firebase-core。
我的源代码构建在Mac上成功,但在Azure管道上失败。我的管道:

  1. trigger:
  2. - none
  3. pool:
  4. vmImage: 'macos-latest'
  5. variables:
  6. # FYI: Did you know, all Azure Pipeline variables are added to the build system environment?
  7. # The following variables will prevent Xcode from code-signing during build.
  8. # This is necessary, because we do not want to CI builds to be sensitive to code-signing settings configured by
  9. # developers during development.
  10. # The 'exportOptions' will ultimately handle the code signing with the correct cert/prov profile.
  11. FLUTTER_XCODE_CODE_SIGN_IDENTITY: ""
  12. FLUTTER_XCODE_CODE_SIGNING_REQUIRED: NO
  13. steps:
  14. - task: InstallAppleCertificate@2
  15. inputs:
  16. certSecureFile: 'certificate.p12'
  17. certPwd: 'password'
  18. keychain: 'temp'
  19. - task: InstallAppleProvisioningProfile@1
  20. inputs:
  21. provisioningProfileLocation: 'secureFiles'
  22. provProfileSecureFile: 'myapp.mobileprovision'
  23. - task: FlutterInstall@0
  24. inputs:
  25. mode: 'auto'
  26. channel: 'stable'
  27. version: 'custom'
  28. customVersion: '3.10.5'
  29. - task: FlutterBuild@0
  30. inputs:
  31. target: 'ipa'
  32. projectDirectory: '.'
  33. exportOptionsPlist: 'ios/ExportOptions.plist'
  34. extraArgs: '--release --obfuscate --split-debug-info=$(Build.SourcesDirectory)/build'
  35. - task: CmdLine@2
  36. inputs:
  37. script: 'cd ios && pod install'
  38. - task: Xcode@5
  39. inputs:
  40. actions: 'build'
  41. scheme: ''
  42. sdk: 'iphoneos'
  43. configuration: 'Release'
  44. xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
  45. xcodeVersion: 'default' # Options: 8, 9, 10, 11, 12, default, specifyPath
  46. - task: Xcode@5
  47. displayName: 'Xcode Archive iOS'
  48. inputs:
  49. actions: 'archive'
  50. xcWorkspacePath: 'ios/Runner.xcworkspace'
  51. scheme: 'Runner'
  52. sdk: 'iphoneos'
  53. packageApp: true
  54. signingOption: 'manual'
  55. configuration: 'Release'
  56. exportOptionsPlist: 'ios/ExportOptions.plist'
  57. signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
  58. provisioningProfileUuid: '$(APPLE_PROV_PROFILE_UUID)'

字符串
https://i.stack.imgur.com/AWYY9.png)的最大值
https://i.stack.imgur.com/EuH85.png
https://i.stack.imgur.com/WscWv.png
flutter build和pod install都成功了,但是xcode找不到模块firebase-core,有什么帮助吗?

k10s72fa

k10s72fa1#

您可以尝试检查以下方法来解决此问题:
1.如前所述,运行下面的命令行安装**firebase_core**插件。

  1. flutter pub add firebase_core

字符串

  • 进入**ios**文件夹,然后执行以下操作。
  • 运行命令行“**pod repo update* x”。
  • 运行命令行'**pod deintegrate*pod deintegrate'。
  • 删除**Podfile.lock文件。您可以尝试运行命令行'flutter clean**'来执行此操作。
  • 运行命令行“**pod install* x”。

相关问题