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

yshpjwxd  于 12个月前  发布在  iOS
关注(0)|答案(1)|浏览(156)

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

trigger:
- none

pool:
  vmImage: 'macos-latest'
  
variables:
      # FYI: Did you know, all Azure Pipeline variables are added to the build system environment?
      # The following variables will prevent Xcode from code-signing during build.
      # This is necessary, because we do not want to CI builds to be sensitive to code-signing settings configured by 
      # developers during development.
      # The 'exportOptions' will ultimately handle the code signing with the correct cert/prov profile.
      FLUTTER_XCODE_CODE_SIGN_IDENTITY: ""
      FLUTTER_XCODE_CODE_SIGNING_REQUIRED: NO 
steps:
- task: InstallAppleCertificate@2
  inputs:
    certSecureFile: 'certificate.p12'
    certPwd: 'password'
    keychain: 'temp'
- task: InstallAppleProvisioningProfile@1
  inputs:
    provisioningProfileLocation: 'secureFiles'
    provProfileSecureFile: 'myapp.mobileprovision'  
- task: FlutterInstall@0
  inputs:
    mode: 'auto'
    channel: 'stable'
    version: 'custom'
    customVersion: '3.10.5'
- task: FlutterBuild@0
  inputs:
    target: 'ipa'
    projectDirectory: '.'
    exportOptionsPlist: 'ios/ExportOptions.plist'   
    extraArgs: '--release --obfuscate --split-debug-info=$(Build.SourcesDirectory)/build'

- task: CmdLine@2
  inputs:
    script: 'cd ios && pod install'
- task: Xcode@5
  inputs:
    actions: 'build'
    scheme: ''
    sdk: 'iphoneos'
    configuration: 'Release'
    xcWorkspacePath: '**/*.xcodeproj/project.xcworkspace'
    xcodeVersion: 'default' # Options: 8, 9, 10, 11, 12, default, specifyPath
- task: Xcode@5
  displayName: 'Xcode Archive iOS'
  inputs:
    actions: 'archive'
    xcWorkspacePath: 'ios/Runner.xcworkspace'
    scheme: 'Runner'
    sdk: 'iphoneos'
    packageApp: true
    signingOption: 'manual'
    configuration: 'Release'
    exportOptionsPlist: 'ios/ExportOptions.plist'
    signingIdentity: '$(APPLE_CERTIFICATE_SIGNING_IDENTITY)'
    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**插件。

flutter pub add firebase_core

字符串

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

相关问题