Fastfile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. default_platform(:ios)
  2. platform :ios do
  3. desc "编译iOS项目并生成IPA"
  4. lane :build do
  5. # 清理之前的构建
  6. clear_derived_data
  7. # 配置项目信息
  8. project_name = "MiMoLive.xcworkspace" # 替换为你的项目名称
  9. scheme_name = "MiMoLive" # 替换为你的Scheme名称
  10. output_directory = "./build" # 输出目录
  11. # 创建输出目录
  12. sh "mkdir -p #{output_directory}"
  13. # 编译项目
  14. gym(
  15. project: project_name,
  16. scheme: scheme_name,
  17. clean: true,
  18. configuration: "Release",
  19. output_directory: output_directory,
  20. output_name: "MiMoLive", # 生成的IPA名称
  21. export_method: "ad-hoc", # 导出方式:app-store, ad-hoc, enterprise, development
  22. export_options: {
  23. provisioningProfiles: {
  24. "com.jiehe.mimo.debugs" => "/var/jenkins_home/iOS Files/DebugsProfile.mobileprovision" # 替换为你的Bundle ID和描述文件名称
  25. }
  26. }
  27. )
  28. # 输出构建结果路径
  29. UI.message("IPA文件已生成: #{output_directory}")
  30. end
  31. end