Wsh's blog Wsh's blog
首页
  • 基础知识
  • ArkUI
  • UIAbility
  • 组件通信方式
  • 前端缓存
  • React
  • typescript
  • javascript
  • flutter
  • node
  • webpack
web3D😉
宝库📰
  • 分类
  • 标签
  • 归档
龙哥的大🐂之路 (opens new window)
GitHub (opens new window)

wsh

热爱前端的程序媛
首页
  • 基础知识
  • ArkUI
  • UIAbility
  • 组件通信方式
  • 前端缓存
  • React
  • typescript
  • javascript
  • flutter
  • node
  • webpack
web3D😉
宝库📰
  • 分类
  • 标签
  • 归档
龙哥的大🐂之路 (opens new window)
GitHub (opens new window)
  • 安装
    • 1. 安装地址
    • 2. 命令行运行提示
    • 3. iOS 工具链设置
  • Dart
  • flutter基本语法
  • flutter
2022-06-12
目录

安装

# 1. 安装地址

  1. 安装 Android Studio (opens new window)
  2. 安装 Xcode (opens new window)
  3. 安装 Flutter (opens new window)

# 2. 命令行运行提示

zsh: command not found: flutter
  1. 执行:
    open ~/.zshrc
  2. 如果 提示文件不存在,则执行命令,新建一个新文件:
    vim ~/.zshrc
  3. 再执行
    open ~/.bash_profile 
  4. 把 bash_profile 中的内容copy到 zshrc 文件中,保存:【:wq回车】。
  5. 再使用source命令重新加载一下:
    source ~/.zshrc
    下次再编辑这个文件就可以直接执行:
    open ~/.zshrc
  6. 验证:
    flutter -h

打开 iOS 模拟器:

open -a Simulator

查看当前可用的模拟器

flutter emulators

运行模拟器:

flutter emulators --launch <emulator id>

检查本地是否有 Android 和 iOS 的开发环境,如果检测到依赖缺失,就会给出对应依赖的安装方法 命令:

flutter doctor

# 3. iOS 工具链设置

将 Flutter 应用部署到真实的 iOS 设备上,我们还需要安装一些额外的连接控制命令工具(就像通过电脑的 iTunes 给手机安装应用一样),并申请一个 iOS 开发者账号进行 Xcode 签名配置

首先安装 libimobiledevice 和 ideviceinstaller 这两项依赖:

brew update
brew install --HEAD usbmuxd
brew link usbmuxd
brew install --HEAD libimobiledevice
brew install ideviceinstaller

打开 项目中的 ios/Runner.xcworkspace,在 Xcode 中,选择导航面板左侧最上方的 Runner 项目。

在 General > Signing > Team 中,需要配置一下开发团队,也就是用 Apple ID 登录 Xcode。当配置完成时,Xcode 会自动创建并下载开发证书。开发者计划的详细信息 (opens new window)

Dart

Dart→

最近更新
01
组件通信方式
01-07
02
UIAbility
01-07
03
ATKTS
01-06
更多文章>
Theme by Vdoing | Copyright © 2022-2025 Wsh | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式