当前位置: 首页 > news >正文

Flutter自动打包ios ipa并且上传

该脚本会自动打包iios ipa 并自动上传,中间自动flutter clean ,自动 pod install
里面需要填写自己应用的 apiKey和apiIssuer
如我的例子中apiKey 为 1234 apiIssuer 为5678,
首先flutter 工程目录 新建 shell目录,目录下新建ipa.sh文件,拷贝如下代码

#!/bin/bash
#### @author: wds# @description: # @LastEditTime: 2024-09-04 17:42:02
### echo "iOS 打包AppStore渠道包"# Stop on errors
cd ..
set -e # Save current directory
current_dir=$(pwd)# Clean the Flutter project
echo "Cleaning Flutter project..."
flutter clean# Get all the dependencies
echo "Getting dependencies..."
flutter pub get# Navigate to the iOS directory
echo "Navigating to the iOS directory..."if [ -d "ios" ]; thencd ios# Install CocoaPods dependenciesecho "Installing CocoaPods dependencies..."pod install# Go back to the original directorycd "$current_dir"echo "CocoaPods setup completed successfully."# Build the iOS appecho "Building the iOS app..."flutter build ipa --release --target=lib/main.dartecho "iOS app build completed successfully."# 上传echo "Upload ipa..."xcrun altool --upload-app --type ios -f build/ios/ipa/*.ipa --apiKey 1234 --apiIssuer 5678echo "Upload ipa successfully."elseecho "Error: 'ios' directory does not exist."exit 1
fi# Optional: Open the iOS project in Xcode (uncomment if needed)
# echo "Opening iOS project in Xcode..."
# open ios/Runner.xcworkspaceecho "All tasks completed successfully."

运行

cd shell
执行 ./ipa.sh
http://www.lryc.cn/news/431205.html

相关文章:

  • 深入理解synchronized的原理是什么
  • Electron32-Vue3OS桌面管理os模板|vite5+electron32+arco后台os系统
  • c++ 定义函数
  • 【深度学习 计算机视觉】计算机视觉工程师所需的和有帮助的基本技能
  • 【CSS】如何写渐变色文字并且有打光效果
  • Android 14(API 级别 34)中,DexClassLoader 不再支持可写 dex/jar 文件
  • Linux -动静态库
  • 原点安全荣获“AutoSec Awards 安全之星”优秀汽车数据安全合规方案奖
  • 2024前端面试题分享
  • 数学基础 -- 线性代数之正交矩阵
  • PostgreSQL 17即将发布,新功能Top 3
  • 心觉:别再做单线程的打工人!换个思路突破
  • 深度学习-用神经网络NN实现足球大小球数据分析软件
  • linux 9系统分区扩容
  • Solidity初体验
  • 大模型笔记01--基于ollama和open-webui快速部署chatgpt
  • html前段小知识点
  • AD7606工作原理以及FPGA控制验证(串行和并行模式)
  • 如何查看Pod的Container资源占用情况
  • WordPress上可以内容替换的插件
  • C++ | Leetcode C++题解之第355题设计推特
  • 构建并训练卷积神经网络(CNN)对CIFAR-10数据集进行分类
  • flowable 根据xml 字符串生成流程图
  • AI建模——AI生成3D内容算法产品介绍与模型免费下载
  • 在Go中迅速使用RabbitMQ
  • Windows JDK安装详细教程
  • Ribbon负载均衡底层原理
  • 【C语言可变参数函数的使用与原理分析】
  • 【笔记】Java EE应用开发环境配置(JDK+Maven+Tomcat+MySQL+IDEA)
  • 一文讲懂扩散模型