完成 Phase1-Phase3:策略/拦截器/指标上报/最近事件与 Demo/测试
|
|
@ -0,0 +1,31 @@
|
|||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
|
||||
/pubspec.lock
|
||||
**/doc/api/
|
||||
.dart_tool/
|
||||
.flutter-plugins-dependencies
|
||||
/build/
|
||||
/coverage/
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "ac4e799d237041cf905519190471f657b657155a"
|
||||
channel: "stable"
|
||||
|
||||
project_type: package
|
||||
|
|
@ -0,0 +1,457 @@
|
|||
# 一、总体目标与边界
|
||||
|
||||
## 1.1 目标
|
||||
|
||||
基于现有后端接口,建设一套统一的埋点 SDK,覆盖:
|
||||
|
||||
- 技术栈:
|
||||
- Flutter:**独立纯 Dart SDK**
|
||||
- Android:原生 Kotlin SDK
|
||||
- iOS:原生 Swift SDK
|
||||
- 对齐后端接口:
|
||||
- `GET /api/ExternalEventlogs/GetSystemAllDimInfo`
|
||||
- `POST /api/ExternalEventlogs/AddEventListLog`
|
||||
- `POST /api/ExternalEventlogs/AddEventLog`
|
||||
- 三阶段演进:
|
||||
- Phase 1:可用性 + 安全稳定性
|
||||
- Phase 2:可维护性 + 配置化 + 调试
|
||||
- Phase 3:可观测性 + 动态策略 + 插件化
|
||||
|
||||
不绑定具体业务逻辑,但要能支持 OA、教育等各类场景。
|
||||
|
||||
## 1.2 统一事件数据模型
|
||||
|
||||
### 请求结构(与后端对齐)
|
||||
|
||||
jsonc
|
||||
|
||||
```
|
||||
{
|
||||
"system_code": "string",
|
||||
"eventType": "string",
|
||||
"userInfo": {
|
||||
"userId": 0,
|
||||
"userName": "string",
|
||||
"account": "string"
|
||||
},
|
||||
"clientType": 1,
|
||||
"clientTimestamp": 0,
|
||||
"timestamp": "2026-01-26T08:29:44.734Z",
|
||||
"deviceInfo": {
|
||||
"os": "string",
|
||||
"model": "string",
|
||||
"screenResolution": "string"
|
||||
},
|
||||
"eventParams": {
|
||||
// 事件上下文,例如 page、buttonId、url…
|
||||
},
|
||||
"customTags": {
|
||||
// 扩展维度,业务可自定义
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 统一对外 API 设计(跨三端)
|
||||
|
||||
(伪接口,三端风格尽量保持一致)
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
class Analytics {
|
||||
static init(config: SDKConfig): void | Future<void>
|
||||
|
||||
static track(
|
||||
eventType: string,
|
||||
options?: {
|
||||
eventParams?: Map<string, any>
|
||||
customTags?: Map<string, any>
|
||||
timestamp?: number // 毫秒级 client 时间,可不传
|
||||
}
|
||||
): void | Future<void>
|
||||
|
||||
static setUser(userInfo: UserInfo | null): void | Future<void>
|
||||
|
||||
static setDeviceInfo(deviceInfo: DeviceInfo): void | Future<void>
|
||||
|
||||
static flush(): void | Future<void>
|
||||
|
||||
static setDebug(enabled: boolean): void
|
||||
}
|
||||
```
|
||||
|
||||
`SDKConfig` 关键字段(统一):
|
||||
|
||||
- `systemCode: string`
|
||||
- `endpointBaseUrl: string`(如 `https://host/api/ExternalEventlogs`)
|
||||
- `clientType: int`(统一约定:1=Android,2=iOS,3=Flutter)
|
||||
- `enableDebug: boolean`
|
||||
- `batchSize: int`(默认 20)
|
||||
- `flushInterval: int`(秒,默认 15)
|
||||
- `maxCacheSize: int`(默认 5000)
|
||||
- `maxRetryCount: int`(默认 3)
|
||||
- `connectTimeout`, `readTimeout`
|
||||
|
||||
------
|
||||
|
||||
# 二、整体架构设计(通用视角)
|
||||
|
||||
SDK 内部统一分层:
|
||||
|
||||
1. **API 层(Facade)**
|
||||
- 暴露 `init / track / flush / setUser / setDebug`
|
||||
- 做参数校验、线程切换(原生)。
|
||||
2. **EventManager(事件管理层)**
|
||||
- 构造标准事件对象(填充 system_code、userInfo、deviceInfo、时间)。
|
||||
- 写入本地队列;触发上传调度。
|
||||
3. **Storage(存储层)**
|
||||
- 事件持久化(SQLite / 本地 KV)。
|
||||
- 控制队列长度、过期清理。
|
||||
4. **NetworkClient(网络层)**
|
||||
- 封装调用:`AddEventListLog`(优先)、`AddEventLog`(可选降级)。
|
||||
- 统一超时、重试、错误处理。
|
||||
5. **Config / DimensionManager(配置 & 维度)**
|
||||
- 管理 SDKConfig。
|
||||
- Phase 2+:拉取 `GetSystemAllDimInfo`,存本地。
|
||||
6. **Validator / Debug(校验 & 调试)**
|
||||
- Phase 2+:基于配置做事件参数校验。
|
||||
- 统一 debug 日志输出。
|
||||
7. **Interceptors / Plugins(插件层)**
|
||||
- Phase 3:对事件发送前后提供 Hook。
|
||||
|
||||
------
|
||||
|
||||
# 三、三端实现策略
|
||||
|
||||
## 3.1 Flutter 独立 SDK(纯 Dart)
|
||||
|
||||
- 语言:Dart
|
||||
- 存储:推荐 `sqflite`(SQLite)或 `hive`(KV):
|
||||
- `events(id, payload_json, retry_count, create_time)`
|
||||
- 网络:`dio` 或 `http` 包
|
||||
- 调度:
|
||||
- `Timer.periodic` 实现定时 flush
|
||||
- 控制并发:用一个「上传中」标志避免并发多次 flush
|
||||
- 生命周期:
|
||||
- SDK 暴露 `flush()`;
|
||||
- 应用可在自身生命周期(如 `WidgetsBindingObserver` 或 Router)中调用。
|
||||
|
||||
## 3.2 Android SDK
|
||||
|
||||
- 语言:Kotlin(对 Java 兼容)
|
||||
- 存储:Room 或 SQLite 封装
|
||||
- 网络:OkHttp + Retrofit
|
||||
- 线程:Kotlin Coroutines + 单一上传协程
|
||||
- 生命周期:`ProcessLifecycleOwner` 监听前后台 → 后台前触发 `flush`
|
||||
|
||||
## 3.3 iOS SDK
|
||||
|
||||
- 语言:Swift(暴露 ObjC 兼容 API)
|
||||
- 存储:SQLite 或 Core Data 轻量封装
|
||||
- 网络:URLSession
|
||||
- 生命周期:监听 `willResignActive` / `didEnterBackground` 调用 `flush`
|
||||
|
||||
------
|
||||
|
||||
# 四、三阶段规划(含架构与验收)
|
||||
|
||||
------
|
||||
|
||||
## Phase 1:可用性 + 安全稳定性
|
||||
|
||||
### 4.1 目标
|
||||
|
||||
- 提供稳定、可用的基础事件采集 & 批量上报能力。
|
||||
- 不影响业务性能和体验。
|
||||
- 基本安全(HTTPS,预留签名扩展)。
|
||||
|
||||
### 4.2 能力范围
|
||||
|
||||
1. 初始化
|
||||
- 校验并保存 `SDKConfig`;
|
||||
- 自动采集 `DeviceInfo`;
|
||||
- 初始化本地存储;
|
||||
- 启动定时 flush 调度(根据 flushInterval)。
|
||||
2. 事件写入(track)
|
||||
- 检查 SDK 是否已 init;
|
||||
- 构造 Event:
|
||||
- `system_code` from config
|
||||
- `eventType` from 调用
|
||||
- `userInfo` from `setUser`
|
||||
- `clientType` from config
|
||||
- `clientTimestamp` = 当前毫秒时间戳
|
||||
- `timestamp` = ISO8601 字符串
|
||||
- `deviceInfo` from 初始化采集
|
||||
- `eventParams`、`customTags` from 调用
|
||||
- 事件入内存队列 + 异步持久化保存。
|
||||
3. 缓存与发送策略
|
||||
- 存储:
|
||||
- SQLite / KV + 索引;
|
||||
- 最大缓存条数:`maxCacheSize`,超限则删除最旧事件。
|
||||
- 发送:
|
||||
- 定时器触发 flush;
|
||||
- 队列长度 >= `batchSize` 可立即 flush;
|
||||
- 调用 `AddEventListLog` 批量上传;
|
||||
- 如后端明确不支持,可选降级 `AddEventLog`。
|
||||
- 重试:
|
||||
- 网络错误或 5xx 重试,最多 `maxRetryCount`,指数退避;
|
||||
- 4xx 视为业务失败,不重试,直接丢弃该批,并记录错误(日志)。
|
||||
4. 安全与稳定
|
||||
- endpoint 必须为 HTTPS;
|
||||
- 预留请求 header 扩展(签名 / 时间戳 / nonce)。
|
||||
- 所有 IO 和网络在后台线程 / async,不阻塞 UI;
|
||||
- 所有异常在 SDK 内部捕获,不向上抛出导致崩溃。
|
||||
|
||||
### 4.3 开发要求
|
||||
|
||||
通用:
|
||||
|
||||
- 核心逻辑单元测试覆盖率 ≥ 80%(事件构造、缓存、上传、重试)。
|
||||
- 使用统一的日志前缀(例如 `[AnalyticsSDK]`)。
|
||||
- API 文档齐全,含参数说明和示例代码。
|
||||
|
||||
Flutter:
|
||||
|
||||
- 不引入过重依赖,确保兼容常见 Flutter stable 版本;
|
||||
- 高频 track 时(例如 10 次/秒)主 Isolate 无明显卡顿。
|
||||
|
||||
Android:
|
||||
|
||||
- 支持主流 Android 版本(按照公司基线,例如 API 21+);
|
||||
- 在 debug 版开启详细日志,release 版关闭。
|
||||
|
||||
iOS:
|
||||
|
||||
- 支持主流 iOS 版本(例如 iOS 12+);
|
||||
- 保证在 App 退后台 / 杀进程前能尽可能 flush。
|
||||
|
||||
### 4.4 Phase 1 验收标准
|
||||
|
||||
功能:
|
||||
|
||||
- 三端均可:
|
||||
`init → setUser → track → flush` 全流程成功;
|
||||
- 离线:
|
||||
- 断网时事件成功写入本地;
|
||||
- 恢复网络后自动/手动 flush,可在后端查看到补发数据;
|
||||
- 批量:
|
||||
- 实际调用 `AddEventListLog`;
|
||||
- 后端数据结构与约定一致(字段正确)。
|
||||
|
||||
稳定:
|
||||
|
||||
- 连续调用 track 1 万次以内无崩溃;
|
||||
- 事件缓存满时按预期丢弃最旧数据,不影响业务。
|
||||
|
||||
安全:
|
||||
|
||||
- 所有请求通过 HTTPS;
|
||||
- 默认不输出包含 userInfo 的敏感日志(除非显式 enableDebug)。
|
||||
|
||||
文档:
|
||||
|
||||
- 各端接入指南(集成、初始化、上报示例);
|
||||
- 一份基础 FAQ(常见错误、排查方式)。
|
||||
|
||||
------
|
||||
|
||||
## Phase 2:可维护性 + 配置化 + 调试能力
|
||||
|
||||
### 5.1 目标
|
||||
|
||||
- 降低埋点维护成本;
|
||||
- 支持通过后端配置管理事件和维度;
|
||||
- 提供调试和校验工具,提高埋点正确率。
|
||||
|
||||
### 5.2 能力范围
|
||||
|
||||
1. 利用 `GetSystemAllDimInfo` 下发配置
|
||||
|
||||
- SDK 在 init 后或定期调用:
|
||||
- 获取 `systemInfo`、`systemEventTypes`、`systemCustonTas`;
|
||||
- 转换成本地配置对象,缓存到本地(带 version / lastModified):
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
type EventDefinition = {
|
||||
eventCode: string
|
||||
eventName: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
type TagDefinition = {
|
||||
tagName: string
|
||||
tagType: string // string/int/bool/enum
|
||||
isRequired: boolean
|
||||
description?: string
|
||||
}
|
||||
```
|
||||
|
||||
- 失败不影响事件发送(降级为无配置模式)。
|
||||
|
||||
1. 事件校验
|
||||
|
||||
- 在 `track` 时(主要在 debug 模式启用):
|
||||
- 校验 `eventType` 是否存在于 `systemEventTypes`;
|
||||
- 使用 `systemCustonTas` 检查:
|
||||
- 必填 tag 是否存在;
|
||||
- 类型是否匹配(尝试容错转换)。
|
||||
- 错误处理:
|
||||
- Debug 模式:
|
||||
- 在日志中详细打印:未注册事件、缺失字段、类型错误;
|
||||
- 可配置:是否禁止发送这类事件。
|
||||
- Release 模式:
|
||||
- 仍发送,但在 `customTags` 中附加:
|
||||
- `_sdk_invalid_event`
|
||||
- `_sdk_missing_tags`
|
||||
- `_sdk_type_error_fields`
|
||||
|
||||
1. 调试工具
|
||||
|
||||
- 日志级:
|
||||
- `setDebug(true)` 时:
|
||||
- 打印每条事件的 JSON;
|
||||
- 打印发送结果(状态码、错误内容)。
|
||||
- Demo 内调试页面(建议):
|
||||
- 支持:
|
||||
- 查看缓存事件数量 / 最近 N 条事件摘要;
|
||||
- 按钮触发 flush。
|
||||
|
||||
1. 队列与策略优化(基本)
|
||||
|
||||
- 事件过期时间(例如默认 7 天);
|
||||
- 网络状态感知(原生):
|
||||
- Wi-Fi 下更高频 / 大批次;
|
||||
- 蜂窝网络下减少频率 / 批量。
|
||||
|
||||
### 5.3 开发要求
|
||||
|
||||
- 新增模块:
|
||||
- `ConfigManager`:拉取与缓存后端维度配置;
|
||||
- `Validator`:统一事件校验逻辑。
|
||||
- 兼容 Phase 1:
|
||||
- 未取到配置时,一切行为回退到 Phase 1 模式;
|
||||
- 增加测试:
|
||||
- 事件存在 / 不存在;
|
||||
- 必填字段缺失;
|
||||
- 类型错误时的行为。
|
||||
|
||||
### 5.4 Phase 2 验收标准
|
||||
|
||||
功能:
|
||||
|
||||
- 初始化后,可以成功调用 `GetSystemAllDimInfo` 并本地缓存;
|
||||
- 在 debug 模式下:
|
||||
- 未配置的 `eventType` 调用时有明确日志提示;
|
||||
- 缺失必填 tag / 类型错误能被检测并打印提示。
|
||||
|
||||
调试体验:
|
||||
|
||||
- 开发可以在本地:
|
||||
- 看到完整事件 JSON;
|
||||
- 根据提示迅速发现埋点错漏。
|
||||
|
||||
可维护性:
|
||||
|
||||
- 后端新增事件配置(systemEventTypes 中新增)后,不发版即可在客户端调用新事件;
|
||||
- 对关键事件,可以通过配置 + SDK 校验,显著减少埋点错误。
|
||||
|
||||
------
|
||||
|
||||
## Phase 3:可观测性 + 动态策略 + 插件化
|
||||
|
||||
### 6.1 目标
|
||||
|
||||
- 让 SDK 自身「可被监控、可被远程控制」;
|
||||
- 支持高级使用场景:采样、动态开关、插件扩展。
|
||||
|
||||
### 6.2 能力范围
|
||||
|
||||
1. SDK 自身监控埋点
|
||||
|
||||
- 内部采集 SDK 运行指标(作为特殊事件上报):
|
||||
- 发送成功计数 / 失败计数 / 重试次数;
|
||||
- 平均延迟;
|
||||
- 队列当前长度 / 溢出丢弃数;
|
||||
- 周期性上报(如每 N 分钟一次)。
|
||||
|
||||
1. 动态策略控制
|
||||
|
||||
- 通过配置(可在 `GetSystemAllDimInfo` 扩展,或单独接口)下发策略,如:
|
||||
|
||||
jsonc
|
||||
|
||||
```
|
||||
{
|
||||
"enabled": true,
|
||||
"eventSettings": {
|
||||
"EVENT_A": { "enabled": true, "sampleRate": 1.0 },
|
||||
"EVENT_B": { "enabled": false, "sampleRate": 0.0 },
|
||||
"EVENT_C": { "enabled": true, "sampleRate": 0.1 }
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- SDK 在 `track` 时:
|
||||
- 若事件被标记 `enabled=false` → 直接丢弃;
|
||||
- 若 `sampleRate < 1` → 按采样率丢弃部分事件(哈希或随机)。
|
||||
|
||||
1. 插件 / 拦截器机制
|
||||
|
||||
- 接口示例(通用设计):
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
interface EventInterceptor {
|
||||
beforeSend(event: Event): Event | null | Promise<Event | null>
|
||||
afterSend(event: Event, result: SendResult): void | Promise<void>
|
||||
}
|
||||
```
|
||||
|
||||
- SDK 提供:
|
||||
- `registerInterceptor(interceptor)` / `addInterceptor` 方法;
|
||||
- 内置拦截器:debug 打印、公共字段填充等。
|
||||
|
||||
典型用途:
|
||||
|
||||
- 业务统一追加自定义 `customTags`(如租户 ID、业务线 ID);
|
||||
- 将部分发送失败事件写入本地日志,便于问题排查。
|
||||
|
||||
1. 版本管理
|
||||
|
||||
- 事件级 schemaVersion 预留:
|
||||
- 在 `customTags` 或 `eventParams` 中加入 `_schema_version`。
|
||||
- SDK 版本上报:
|
||||
- 每条事件默认携带 `_sdk_version` 和 `_platform`,便于后端统计版本分布。
|
||||
|
||||
### 6.3 开发要求
|
||||
|
||||
- 性能:
|
||||
- 插件链路运行开销可控(单条事件处理在毫秒级以内);
|
||||
- 隔离:
|
||||
- 单个插件抛出的异常不会影响主流程和其他插件;
|
||||
- 文档:
|
||||
- 清晰说明策略配置字段及含义;
|
||||
- 插件开发 & 使用指南。
|
||||
|
||||
### 6.4 Phase 3 验收标准
|
||||
|
||||
- 自监控:
|
||||
- 后端可以查看 SDK 的发送成功率、失败率、队列长度等;
|
||||
- 动态控制:
|
||||
- 通过配置关闭某个 eventType 后,客户端不再上报该事件;
|
||||
- 调整 sampleRate 后,事件量按预期变化;
|
||||
- 插件:
|
||||
- 样例插件能实现:
|
||||
- 自动附加业务 tag;
|
||||
- 记录失败事件到本地日志。
|
||||
|
||||
------
|
||||
|
||||
这版方案已经:
|
||||
|
||||
- 明确:Flutter 为独立纯 Dart SDK,与 Android/iOS 平行;
|
||||
- 统一:三端对外 API、数据结构、阶段目标和验收标准;
|
||||
- 预留:维度配置、校验、动态策略、插件机制的扩展空间。
|
||||
|
|
@ -0,0 +1,530 @@
|
|||
## 一、统一模型 & 规范(细化)
|
||||
|
||||
### 1.1 SDKConfig 统一规范
|
||||
|
||||
所有端保持字段一致,命名按各端风格适配:
|
||||
|
||||
jsonc
|
||||
|
||||
```
|
||||
{
|
||||
"systemCode": "OA_APP",
|
||||
"endpointBaseUrl": "https://host/api/ExternalEventlogs",
|
||||
"clientType": 1, // 1 Android, 2 iOS, 3 Flutter
|
||||
"enableDebug": false,
|
||||
|
||||
"batchSize": 20, // 单次最多上传条数
|
||||
"flushInterval": 15, // 秒,定时 flush 间隔
|
||||
"maxCacheSize": 5000, // 本地缓存最大事件条数
|
||||
"maxRetryCount": 3, // 最大重试次数
|
||||
|
||||
"connectTimeout": 5000, // ms
|
||||
"readTimeout": 5000 // ms
|
||||
|
||||
// 预留,将来可扩:
|
||||
// "globalTags": { "appVersion": "1.0.0", "channel": "official" }
|
||||
}
|
||||
```
|
||||
|
||||
### 1.2 Event 内部字段规范
|
||||
|
||||
统一内部 Event 类字段(各端自行建模):
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
class Event {
|
||||
String id; // 本地ID/主键
|
||||
String systemCode;
|
||||
String eventType;
|
||||
|
||||
UserInfo? userInfo;
|
||||
int clientType;
|
||||
int clientTimestamp; // ms
|
||||
String timestamp; // ISO8601
|
||||
|
||||
DeviceInfo deviceInfo;
|
||||
|
||||
Map<String, dynamic>? eventParams;
|
||||
Map<String, dynamic>? customTags;
|
||||
|
||||
int retryCount; // 已重试次数
|
||||
DateTime createTime;
|
||||
}
|
||||
```
|
||||
|
||||
------
|
||||
|
||||
## 二、Phase 1:可用 + 稳定(细化到类 & 表)
|
||||
|
||||
### 2.1 通用逻辑(跨端统一)
|
||||
|
||||
#### 2.1.1 发送流程(时序)
|
||||
|
||||
1. App 调用 `Analytics.init(config)`
|
||||
2. SDK:
|
||||
- 保存 config
|
||||
- 采集 DeviceInfo
|
||||
- 初始化 Storage
|
||||
- 启动定时任务(每 flushInterval 秒执行 flush)
|
||||
3. App 调用 `Analytics.setUser(...)`(可多次)
|
||||
4. App 调用 `Analytics.track(eventType, {...})`:
|
||||
- 构造 Event
|
||||
- 持久化入库
|
||||
- 如果缓存条数 ≥ batchSize:启动一次 flush
|
||||
5. flush 流程:
|
||||
- 从存储取前 `batchSize` 条事件;
|
||||
- 调用 `AddEventListLog`:
|
||||
- 成功:删除这些事件;
|
||||
- 网络错/5xx:更新 retryCount,重排队,按指数退避调度;
|
||||
- 4xx:记录日志,删除这些事件(视为「业务不可重试」)。
|
||||
|
||||
#### 2.1.2 本地表结构(推荐统一)
|
||||
|
||||
SQLite 表 `events`:
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
CREATE TABLE events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
payload TEXT NOT NULL, -- 事件完整 JSON
|
||||
retry_count INTEGER NOT NULL DEFAULT 0,
|
||||
create_time INTEGER NOT NULL -- ms since epoch
|
||||
);
|
||||
```
|
||||
|
||||
索引:
|
||||
|
||||
sql
|
||||
|
||||
```
|
||||
CREATE INDEX idx_events_create_time ON events(create_time);
|
||||
```
|
||||
|
||||
> Flutter 可用 sqflite 按此结构实现。
|
||||
|
||||
------
|
||||
|
||||
### 2.2 Flutter SDK(Dart 独立实现)
|
||||
|
||||
#### 2.2.1 目录结构建议
|
||||
|
||||
text
|
||||
|
||||
```
|
||||
lib/
|
||||
analytics.dart // 对外 Facade
|
||||
src/
|
||||
config/
|
||||
analytics_config.dart
|
||||
model/
|
||||
event.dart
|
||||
user_info.dart
|
||||
device_info.dart
|
||||
storage/
|
||||
event_storage.dart // 接口
|
||||
sqflite_event_storage.dart
|
||||
network/
|
||||
api_client.dart
|
||||
core/
|
||||
analytics_core.dart // EventManager + Scheduler
|
||||
scheduler.dart
|
||||
util/
|
||||
logger.dart
|
||||
time_util.dart
|
||||
```
|
||||
|
||||
#### 2.2.2 关键类职责
|
||||
|
||||
- `Analytics`(facade)
|
||||
- 静态方法:`init / track / setUser / setDeviceInfo / flush / setDebug`
|
||||
- 内部持有单例 `AnalyticsCore`
|
||||
- `AnalyticsCore`
|
||||
- 字段:
|
||||
- `AnalyticsConfig _config`
|
||||
- `UserInfo? _user`
|
||||
- `DeviceInfo _device`
|
||||
- `EventStorage _storage`
|
||||
- `ApiClient _apiClient`
|
||||
- `Timer? _timer`
|
||||
- `bool _isFlushing`
|
||||
- 方法:
|
||||
- `init(config)`
|
||||
- `setUser`
|
||||
- `setDeviceInfo`
|
||||
- `track(...)`
|
||||
- `flush({bool force = false})`
|
||||
- `EventStorage` 接口 + `SqfliteEventStorage` 实现
|
||||
- `Future<void> insert(Event event)`
|
||||
- `Future<List<StoredEvent>> fetchBatch(int limit)`
|
||||
- `Future<void> deleteByIds(List<int> ids)`
|
||||
- `Future<int> count()`
|
||||
- `Future<void> trimToMaxSize(int maxSize)`
|
||||
- `ApiClient`
|
||||
- `Future<bool> sendBatch(List<Event> events)`
|
||||
- POST `/AddEventListLog`,Body 为数组;
|
||||
- 成功返回 true,失败 false 或抛异常。
|
||||
- (可选)单条 `sendSingle(Event)` 作降级方案。
|
||||
- `Scheduler`
|
||||
- 内含 `Timer.periodic`;
|
||||
- 每次 tick 调用 `core.flush()`;
|
||||
- 通过 `_isFlushing` 防并发。
|
||||
|
||||
#### 2.2.3 技术要求(Flutter)
|
||||
|
||||
- 使用 `async/await`,所有 IO 非阻塞;
|
||||
- `Analytics` 所有对外 API 均返回 `Future`(init / track / flush)便于业务 await;
|
||||
- 避免 `Timer` 仍在运行却对象已销毁:在必要时提供 `dispose`(可选)。
|
||||
|
||||
------
|
||||
|
||||
### 2.3 Android SDK(Kotlin)
|
||||
|
||||
#### 2.3.1 目录结构建议
|
||||
|
||||
text
|
||||
|
||||
```
|
||||
com.company.analytics/
|
||||
Analytics.kt // Facade
|
||||
config/
|
||||
AnalyticsConfig.kt
|
||||
model/
|
||||
Event.kt
|
||||
UserInfo.kt
|
||||
DeviceInfo.kt
|
||||
storage/
|
||||
EventDao.kt
|
||||
EventDatabase.kt
|
||||
network/
|
||||
ApiService.kt
|
||||
NetworkClient.kt
|
||||
core/
|
||||
AnalyticsCore.kt
|
||||
FlushScheduler.kt
|
||||
util/
|
||||
Logger.kt
|
||||
TimeUtil.kt
|
||||
```
|
||||
|
||||
#### 2.3.2 关键实现要点
|
||||
|
||||
- Room 表结构:
|
||||
|
||||
kotlin
|
||||
|
||||
```
|
||||
@Entity(tableName = "events")
|
||||
data class EventEntity(
|
||||
@PrimaryKey(autoGenerate = true) val id: Long = 0,
|
||||
@ColumnInfo(name = "payload") val payload: String,
|
||||
@ColumnInfo(name = "retry_count") val retryCount: Int = 0,
|
||||
@ColumnInfo(name = "create_time") val createTime: Long = System.currentTimeMillis()
|
||||
)
|
||||
```
|
||||
|
||||
- DAO:
|
||||
|
||||
kotlin
|
||||
|
||||
```
|
||||
@Dao
|
||||
interface EventDao {
|
||||
@Insert
|
||||
suspend fun insert(entity: EventEntity)
|
||||
|
||||
@Query("SELECT * FROM events ORDER BY create_time ASC LIMIT :limit")
|
||||
suspend fun fetchBatch(limit: Int): List<EventEntity>
|
||||
|
||||
@Query("DELETE FROM events WHERE id IN (:ids)")
|
||||
suspend fun deleteByIds(ids: List<Long>)
|
||||
|
||||
@Query("SELECT COUNT(*) FROM events")
|
||||
suspend fun count(): Int
|
||||
|
||||
@Query("""
|
||||
DELETE FROM events WHERE id IN (
|
||||
SELECT id FROM events ORDER BY create_time ASC LIMIT
|
||||
(SELECT MAX(0, COUNT(*) - :maxSize) FROM events)
|
||||
)
|
||||
""")
|
||||
suspend fun trimToMaxSize(maxSize: Int)
|
||||
}
|
||||
```
|
||||
|
||||
- 调度:
|
||||
- 使用 `CoroutineScope(SupervisorJob() + Dispatchers.IO)`;
|
||||
- `FlushScheduler` 用 `delay` 或 `TickerChannel` 实现周期任务;
|
||||
- 使用 `Mutex` 或 flag 控制“单一 flush”。
|
||||
|
||||
------
|
||||
|
||||
### 2.4 iOS SDK(Swift)
|
||||
|
||||
#### 2.4.1 目录结构建议
|
||||
|
||||
text
|
||||
|
||||
```
|
||||
AnalyticsSDK/
|
||||
Analytics.swift // Facade
|
||||
Config/
|
||||
AnalyticsConfig.swift
|
||||
Model/
|
||||
Event.swift
|
||||
UserInfo.swift
|
||||
DeviceInfo.swift
|
||||
Storage/
|
||||
EventStorage.swift
|
||||
SQLiteEventStorage.swift
|
||||
Network/
|
||||
ApiClient.swift
|
||||
Core/
|
||||
AnalyticsCore.swift
|
||||
FlushScheduler.swift
|
||||
Util/
|
||||
Logger.swift
|
||||
TimeUtil.swift
|
||||
```
|
||||
|
||||
#### 2.4.2 关键实现要点
|
||||
|
||||
- 存储:
|
||||
- 使用 SQLite(用 FMDB/GRDB 等封装,或自己写简单 wrapper);
|
||||
- 网络:
|
||||
- URLSession + Codable 序列化;
|
||||
- 定时:
|
||||
- `Timer.scheduledTimer` 或 `DispatchSourceTimer`;
|
||||
- 生命周期:
|
||||
- 订阅 `UIApplication` 通知,在进入后台前调用 `flush()`。
|
||||
|
||||
------
|
||||
|
||||
### 2.5 Phase 1 验收 checklist(落地用)
|
||||
|
||||
- 三端提供初始化、用户设置、事件上报、flush API;
|
||||
- 本地缓存可持久化,多次启动数据不丢;
|
||||
- 断网 → 上报 → 恢复,事件能补发到后端;
|
||||
- 压测 10K 条事件,上报成功率可接受(> 99%,无 crash);
|
||||
- 业务方集成 Demo App 并通过功能测试。
|
||||
|
||||
------
|
||||
|
||||
## 三、Phase 2:配置化 + 校验 + 调试(细化)
|
||||
|
||||
### 3.1 新增数据结构
|
||||
|
||||
#### 3.1.1 维度配置缓存(本地)
|
||||
|
||||
以通用视角描述,三端类似:
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
class SystemDimInfo {
|
||||
SystemInfo systemInfo;
|
||||
List<EventDefinition> eventDefinitions;
|
||||
List<TagDefinition> tagDefinitions;
|
||||
DateTime lastFetchedAt;
|
||||
String? version; // 从后端 header 或 body 获得
|
||||
}
|
||||
```
|
||||
|
||||
- `EventDefinition` 来自 `systemEventTypes`:
|
||||
- `eventCode`, `eventName`, `description`
|
||||
- `TagDefinition` 来自 `systemCustonTas`:
|
||||
- `tag_name`, `tag_type`, `is_required`, `description`
|
||||
|
||||
本地可存储在:
|
||||
|
||||
- Flutter:sqflite/hive 单独表/box;
|
||||
- Android:Room 新表 `config`;
|
||||
- iOS:UserDefaults / SQLite。
|
||||
|
||||
### 3.2 ConfigManager / DimensionManager
|
||||
|
||||
职责:
|
||||
|
||||
- 拉取 `GetSystemAllDimInfo(system_code)`;
|
||||
- 解析为 `SystemDimInfo`;
|
||||
- 序列化到本地;
|
||||
- 提供只读访问 API 给 Validator。
|
||||
|
||||
调用时机:
|
||||
|
||||
- init 成功后异步拉取;
|
||||
- 间隔 N 小时(如 12 / 24h)自动刷新;
|
||||
- 提供 `forceRefresh()` 接口(仅 debug 使用)。
|
||||
|
||||
### 3.3 Validator 详细逻辑
|
||||
|
||||
以伪代码描述:
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
validateEvent(event: Event): ValidationResult {
|
||||
let result = new ValidationResult()
|
||||
|
||||
// 1. eventType 是否在配置中
|
||||
if (!config.hasEvent(event.eventType)) {
|
||||
result.addError("UNKNOWN_EVENT_TYPE")
|
||||
}
|
||||
|
||||
// 2. 校验必填 tag(customTags)
|
||||
let requiredTags = config.getRequiredTags()
|
||||
for (tag in requiredTags) {
|
||||
if (!event.customTags?.containsKey(tag.name)) {
|
||||
result.addWarning("MISSING_REQUIRED_TAG", tag.name)
|
||||
}
|
||||
else {
|
||||
// 3. 简单类型校验
|
||||
if (!typeMatch(event.customTags[tag.name], tag.type)) {
|
||||
result.addWarning("TYPE_MISMATCH", tag.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
```
|
||||
|
||||
- Debug 模式:
|
||||
- 所有 `errors` + `warnings` 打到日志;
|
||||
- 可选策略:有 error 的事件不发送。
|
||||
- Release 模式:
|
||||
- 仍发送,但将错误信息 encode 到 `customTags._sdk_validation` 中。
|
||||
|
||||
### 3.4 调试支持细化
|
||||
|
||||
#### 3.4.1 日志规范
|
||||
|
||||
统一日志前缀与级别:
|
||||
|
||||
- `[AnalyticsSDK][DEBUG] ...`
|
||||
- `[AnalyticsSDK][ERROR] ...`
|
||||
|
||||
在 debug 打开时:
|
||||
|
||||
- 打印:
|
||||
- 初始化配置;
|
||||
- 事件构造后的 JSON;
|
||||
- 每次发送的批次大小、结果状态码;
|
||||
- 校验结果(仅 debug)。
|
||||
|
||||
#### 3.4.2 Demo 调试面板(可选但推荐)
|
||||
|
||||
Flutter / 原生各自 Demo App 中:
|
||||
|
||||
- 提供一个 Debug 页面:
|
||||
- 显示当前缓存条数;
|
||||
- 最近 20 条事件简要信息(id、eventType、createTime、是否校验通过);
|
||||
- 按钮:`Flush Now`,调用 `Analytics.flush()`。
|
||||
|
||||
------
|
||||
|
||||
## 四、Phase 3:监控 + 动态策略 + 插件(细化)
|
||||
|
||||
### 4.1 SDK 自监控事件设计
|
||||
|
||||
定义一批内部保留事件(只你们自己分析用):
|
||||
|
||||
- `SDK_METRICS_SEND`:
|
||||
- 字段:
|
||||
- `sentCount`
|
||||
- `failedCount`
|
||||
- `retryCount`
|
||||
- `avgLatencyMs`
|
||||
- `SDK_METRICS_QUEUE`:
|
||||
- 字段:
|
||||
- `queueSize`
|
||||
- `droppedEvents`
|
||||
|
||||
实现:
|
||||
|
||||
- 在 SDK 内部维护计数器;
|
||||
- 每隔 M 分钟(如 10 分钟)封装成 Event,正常通过日志接口上报。
|
||||
|
||||
### 4.2 策略配置结构
|
||||
|
||||
可通过扩展 `GetSystemAllDimInfo` 或另建接口下发 JSON,例如:
|
||||
|
||||
jsonc
|
||||
|
||||
```
|
||||
{
|
||||
"sdkStrategy": {
|
||||
"enabled": true,
|
||||
"defaultSampleRate": 1.0,
|
||||
"eventSettings": {
|
||||
"PAGE_VIEW": { "enabled": true, "sampleRate": 0.2 },
|
||||
"DEBUG_EVENT": { "enabled": false, "sampleRate": 0.0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
SDK 行为:
|
||||
|
||||
- 加载策略后:
|
||||
- `if !strategy.enabled`:`track` 直接返回,不做任何事情(紧急开关)。
|
||||
- 查找具体 eventType 的策略:
|
||||
- `enabled=false` → 直接丢;
|
||||
- `sampleRate<1` → 按 sampleRate 随机采样(或使用 eventId hash)。
|
||||
|
||||
### 4.3 插件机制设计
|
||||
|
||||
通用接口(以伪代码):
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
interface EventInterceptor {
|
||||
beforeSend(event: Event): Event | null | Promise<Event | null>
|
||||
afterSend(event: Event, result: SendResult): void | Promise<void>
|
||||
}
|
||||
```
|
||||
|
||||
- SDK 内部维护 `List<EventInterceptor>`;
|
||||
- 在真正上传前,按顺序调用 `beforeSend`:
|
||||
- 任一返回 null → 事件被拦截,标记为丢弃;
|
||||
- 上传结束后,按顺序调用 `afterSend`。
|
||||
|
||||
错误隔离:
|
||||
|
||||
ts
|
||||
|
||||
```
|
||||
for interceptor in interceptors:
|
||||
try {
|
||||
event = interceptor.beforeSend(event)
|
||||
} catch (e) {
|
||||
log.warn("interceptor error: ", e)
|
||||
}
|
||||
```
|
||||
|
||||
示例内置插件:
|
||||
|
||||
- DebugInterceptor:
|
||||
- beforeSend 打印事件 JSON(受 debug 开关控制);
|
||||
- CommonTagsInterceptor:
|
||||
- 自动在 customTags 注入 `_sdk_version`、`_platform` 等。
|
||||
|
||||
------
|
||||
|
||||
## 五、落地实施建议(简短)
|
||||
|
||||
### 5.1 Phase 1 任务拆分(多端并行)
|
||||
|
||||
- 架构公共约定 & 协议定义(1~2 天)
|
||||
- Flutter SDK Phase 1 实现(约 5~10 个工作日)
|
||||
- Android SDK Phase 1 实现(约 5~10 天)
|
||||
- iOS SDK Phase 1 实现(约 5~10 天)
|
||||
- 后端联调 & Demo App 验证(3~5 天)
|
||||
|
||||
### 5.2 后续 Phase 2/3 可以按版本迭代
|
||||
|
||||
- v1.x:只做 Phase 1,快速在一个业务 App 落地;
|
||||
- v2.x:引入配置拉取 + 校验 + Debug 面板;
|
||||
- v3.x:按需要逐步加上策略控制 & 插件。
|
||||
|
|
@ -0,0 +1,446 @@
|
|||
|
||||
|
||||
# Flutter 埋点 SDK 设计方案(独立 Dart 实现)
|
||||
|
||||
## 1. 概述
|
||||
|
||||
### 1.1 背景
|
||||
|
||||
为企业内部 OA / 教育等应用统一建设埋点能力,当前后端已提供日志上报接口:
|
||||
|
||||
- `GET /api/ExternalEventlogs/GetSystemAllDimInfo`
|
||||
- `POST /api/ExternalEventlogs/AddEventListLog`
|
||||
- `POST /api/ExternalEventlogs/AddEventLog`
|
||||
|
||||
需要基于上述接口,开发一个独立的 Flutter 埋点 SDK(纯 Dart 实现),并规划三阶段能力演进。
|
||||
|
||||
### 1.2 目标
|
||||
|
||||
- 开发 Flutter 独立埋点 SDK 包(例如:`company_analytics_sdk`)。
|
||||
- 提供统一的初始化、事件上报、缓存与批量上报能力。
|
||||
- 三阶段演进目标:
|
||||
- Phase 1:可用性 + 安全稳定性。
|
||||
- Phase 2:可维护性 + 配置化 + 调试。
|
||||
- Phase 3:可观测性 + 动态策略 + 插件化。
|
||||
|
||||
---
|
||||
|
||||
## 2. 统一模型与对外 API
|
||||
|
||||
### 2.1 统一事件数据结构(对齐后端)
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"system_code": "string",
|
||||
"eventType": "string",
|
||||
"userInfo": {
|
||||
"userId": 0,
|
||||
"userName": "string",
|
||||
"account": "string"
|
||||
},
|
||||
"clientType": 1,
|
||||
"clientTimestamp": 0,
|
||||
"timestamp": "2026-01-26T08:29:44.734Z",
|
||||
"deviceInfo": {
|
||||
"os": "string",
|
||||
"model": "string",
|
||||
"screenResolution": "string"
|
||||
},
|
||||
"eventParams": {
|
||||
// 事件上下文
|
||||
},
|
||||
"customTags": {
|
||||
// 业务维度
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 2.2 Flutter SDK 对外 Facade API
|
||||
|
||||
```dart
|
||||
class Analytics {
|
||||
static Future<void> init(AnalyticsConfig config);
|
||||
|
||||
static Future<void> track(
|
||||
String eventType, {
|
||||
Map<String, dynamic>? eventParams,
|
||||
Map<String, dynamic>? customTags,
|
||||
int? timestamp, // ms
|
||||
});
|
||||
|
||||
static Future<void> setUser(UserInfo? userInfo);
|
||||
|
||||
static Future<void> setDeviceInfo(DeviceInfo deviceInfo);
|
||||
|
||||
static Future<void> flush();
|
||||
|
||||
static void setDebug(bool enabled);
|
||||
|
||||
// Phase 3
|
||||
static void addInterceptor(AnalyticsInterceptor interceptor);
|
||||
}
|
||||
```
|
||||
|
||||
### 2.3 SDKConfig 统一规范
|
||||
|
||||
```dart
|
||||
class AnalyticsConfig {
|
||||
final String systemCode;
|
||||
final String endpointBaseUrl; // https://host/api/ExternalEventlogs
|
||||
final int clientType; // 1=Android, 2=iOS, 3=Flutter
|
||||
final bool enableDebug;
|
||||
|
||||
final int batchSize; // 默认 20
|
||||
final int flushInterval; // 秒,默认 15
|
||||
final int maxCacheSize; // 默认 5000
|
||||
final int maxRetryCount; // 默认 3
|
||||
|
||||
final Duration connectTimeout; // 默认 5s
|
||||
final Duration readTimeout; // 默认 5s
|
||||
|
||||
const AnalyticsConfig({
|
||||
required this.systemCode,
|
||||
required this.endpointBaseUrl,
|
||||
required this.clientType,
|
||||
this.enableDebug = false,
|
||||
this.batchSize = 20,
|
||||
this.flushInterval = 15,
|
||||
this.maxCacheSize = 5000,
|
||||
this.maxRetryCount = 3,
|
||||
this.connectTimeout = const Duration(seconds: 5),
|
||||
this.readTimeout = const Duration(seconds: 5),
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. 包结构与模块划分
|
||||
|
||||
### 3.1 目录结构(建议)
|
||||
|
||||
```text
|
||||
lib/
|
||||
company_analytics.dart // 对外 Facade(唯一入口)
|
||||
|
||||
src/
|
||||
config/
|
||||
analytics_config.dart // SDKConfig
|
||||
config_manager.dart // (Phase 2+) 维度 & 策略配置
|
||||
|
||||
model/
|
||||
event.dart // Event, StoredEvent
|
||||
user_info.dart
|
||||
device_info.dart
|
||||
system_dim_info.dart // (Phase 2+) SystemInfo, EventDefinition, TagDefinition
|
||||
|
||||
storage/
|
||||
event_storage.dart // 抽象接口
|
||||
sqflite_event_storage.dart // SQLite 实现
|
||||
|
||||
network/
|
||||
api_client.dart // 与后端 API 通信
|
||||
http_client.dart // 封装 Dio / http
|
||||
|
||||
core/
|
||||
analytics_core.dart // 主逻辑:init/track/flush
|
||||
scheduler.dart // 定时任务 & 并发控制
|
||||
validator.dart // (Phase 2+) 事件校验
|
||||
interceptors.dart // (Phase 3) 插件接口 & 管理
|
||||
|
||||
util/
|
||||
logger.dart // 日志 & debug 控制
|
||||
time_util.dart // 时间格式化
|
||||
device_util.dart // 获取 os/model/screenResolution
|
||||
id_generator.dart // 本地 eventId 生成
|
||||
```
|
||||
|
||||
### 3.2 核心模型
|
||||
|
||||
UserInfo:
|
||||
|
||||
```dart
|
||||
class UserInfo {
|
||||
final int? userId;
|
||||
final String? userName;
|
||||
final String? account;
|
||||
|
||||
const UserInfo({this.userId, this.userName, this.account});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'userId': userId,
|
||||
'userName': userName,
|
||||
'account': account,
|
||||
}..removeWhere((k, v) => v == null);
|
||||
}
|
||||
```
|
||||
|
||||
DeviceInfo:
|
||||
|
||||
```dart
|
||||
class DeviceInfo {
|
||||
final String os;
|
||||
final String model;
|
||||
final String screenResolution;
|
||||
|
||||
const DeviceInfo({
|
||||
required this.os,
|
||||
required this.model,
|
||||
required this.screenResolution,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'os': os,
|
||||
'model': model,
|
||||
'screenResolution': screenResolution,
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
Event:
|
||||
|
||||
```dart
|
||||
class Event {
|
||||
final String systemCode;
|
||||
final String eventType;
|
||||
final UserInfo? userInfo;
|
||||
final int clientType;
|
||||
final int clientTimestamp;
|
||||
final String timestamp;
|
||||
final DeviceInfo deviceInfo;
|
||||
final Map<String, dynamic>? eventParams;
|
||||
final Map<String, dynamic>? customTags;
|
||||
final DateTime createTime;
|
||||
final int retryCount;
|
||||
|
||||
Event({
|
||||
required this.systemCode,
|
||||
required this.eventType,
|
||||
required this.userInfo,
|
||||
required this.clientType,
|
||||
required this.clientTimestamp,
|
||||
required this.timestamp,
|
||||
required this.deviceInfo,
|
||||
required this.eventParams,
|
||||
required this.customTags,
|
||||
required this.createTime,
|
||||
this.retryCount = 0,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'system_code': systemCode,
|
||||
'eventType': eventType,
|
||||
'userInfo': userInfo?.toJson(),
|
||||
'clientType': clientType,
|
||||
'clientTimestamp': clientTimestamp,
|
||||
'timestamp': timestamp,
|
||||
'deviceInfo': deviceInfo.toJson(),
|
||||
'eventParams': eventParams,
|
||||
'customTags': customTags,
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
StoredEvent:
|
||||
|
||||
```dart
|
||||
class StoredEvent {
|
||||
final int id;
|
||||
final Event event;
|
||||
final int retryCount;
|
||||
final DateTime createTime;
|
||||
|
||||
StoredEvent({
|
||||
required this.id,
|
||||
required this.event,
|
||||
required this.retryCount,
|
||||
required this.createTime,
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 4. Phase 1:可用性 + 安全稳定性
|
||||
|
||||
### 4.1 功能范围
|
||||
|
||||
- SDK 初始化:
|
||||
- 校验 `AnalyticsConfig`;
|
||||
- 自动采集 `DeviceInfo`;
|
||||
- 初始化本地 SQLite 存储;
|
||||
- 启动定时 flush 任务。
|
||||
- 事件上报:
|
||||
- 构造 Event(system_code、userInfo、deviceInfo、时间戳等);
|
||||
- 异步写入本地队列(SQLite)。
|
||||
- 批量上传:
|
||||
- 定时 & 条数触发 flush;
|
||||
- 调用 `POST /AddEventListLog`;
|
||||
- 处理重试 / 失败 / 删除等逻辑。
|
||||
- 安全:
|
||||
- endpoint 强制 HTTPS;
|
||||
- 预留 header 扩展(签名等)。
|
||||
|
||||
### 4.2 本地存储设计(Sqflite)
|
||||
|
||||
表结构:
|
||||
|
||||
```sql
|
||||
CREATE TABLE events (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
payload TEXT NOT NULL,
|
||||
retry_count INTEGER NOT NULL DEFAULT 0,
|
||||
create_time INTEGER NOT NULL
|
||||
);
|
||||
|
||||
CREATE INDEX idx_events_create_time ON events(create_time);
|
||||
```
|
||||
|
||||
接口:`EventStorage`
|
||||
|
||||
```dart
|
||||
abstract class EventStorage {
|
||||
Future<void> init();
|
||||
Future<int> insert(Event event);
|
||||
Future<List<StoredEvent>> fetchBatch(int limit);
|
||||
Future<void> deleteByIds(List<int> ids);
|
||||
Future<int> count();
|
||||
Future<void> trimToMaxSize(int maxSize);
|
||||
Future<void> updateRetryCount(int id, int retryCount);
|
||||
}
|
||||
```
|
||||
|
||||
使用 `SqfliteEventStorage` 具体实现。
|
||||
|
||||
### 4.3 网络层 ApiClient
|
||||
|
||||
- 基于 `dio` 或 `http` 实现:
|
||||
- `sendBatch(List<Event> events)` 调用 `/AddEventListLog`。
|
||||
- 超时控制:使用 `config.connectTimeout` / `readTimeout`。
|
||||
|
||||
### 4.4 核心逻辑 AnalyticsCore
|
||||
|
||||
职责:
|
||||
|
||||
- 保存配置、用户状态、设备信息。
|
||||
- `track`:构造 Event、写入存储、触发 flush。
|
||||
- `flush`:从本地取批量事件,调用 ApiClient,上报异常处理和重试。
|
||||
|
||||
关键点:
|
||||
|
||||
- 使用 `_isFlushing` 标志防止并发 flush;
|
||||
- 使用 `Scheduler`(Timer.periodic)实现周期 flush;
|
||||
- 所有 IO 调用 async/await,避免阻塞 UI。
|
||||
|
||||
### 4.5 Phase 1 验收标准(Flutter)
|
||||
|
||||
- 功能:
|
||||
- Demo 中完成初始化、用户设置、事件上报、flush;
|
||||
- 断网时事件写入本地,恢复网络后自动/手动 flush 成功。
|
||||
- 稳定性:
|
||||
- 高频 `track`(10 次/秒,5 分钟)无 crash、无明显卡顿。
|
||||
- 安全:
|
||||
- 所有请求走 HTTPS;
|
||||
- 默认不打印 userInfo 等敏感数据(除非 debug=true)。
|
||||
- 文档:
|
||||
- 接入文档 + 示例代码。
|
||||
|
||||
---
|
||||
|
||||
## 5. Phase 2:配置化 + 校验 + 调试
|
||||
|
||||
### 5.1 配置下发(GetSystemAllDimInfo)
|
||||
|
||||
- Flutter SDK 调用:
|
||||
- `GET /GetSystemAllDimInfo?system_code=xxx`
|
||||
- 解析为:
|
||||
- `SystemInfo`
|
||||
- `EventDefinition` 列表(来自 `systemEventTypes`)
|
||||
- `TagDefinition` 列表(来自 `systemCustonTas`)
|
||||
|
||||
本地缓存为 `SystemDimInfo`(可存 SQLite / hive / SharedPreferences)。
|
||||
|
||||
### 5.2 ConfigManager
|
||||
|
||||
- 负责:
|
||||
- 首次 init 后拉取配置;
|
||||
- 定期刷新;
|
||||
- 提供当前配置给 Validator 使用。
|
||||
|
||||
### 5.3 Validator 事件校验
|
||||
|
||||
- 校验点:
|
||||
- `eventType` 是否在配置中存在;
|
||||
- 必填 tag(来自 `TagDefinition.isRequired`)是否存在于 `customTags`;
|
||||
- 简单类型检查(int/bool/string)。
|
||||
|
||||
策略:
|
||||
|
||||
- Debug 模式:
|
||||
- 日志详细提示未知事件、缺失字段、类型错误;
|
||||
- 可配置是否阻断发送。
|
||||
- Release 模式:
|
||||
- 不阻断,错误信息写入 `customTags._sdk_validation`。
|
||||
|
||||
### 5.4 调试能力
|
||||
|
||||
- 日志:
|
||||
- `Logger` 控制 debug 开关;
|
||||
- 打印事件 JSON、发送结果、校验结果。
|
||||
- Demo 调试界面(推荐):
|
||||
- 展示缓存事件数量 / 最近 N 条;
|
||||
- 提供“立即 flush”按钮。
|
||||
|
||||
---
|
||||
|
||||
## 6. Phase 3:可观测性 + 策略 + 插件
|
||||
|
||||
### 6.1 SDK 自监控
|
||||
|
||||
- 内部统计:
|
||||
- 发送成功次数 / 失败次数;
|
||||
- 重试次数;
|
||||
- 队列长度 / 溢出丢弃个数。
|
||||
- 周期上报为特殊事件(如 `SDK_METRICS_SEND`/`SDK_METRICS_QUEUE`)。
|
||||
|
||||
### 6.2 动态策略控制
|
||||
|
||||
- 从配置中下发策略字段,例如:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"sdkStrategy": {
|
||||
"enabled": true,
|
||||
"defaultSampleRate": 1.0,
|
||||
"eventSettings": {
|
||||
"PAGE_VIEW": { "enabled": true, "sampleRate": 0.2 },
|
||||
"DEBUG_EVENT": { "enabled": false, "sampleRate": 0.0 }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
- `track` 时根据策略:
|
||||
- 全局关停:直接丢弃全部事件;
|
||||
- 单事件关闭:丢弃该 eventType;
|
||||
- 按 sampleRate 采样丢弃部分事件。
|
||||
|
||||
### 6.3 插件(拦截器)机制
|
||||
|
||||
接口示例:
|
||||
|
||||
```dart
|
||||
abstract class AnalyticsInterceptor {
|
||||
Future<Event?> beforeSend(Event event) async => event;
|
||||
Future<void> afterSend(Event event, bool success) async {}
|
||||
}
|
||||
```
|
||||
|
||||
- 在 `AnalyticsCore` 中注册多个拦截器;
|
||||
- flush 时在实际发送前后调用;
|
||||
- 捕获拦截器内部异常,不影响主流程。
|
||||
|
||||
内置拦截器示例:
|
||||
|
||||
- `DebugInterceptor`:打印事件详细信息;
|
||||
- `CommonTagsInterceptor`:为所有事件追加 `_sdk_version`、`_platform` 等 tag。
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
## 一、准备阶段
|
||||
|
||||
### A. 项目初始化
|
||||
|
||||
- [x] 创建 Flutter package 工程(当前包名:`yx_tracking_flutter`)
|
||||
- [x] 配置 `pubspec.yaml`(已添加 `sqflite`、`path_provider`、`dio`、`path`)
|
||||
- [x] 配置 SDK 最低支持 Flutter / Dart 版本(Flutter `>=3.22.0`,Dart `>=3.3.0 <4.0.0`)
|
||||
- [x] 建立基础目录结构(入口为 `lib/yx_tracking_flutter.dart`,`lib/src/*` 已建立)
|
||||
- [x] 约定统一代码风格(使用 `flutter_lints`)
|
||||
|
||||
------
|
||||
|
||||
## 二、Phase 1 开发任务(可用性 + 稳定性)
|
||||
|
||||
### 1. 基础模型与配置
|
||||
|
||||
- [x] 实现 `AnalyticsConfig`(含 HTTPS 与参数校验)
|
||||
- [x] 实现 `UserInfo`
|
||||
- [x] 实现 `DeviceInfo`
|
||||
- [x] 实现 `Event` & `StoredEvent`(含 payload 序列化/反序列化)
|
||||
- [x] 实现 `TimeUtil`(时间戳 & ISO8601 格式化)
|
||||
- [x] 实现 `Logger`(debug/info/warn/error,debug 开关控制)
|
||||
- [x] 实现 `DeviceUtil`(采集 os/model/screenResolution 的最小实现)
|
||||
|
||||
### 2. 存储层(EventStorage + Sqflite)
|
||||
|
||||
- [x] 抽象接口 `EventStorage`(含 init/insert/fetchBatch/delete/count/trim/updateRetryCount/dispose)
|
||||
- [x] 实现 `SqfliteEventStorage`(建表、索引、CRUD、trim、retryCount 更新)
|
||||
- [x] 封装事件反序列化(`Event.fromPayload` / `Event.fromJson`)
|
||||
- [x] 稳定性修补:`fetchBatch` 会删除解析失败的坏数据,避免队列被卡死
|
||||
|
||||
### 3. 网络层(ApiClient)
|
||||
|
||||
- [x] 封装 `HttpClient`(基于 Dio,支持超时与自定义 headers)
|
||||
- [x] 实现 `ApiClient.sendBatch`(调用 `/AddEventListLog`)
|
||||
- [x] 状态码与异常模型(`ApiException` 区分可重试/不可重试)
|
||||
|
||||
### 4. 核心逻辑(AnalyticsCore + Scheduler)
|
||||
|
||||
- [x] 实现 `Scheduler`(`Timer.periodic` + start/stop)
|
||||
- [x] 实现 `AnalyticsCore.init`(校验配置、采集设备、初始化存储/网络、启动调度)
|
||||
- [x] 实现 `track` 主流程(构造事件、入库、trim、达到 batchSize 触发 flush)
|
||||
- [x] 实现 `flush`(互斥、防并发、批量发送、重试与退避)
|
||||
- [x] 稳定性增强(重试退避、异常兜底、坏数据清理)
|
||||
- [x] Phase 2 已接入(ConfigManager、Validator、配置周期刷新、release 校验标记)
|
||||
|
||||
### 5. Facade 对外接口(company_analytics.dart)
|
||||
|
||||
- [x] 暴露 `Analytics` Facade(入口文件:`lib/yx_tracking_flutter.dart`)
|
||||
- [x] 已提供 `init/track/setUser/setDeviceInfo/flush/setDebug/dispose`
|
||||
- [x] 调试 API:`cachedEventCount/cachedRecentEvents/refreshConfig/reportMetricsNow`
|
||||
- [x] `addInterceptor(...)` 已实现(Phase 3)
|
||||
|
||||
### 6. Phase 1 测试任务
|
||||
|
||||
- [x] 基础单测已存在(配置校验、事件序列化/反序列化)
|
||||
- [x] `EventStorage` 行为测试已覆盖(trim、fetchRecent、retryCount 更新等契约测试)
|
||||
- [x] `AnalyticsCore.track/flush` 成功与失败重试路径测试已覆盖
|
||||
- [x] 已完成 mock 集成测试与压力测试(断网恢复补发、track 1 万次稳定性)
|
||||
|
||||
------
|
||||
|
||||
## 三、Phase 2 开发任务(配置化 + 校验 + 调试)
|
||||
|
||||
### 1. 配置模型 & 持久化
|
||||
|
||||
- [x] 定义 `SystemInfo / EventDefinition / TagDefinition / SystemDimInfo`
|
||||
- [x] 使用 sqflite 同库缓存配置(表:`config_cache`)
|
||||
- [x] 已实现 `saveSystemDimInfo / loadSystemDimInfo`
|
||||
|
||||
### 2. ConfigManager
|
||||
|
||||
- [x] 已实现 `ConfigManager`(持有 `currentConfig`、支持缓存加载与拉取)
|
||||
- [x] 已接入 `GET /GetSystemAllDimInfo?system_code=...`
|
||||
- [x] 已在 `AnalyticsCore.init` 中异步拉取(失败不影响埋点)
|
||||
- [x] 周期刷新已补齐(定时器按 refreshInterval 拉取)
|
||||
|
||||
### 3. Validator(事件校验)
|
||||
|
||||
- [x] 已实现 `Validator`(依赖 `ConfigManager`,输出 `ValidationResult`)
|
||||
- [x] 已在 `AnalyticsCore.track` 中接入校验并打印 errors/warnings
|
||||
- [x] Release 模式已补充校验标记(写入 `_sdk_invalid_event/_sdk_missing_tags/_sdk_type_error_fields`)
|
||||
- [x] “严重 error 阻断发送”的策略开关已实现(`blockOnValidationError`)
|
||||
|
||||
### 4. 调试增强
|
||||
|
||||
- [x] `Logger` 已具备 debug/info/warn/error 级别与 debug 开关
|
||||
- [x] 关键路径日志已接入(init/track/flush/validator/config)
|
||||
- [x] 已提供 Demo 调试界面(`example/`)
|
||||
- [x] Demo 已支持:缓存条数、最近事件摘要、Track Demo Event、Flush Now、Refresh Config
|
||||
|
||||
### 5. Phase 2 测试任务
|
||||
|
||||
- [x] 配置拉取测试已覆盖(正确/错误 JSON、刷新跳过、缓存保持)
|
||||
- [x] 校验行为测试已覆盖(未知事件、缺失必填、类型不匹配)
|
||||
- [x] “配置失败不影响发送”的降级路径已覆盖(无配置仍可 track/flush)
|
||||
|
||||
------
|
||||
|
||||
## 四、Phase 3 开发任务(监控 + 策略 + 插件)
|
||||
|
||||
### 1. 自监控埋点
|
||||
|
||||
- [x] 已在 `AnalyticsCore` 中增加统计字段(sent/failed/retry/dropped、平均延迟、窗口时间)
|
||||
- [x] 已在 flush 成功 / 失败 / 删除 / 丢弃等位置更新计数
|
||||
- [x] 已实现指标上报(定时器 + 内部事件 `SDK_METRICS_SEND / SDK_METRICS_QUEUE`)
|
||||
- [x] 已提供调试入口:`Analytics.reportMetricsNow()`
|
||||
|
||||
### 2. 策略控制(采样与开关)
|
||||
|
||||
- [x] 已在 `SystemDimInfo` 中增加策略字段(`SdkStrategy / EventStrategy`)
|
||||
- [x] 已在 `ConfigManager` 中解析并缓存策略
|
||||
- [x] 已在 `AnalyticsCore.track` 入口接入策略(全局开关 / 事件开关 / 采样率)
|
||||
|
||||
### 3. 插件(拦截器)机制
|
||||
|
||||
- [x] 已定义接口 `AnalyticsInterceptor`(`beforeSend / afterSend`)
|
||||
- [x] 已在 `AnalyticsCore` 中维护拦截器列表并实现 `addInterceptor(...)`
|
||||
- [x] 已在 flush 前调用 `beforeSend`(支持返回 null 拦截事件)
|
||||
- [x] 已在 flush 后调用 `afterSend`(成功/失败均回调)
|
||||
- [x] 已做异常隔离(拦截器异常不会影响主流程)
|
||||
- [x] 已内置 `CommonTagsInterceptor`(自动追加 `_sdk_version/_platform`)
|
||||
|
||||
### 4. Phase 3 测试任务
|
||||
|
||||
- [x] 自监控事件测试已覆盖(`reportMetricsNow` 生成 `SDK_METRICS_*` 事件)
|
||||
- [x] 策略测试已覆盖(全局关闭、事件关闭、采样率)
|
||||
- [x] 拦截器测试已覆盖(追加 tag、拦截事件、异常隔离、afterSend 回调)
|
||||
|
||||
------
|
||||
|
||||
## 五、交付物与文档清单
|
||||
|
||||
- [x] SDK 源码(Flutter package)
|
||||
- [x] 单元测试代码(关键路径已覆盖;覆盖率统计报告需单独产出)
|
||||
- [x] 集成 Demo App(示例项目,含 Debug 页面)
|
||||
- [x] 文档:README(使用说明 + 调试/拦截器/指标能力)
|
||||
- [x] 文档:设计说明(`2.Flutter 埋点 SDK 设计方案(独立 Dart 实现).md`)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
## 0.0.1
|
||||
|
||||
* TODO: Describe initial release.
|
||||
|
|
@ -0,0 +1,121 @@
|
|||
# yx_tracking_flutter
|
||||
|
||||
企业级 Flutter 埋点 SDK(纯 Dart 实现),对齐后端接口:
|
||||
|
||||
- `GET /api/ExternalEventlogs/GetSystemAllDimInfo`
|
||||
- `POST /api/ExternalEventlogs/AddEventListLog`
|
||||
- `POST /api/ExternalEventlogs/AddEventLog`(可选降级)
|
||||
|
||||
当前已覆盖 Phase 1 / Phase 2 / Phase 3 的核心能力:初始化、持久化队列、批量上报、配置下发、校验、策略控制、拦截器与 SDK 自监控指标。
|
||||
|
||||
## 功能特性
|
||||
|
||||
- 统一事件模型,自动补齐公共字段(systemCode、deviceInfo、时间戳等)
|
||||
- 本地持久化队列(sqflite),断网可缓存,恢复后补发
|
||||
- 批量上报 + 重试退避 + 队列上限裁剪
|
||||
- 配置下发(`GetSystemAllDimInfo`)与本地缓存
|
||||
- 事件校验(Debug 详细日志,Release 自动标记 `_sdk_*`)
|
||||
- 动态策略(全局开关、事件级开关、采样率)
|
||||
- 拦截器机制(beforeSend / afterSend,异常隔离)
|
||||
- SDK 自监控指标(发送成功/失败/重试/丢弃、队列长度、平均延迟)
|
||||
|
||||
## 快速开始
|
||||
|
||||
在你的 App 初始化阶段调用:
|
||||
|
||||
```dart
|
||||
import 'package:yx_tracking_flutter/yx_tracking_flutter.dart';
|
||||
|
||||
Future<void> bootstrapAnalytics() async {
|
||||
await Analytics.init(
|
||||
const AnalyticsConfig(
|
||||
systemCode: 'OA_APP',
|
||||
endpointBaseUrl: 'https://your-host/api/ExternalEventlogs',
|
||||
clientType: 3,
|
||||
enableDebug: true,
|
||||
),
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
上报事件:
|
||||
|
||||
```dart
|
||||
await Analytics.track(
|
||||
'PAGE_VIEW',
|
||||
eventParams: const <String, dynamic>{'page': 'home'},
|
||||
customTags: const <String, dynamic>{'tenantId': 't1'},
|
||||
);
|
||||
```
|
||||
|
||||
手动触发发送:
|
||||
|
||||
```dart
|
||||
await Analytics.flush(force: true);
|
||||
```
|
||||
|
||||
## 关键配置项(AnalyticsConfig)
|
||||
|
||||
除了文档中的 Phase 1 配置项,还新增了以下能力配置:
|
||||
|
||||
- `enableMetrics`:是否启用 SDK 自监控指标(默认 `true`)
|
||||
- `metricsReportInterval`:指标上报周期(默认 10 分钟)
|
||||
- `blockOnValidationError`:Debug 下遇到校验 error 是否阻断发送(默认 `false`)
|
||||
|
||||
所有配置项详见:`lib/src/config/analytics_config.dart`
|
||||
|
||||
## 调试与运维能力
|
||||
|
||||
调试 API:
|
||||
|
||||
```dart
|
||||
final count = await Analytics.cachedEventCount();
|
||||
final recent = await Analytics.cachedRecentEvents(limit: 20);
|
||||
await Analytics.refreshConfig(force: true);
|
||||
await Analytics.reportMetricsNow();
|
||||
```
|
||||
|
||||
## 拦截器(Phase 3)
|
||||
|
||||
```dart
|
||||
class TenantInterceptor extends AnalyticsInterceptor {
|
||||
@override
|
||||
Future<Event?> beforeSend(Event event) async {
|
||||
final tags = Map<String, dynamic>.from(event.customTags ?? const {});
|
||||
tags['tenantId'] = 't1';
|
||||
return event.copyWith(customTags: tags);
|
||||
}
|
||||
}
|
||||
|
||||
void setupInterceptors() {
|
||||
Analytics.addInterceptor(TenantInterceptor());
|
||||
}
|
||||
```
|
||||
|
||||
SDK 内置 `CommonTagsInterceptor`,会自动追加:
|
||||
|
||||
- `_sdk_version`
|
||||
- `_platform`
|
||||
|
||||
## 运行示例 Demo
|
||||
|
||||
仓库已包含最小调试 Demo:
|
||||
|
||||
```bash
|
||||
cd example
|
||||
flutter run
|
||||
```
|
||||
|
||||
Demo 提供:缓存条数、最近事件摘要、Track Demo Event、Flush Now、Refresh Config。
|
||||
|
||||
## 测试与校验
|
||||
|
||||
已通过以下本地校验:
|
||||
|
||||
- 根目录:`flutter analyze` / `flutter test`
|
||||
- example:`flutter analyze` / `flutter test`
|
||||
|
||||
## 参考文档
|
||||
|
||||
- 设计方案:`2.Flutter 埋点 SDK 设计方案(独立 Dart 实现).md`
|
||||
- 实施清单:`3.Flutter todo list.md`
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# Miscellaneous
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.build/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
.swiftpm/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# The .vscode folder contains launch configuration and tasks you configure in
|
||||
# VS Code which you may wish to be included in version control, so this line
|
||||
# is commented out by default.
|
||||
#.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
**/ios/Flutter/.last_build_id
|
||||
.dart_tool/
|
||||
.flutter-plugins-dependencies
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
/coverage/
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
# Obfuscation related
|
||||
app.*.map.json
|
||||
|
||||
# Android Studio will place build artifacts here
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "ac4e799d237041cf905519190471f657b657155a"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
base_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
- platform: android
|
||||
create_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
base_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
- platform: ios
|
||||
create_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
base_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
- platform: linux
|
||||
create_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
base_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
- platform: macos
|
||||
create_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
base_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
- platform: web
|
||||
create_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
base_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
- platform: windows
|
||||
create_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
base_revision: ac4e799d237041cf905519190471f657b657155a
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
# example
|
||||
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at https://dart.dev/lints.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
gradle-wrapper.jar
|
||||
/.gradle
|
||||
/captures/
|
||||
/gradlew
|
||||
/gradlew.bat
|
||||
/local.properties
|
||||
GeneratedPluginRegistrant.java
|
||||
.cxx/
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/to/reference-keystore
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
plugins {
|
||||
id("com.android.application")
|
||||
id("kotlin-android")
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id("dev.flutter.flutter-gradle-plugin")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.example.example"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId = "com.example.example"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://flutter.dev/to/review-gradle-config.
|
||||
minSdk = flutter.minSdkVersion
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="example"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
package com.example.example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity : FlutterActivity()
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
||||
|
After Width: | Height: | Size: 544 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
val newBuildDir: Directory =
|
||||
rootProject.layout.buildDirectory
|
||||
.dir("../../build")
|
||||
.get()
|
||||
rootProject.layout.buildDirectory.value(newBuildDir)
|
||||
|
||||
subprojects {
|
||||
val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
|
||||
project.layout.buildDirectory.value(newSubprojectBuildDir)
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
tasks.register<Delete>("clean") {
|
||||
delete(rootProject.layout.buildDirectory)
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
pluginManagement {
|
||||
val flutterSdkPath =
|
||||
run {
|
||||
val properties = java.util.Properties()
|
||||
file("local.properties").inputStream().use { properties.load(it) }
|
||||
val flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
|
||||
flutterSdkPath
|
||||
}
|
||||
|
||||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
|
||||
id("com.android.application") version "8.9.1" apply false
|
||||
id("org.jetbrains.kotlin.android") version "2.1.0" apply false
|
||||
}
|
||||
|
||||
include(":app")
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
*.pbxuser
|
||||
*.perspectivev3
|
||||
**/*sync/
|
||||
.sconsign.dblite
|
||||
.tags*
|
||||
**/.vagrant/
|
||||
**/DerivedData/
|
||||
Icon?
|
||||
**/Pods/
|
||||
**/.symlinks/
|
||||
profile
|
||||
xcuserdata
|
||||
**/.generated/
|
||||
Flutter/App.framework
|
||||
Flutter/Flutter.framework
|
||||
Flutter/Flutter.podspec
|
||||
Flutter/Generated.xcconfig
|
||||
Flutter/ephemeral/
|
||||
Flutter/app.flx
|
||||
Flutter/app.zip
|
||||
Flutter/flutter_assets/
|
||||
Flutter/flutter_export_environment.sh
|
||||
ServiceDefinitions.json
|
||||
Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.pbxuser
|
||||
!default.perspectivev3
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>13.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "Generated.xcconfig"
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '13.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_ios_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_ios_build_settings(target)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,619 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
||||
remoteInfo = Runner;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||
);
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
331C807D294A63A400263BE5 /* Sources */,
|
||||
331C807F294A63A400263BE5 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
||||
);
|
||||
name = RunnerTests;
|
||||
productName = RunnerTests;
|
||||
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C8080294A63A400263BE5 = {
|
||||
CreatedOnToolsVersion = 14.0;
|
||||
TestTargetID = 97C146ED1CF9000F007C117D;
|
||||
};
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
331C8080294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
331C807F294A63A400263BE5 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
331C807D294A63A400263BE5 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 97C146ED1CF9000F007C117D /* Runner */;
|
||||
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
331C8088294A63A400263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
331C8089294A63A400263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
331C808A294A63A400263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = Z778GC45N8;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
331C8088294A63A400263BE5 /* Debug */,
|
||||
331C8089294A63A400263BE5 /* Release */,
|
||||
331C808A294A63A400263BE5 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||
BuildableName = "RunnerTests.xctest"
|
||||
BlueprintName = "RunnerTests"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
enableGPUValidationMode = "1"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PreviewsEnabled</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import Flutter
|
||||
import UIKit
|
||||
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 295 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 282 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 704 B |
|
After Width: | Height: | Size: 406 B |
|
After Width: | Height: | Size: 586 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 862 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 762 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 68 B |
|
After Width: | Height: | Size: 68 B |
|
After Width: | Height: | Size: 68 B |
|
|
@ -0,0 +1,5 @@
|
|||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Example</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>example</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1 @@
|
|||
#import "GeneratedPluginRegistrant.h"
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
import Flutter
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class RunnerTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// If you add code to the Runner application, consider adding tests here.
|
||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,191 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:yx_tracking_flutter/yx_tracking_flutter.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
await Analytics.init(
|
||||
const AnalyticsConfig(
|
||||
systemCode: 'DEMO_APP',
|
||||
endpointBaseUrl: 'https://example.com/api/ExternalEventlogs',
|
||||
clientType: 3,
|
||||
enableDebug: true,
|
||||
batchSize: 5,
|
||||
flushInterval: 30,
|
||||
),
|
||||
);
|
||||
|
||||
runApp(const DemoApp());
|
||||
}
|
||||
|
||||
class DemoApp extends StatelessWidget {
|
||||
const DemoApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const MaterialApp(
|
||||
home: DemoPage(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class DemoPage extends StatefulWidget {
|
||||
const DemoPage({super.key});
|
||||
|
||||
@override
|
||||
State<DemoPage> createState() => _DemoPageState();
|
||||
}
|
||||
|
||||
class _DemoPageState extends State<DemoPage> {
|
||||
int _cacheCount = 0;
|
||||
List<RecentEventSummary> _recent = const <RecentEventSummary>[];
|
||||
bool _flushing = false;
|
||||
bool _refreshingConfig = false;
|
||||
Timer? _pollTimer;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_refreshCount();
|
||||
_pollTimer = Timer.periodic(const Duration(seconds: 2), (_) {
|
||||
_refreshCount();
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_pollTimer?.cancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
Future<void> _refreshCount() async {
|
||||
final results = await Future.wait(<Future<Object>>[
|
||||
Analytics.cachedEventCount(),
|
||||
Analytics.cachedRecentEvents(limit: 20),
|
||||
]);
|
||||
final count = results[0] as int;
|
||||
final recent = results[1] as List<RecentEventSummary>;
|
||||
if (!mounted) {
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
_cacheCount = count;
|
||||
_recent = recent;
|
||||
});
|
||||
}
|
||||
|
||||
Future<void> _trackDemoEvent() async {
|
||||
await Analytics.track(
|
||||
'DEMO_BUTTON_CLICK',
|
||||
eventParams: const <String, dynamic>{'page': 'demo'},
|
||||
customTags: const <String, dynamic>{
|
||||
'tenantId': 't1',
|
||||
'feature': 'demo',
|
||||
},
|
||||
);
|
||||
await _refreshCount();
|
||||
}
|
||||
|
||||
Future<void> _flushNow() async {
|
||||
if (_flushing) {
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
_flushing = true;
|
||||
});
|
||||
try {
|
||||
await Analytics.flush(force: true);
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_flushing = false;
|
||||
});
|
||||
}
|
||||
await _refreshCount();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> _refreshConfig() async {
|
||||
if (_refreshingConfig) {
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
_refreshingConfig = true;
|
||||
});
|
||||
try {
|
||||
await Analytics.refreshConfig(force: true);
|
||||
} finally {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
_refreshingConfig = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: const Text('YX Tracking Demo')),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(
|
||||
'本地缓存事件数:$_cacheCount',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Wrap(
|
||||
spacing: 12,
|
||||
runSpacing: 12,
|
||||
children: <Widget>[
|
||||
ElevatedButton(
|
||||
onPressed: _trackDemoEvent,
|
||||
child: const Text('Track Demo Event'),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: _flushing ? null : _flushNow,
|
||||
child: Text(_flushing ? 'Flushing...' : 'Flush Now'),
|
||||
),
|
||||
OutlinedButton(
|
||||
onPressed: _refreshingConfig ? null : _refreshConfig,
|
||||
child: Text(_refreshingConfig ? 'Refreshing...' : 'Refresh Config'),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const Text(
|
||||
'说明:Demo 使用 example.com 作为占位地址,'
|
||||
'实际联调时请替换为真实 HTTPS 域名。',
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text('最近事件(最多 20 条)', style: Theme.of(context).textTheme.titleSmall),
|
||||
const SizedBox(height: 8),
|
||||
Expanded(
|
||||
child: _recent.isEmpty
|
||||
? const Text('暂无事件')
|
||||
: ListView.separated(
|
||||
itemCount: _recent.length,
|
||||
separatorBuilder: (_, __) => const Divider(height: 1),
|
||||
itemBuilder: (context, index) {
|
||||
final item = _recent[index];
|
||||
return ListTile(
|
||||
dense: true,
|
||||
title: Text(item.eventType),
|
||||
subtitle: Text(
|
||||
'${item.createTime.toIso8601String()} · retry=${item.retryCount}',
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
flutter/ephemeral
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
# Project-level configuration.
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# The name of the executable created for the application. Change this to change
|
||||
# the on-disk name of your application.
|
||||
set(BINARY_NAME "example")
|
||||
# The unique GTK application identifier for this application. See:
|
||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||
set(APPLICATION_ID "com.example.example")
|
||||
|
||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||
# versions of CMake.
|
||||
cmake_policy(SET CMP0063 NEW)
|
||||
|
||||
# Load bundled libraries from the lib/ directory relative to the binary.
|
||||
set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
|
||||
|
||||
# Root filesystem for cross-building.
|
||||
if(FLUTTER_TARGET_PLATFORM_SYSROOT)
|
||||
set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
|
||||
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
endif()
|
||||
|
||||
# Define build configuration options.
|
||||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
|
||||
set(CMAKE_BUILD_TYPE "Debug" CACHE
|
||||
STRING "Flutter build mode" FORCE)
|
||||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
|
||||
"Debug" "Profile" "Release")
|
||||
endif()
|
||||
|
||||
# Compilation settings that should be applied to most targets.
|
||||
#
|
||||
# Be cautious about adding new options here, as plugins use this function by
|
||||
# default. In most cases, you should add new options to specific targets instead
|
||||
# of modifying this function.
|
||||
function(APPLY_STANDARD_SETTINGS TARGET)
|
||||
target_compile_features(${TARGET} PUBLIC cxx_std_14)
|
||||
target_compile_options(${TARGET} PRIVATE -Wall -Werror)
|
||||
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
|
||||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
|
||||
endfunction()
|
||||
|
||||
# Flutter library and tool build rules.
|
||||
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
|
||||
add_subdirectory(${FLUTTER_MANAGED_DIR})
|
||||
|
||||
# System-level dependencies.
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||
|
||||
# Application build; see runner/CMakeLists.txt.
|
||||
add_subdirectory("runner")
|
||||
|
||||
# Run the Flutter tool portions of the build. This must not be removed.
|
||||
add_dependencies(${BINARY_NAME} flutter_assemble)
|
||||
|
||||
# Only the install-generated bundle's copy of the executable will launch
|
||||
# correctly, since the resources must in the right relative locations. To avoid
|
||||
# people trying to run the unbundled copy, put it in a subdirectory instead of
|
||||
# the default top-level location.
|
||||
set_target_properties(${BINARY_NAME}
|
||||
PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
|
||||
)
|
||||
|
||||
|
||||
# Generated plugin build rules, which manage building the plugins and adding
|
||||
# them to the application.
|
||||
include(flutter/generated_plugins.cmake)
|
||||
|
||||
|
||||
# === Installation ===
|
||||
# By default, "installing" just makes a relocatable bundle in the build
|
||||
# directory.
|
||||
set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
|
||||
endif()
|
||||
|
||||
# Start with a clean build bundle directory every time.
|
||||
install(CODE "
|
||||
file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
|
||||
" COMPONENT Runtime)
|
||||
|
||||
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
||||
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
|
||||
|
||||
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
|
||||
install(FILES "${bundled_library}"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
endforeach(bundled_library)
|
||||
|
||||
# Copy the native assets provided by the build.dart from all packages.
|
||||
set(NATIVE_ASSETS_DIR "${PROJECT_BUILD_DIR}native_assets/linux/")
|
||||
install(DIRECTORY "${NATIVE_ASSETS_DIR}"
|
||||
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
|
||||
# Fully re-copy the assets directory on each build to avoid having stale files
|
||||
# from a previous install.
|
||||
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
|
||||
install(CODE "
|
||||
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
|
||||
" COMPONENT Runtime)
|
||||
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
|
||||
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
|
||||
|
||||
# Install the AOT library on non-Debug builds only.
|
||||
if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
|
||||
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
|
||||
COMPONENT Runtime)
|
||||
endif()
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
# This file controls Flutter-level build steps. It should not be edited.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
|
||||
|
||||
# Configuration provided via flutter tool.
|
||||
include(${EPHEMERAL_DIR}/generated_config.cmake)
|
||||
|
||||
# TODO: Move the rest of this into files in ephemeral. See
|
||||
# https://github.com/flutter/flutter/issues/57146.
|
||||
|
||||
# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
|
||||
# which isn't available in 3.10.
|
||||
function(list_prepend LIST_NAME PREFIX)
|
||||
set(NEW_LIST "")
|
||||
foreach(element ${${LIST_NAME}})
|
||||
list(APPEND NEW_LIST "${PREFIX}${element}")
|
||||
endforeach(element)
|
||||
set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# === Flutter Library ===
|
||||
# System-level dependencies.
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||
pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
|
||||
pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
|
||||
|
||||
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
|
||||
|
||||
# Published to parent scope for install step.
|
||||
set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
|
||||
set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
|
||||
set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
|
||||
set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
|
||||
|
||||
list(APPEND FLUTTER_LIBRARY_HEADERS
|
||||
"fl_basic_message_channel.h"
|
||||
"fl_binary_codec.h"
|
||||
"fl_binary_messenger.h"
|
||||
"fl_dart_project.h"
|
||||
"fl_engine.h"
|
||||
"fl_json_message_codec.h"
|
||||
"fl_json_method_codec.h"
|
||||
"fl_message_codec.h"
|
||||
"fl_method_call.h"
|
||||
"fl_method_channel.h"
|
||||
"fl_method_codec.h"
|
||||
"fl_method_response.h"
|
||||
"fl_plugin_registrar.h"
|
||||
"fl_plugin_registry.h"
|
||||
"fl_standard_message_codec.h"
|
||||
"fl_standard_method_codec.h"
|
||||
"fl_string_codec.h"
|
||||
"fl_value.h"
|
||||
"fl_view.h"
|
||||
"flutter_linux.h"
|
||||
)
|
||||
list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
|
||||
add_library(flutter INTERFACE)
|
||||
target_include_directories(flutter INTERFACE
|
||||
"${EPHEMERAL_DIR}"
|
||||
)
|
||||
target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
|
||||
target_link_libraries(flutter INTERFACE
|
||||
PkgConfig::GTK
|
||||
PkgConfig::GLIB
|
||||
PkgConfig::GIO
|
||||
)
|
||||
add_dependencies(flutter flutter_assemble)
|
||||
|
||||
# === Flutter tool backend ===
|
||||
# _phony_ is a non-existent file to force this command to run every time,
|
||||
# since currently there's no way to get a full input/output list from the
|
||||
# flutter tool.
|
||||
add_custom_command(
|
||||
OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/_phony_
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
${FLUTTER_TOOL_ENVIRONMENT}
|
||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
||||
${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(flutter_assemble DEPENDS
|
||||
"${FLUTTER_LIBRARY}"
|
||||
${FLUTTER_LIBRARY_HEADERS}
|
||||
)
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
|
||||
void fl_register_plugins(FlPluginRegistry* registry) {
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
// clang-format off
|
||||
|
||||
#ifndef GENERATED_PLUGIN_REGISTRANT_
|
||||
#define GENERATED_PLUGIN_REGISTRANT_
|
||||
|
||||
#include <flutter_linux/flutter_linux.h>
|
||||
|
||||
// Registers Flutter plugins.
|
||||
void fl_register_plugins(FlPluginRegistry* registry);
|
||||
|
||||
#endif // GENERATED_PLUGIN_REGISTRANT_
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Generated file, do not edit.
|
||||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
)
|
||||
|
||||
list(APPEND FLUTTER_FFI_PLUGIN_LIST
|
||||
)
|
||||
|
||||
set(PLUGIN_BUNDLED_LIBRARIES)
|
||||
|
||||
foreach(plugin ${FLUTTER_PLUGIN_LIST})
|
||||
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
|
||||
endforeach(plugin)
|
||||
|
||||
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
|
||||
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
|
||||
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
|
||||
endforeach(ffi_plugin)
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
project(runner LANGUAGES CXX)
|
||||
|
||||
# Define the application target. To change its name, change BINARY_NAME in the
|
||||
# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
|
||||
# work.
|
||||
#
|
||||
# Any new source files that you add to the application should be added here.
|
||||
add_executable(${BINARY_NAME}
|
||||
"main.cc"
|
||||
"my_application.cc"
|
||||
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
|
||||
)
|
||||
|
||||
# Apply the standard set of build settings. This can be removed for applications
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Add preprocessor definitions for the application ID.
|
||||
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
|
||||
|
||||
# Add dependency libraries. Add any application-specific dependencies here.
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
|
||||
|
||||
target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#include "my_application.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
g_autoptr(MyApplication) app = my_application_new();
|
||||
return g_application_run(G_APPLICATION(app), argc, argv);
|
||||
}
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
#include "my_application.h"
|
||||
|
||||
#include <flutter_linux/flutter_linux.h>
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
#include <gdk/gdkx.h>
|
||||
#endif
|
||||
|
||||
#include "flutter/generated_plugin_registrant.h"
|
||||
|
||||
struct _MyApplication {
|
||||
GtkApplication parent_instance;
|
||||
char** dart_entrypoint_arguments;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
|
||||
|
||||
// Called when first Flutter frame received.
|
||||
static void first_frame_cb(MyApplication* self, FlView *view)
|
||||
{
|
||||
gtk_widget_show(gtk_widget_get_toplevel(GTK_WIDGET(view)));
|
||||
}
|
||||
|
||||
// Implements GApplication::activate.
|
||||
static void my_application_activate(GApplication* application) {
|
||||
MyApplication* self = MY_APPLICATION(application);
|
||||
GtkWindow* window =
|
||||
GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
|
||||
|
||||
// Use a header bar when running in GNOME as this is the common style used
|
||||
// by applications and is the setup most users will be using (e.g. Ubuntu
|
||||
// desktop).
|
||||
// If running on X and not using GNOME then just use a traditional title bar
|
||||
// in case the window manager does more exotic layout, e.g. tiling.
|
||||
// If running on Wayland assume the header bar will work (may need changing
|
||||
// if future cases occur).
|
||||
gboolean use_header_bar = TRUE;
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
GdkScreen* screen = gtk_window_get_screen(window);
|
||||
if (GDK_IS_X11_SCREEN(screen)) {
|
||||
const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
|
||||
if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
|
||||
use_header_bar = FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (use_header_bar) {
|
||||
GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
|
||||
gtk_widget_show(GTK_WIDGET(header_bar));
|
||||
gtk_header_bar_set_title(header_bar, "example");
|
||||
gtk_header_bar_set_show_close_button(header_bar, TRUE);
|
||||
gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
|
||||
} else {
|
||||
gtk_window_set_title(window, "example");
|
||||
}
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
|
||||
g_autoptr(FlDartProject) project = fl_dart_project_new();
|
||||
fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
|
||||
|
||||
FlView* view = fl_view_new(project);
|
||||
GdkRGBA background_color;
|
||||
// Background defaults to black, override it here if necessary, e.g. #00000000 for transparent.
|
||||
gdk_rgba_parse(&background_color, "#000000");
|
||||
fl_view_set_background_color(view, &background_color);
|
||||
gtk_widget_show(GTK_WIDGET(view));
|
||||
gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
|
||||
|
||||
// Show the window when Flutter renders.
|
||||
// Requires the view to be realized so we can start rendering.
|
||||
g_signal_connect_swapped(view, "first-frame", G_CALLBACK(first_frame_cb), self);
|
||||
gtk_widget_realize(GTK_WIDGET(view));
|
||||
|
||||
fl_register_plugins(FL_PLUGIN_REGISTRY(view));
|
||||
|
||||
gtk_widget_grab_focus(GTK_WIDGET(view));
|
||||
}
|
||||
|
||||
// Implements GApplication::local_command_line.
|
||||
static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
|
||||
MyApplication* self = MY_APPLICATION(application);
|
||||
// Strip out the first argument as it is the binary name.
|
||||
self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
|
||||
|
||||
g_autoptr(GError) error = nullptr;
|
||||
if (!g_application_register(application, nullptr, &error)) {
|
||||
g_warning("Failed to register: %s", error->message);
|
||||
*exit_status = 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
g_application_activate(application);
|
||||
*exit_status = 0;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Implements GApplication::startup.
|
||||
static void my_application_startup(GApplication* application) {
|
||||
//MyApplication* self = MY_APPLICATION(object);
|
||||
|
||||
// Perform any actions required at application startup.
|
||||
|
||||
G_APPLICATION_CLASS(my_application_parent_class)->startup(application);
|
||||
}
|
||||
|
||||
// Implements GApplication::shutdown.
|
||||
static void my_application_shutdown(GApplication* application) {
|
||||
//MyApplication* self = MY_APPLICATION(object);
|
||||
|
||||
// Perform any actions required at application shutdown.
|
||||
|
||||
G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application);
|
||||
}
|
||||
|
||||
// Implements GObject::dispose.
|
||||
static void my_application_dispose(GObject* object) {
|
||||
MyApplication* self = MY_APPLICATION(object);
|
||||
g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
|
||||
G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
|
||||
}
|
||||
|
||||
static void my_application_class_init(MyApplicationClass* klass) {
|
||||
G_APPLICATION_CLASS(klass)->activate = my_application_activate;
|
||||
G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
|
||||
G_APPLICATION_CLASS(klass)->startup = my_application_startup;
|
||||
G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown;
|
||||
G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
|
||||
}
|
||||
|
||||
static void my_application_init(MyApplication* self) {}
|
||||
|
||||
MyApplication* my_application_new() {
|
||||
// Set the program name to the application ID, which helps various systems
|
||||
// like GTK and desktop environments map this running application to its
|
||||
// corresponding .desktop file. This ensures better integration by allowing
|
||||
// the application to be recognized beyond its binary name.
|
||||
g_set_prgname(APPLICATION_ID);
|
||||
|
||||
return MY_APPLICATION(g_object_new(my_application_get_type(),
|
||||
"application-id", APPLICATION_ID,
|
||||
"flags", G_APPLICATION_NON_UNIQUE,
|
||||
nullptr));
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef FLUTTER_MY_APPLICATION_H_
|
||||
#define FLUTTER_MY_APPLICATION_H_
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
|
||||
GtkApplication)
|
||||
|
||||
/**
|
||||
* my_application_new:
|
||||
*
|
||||
* Creates a new Flutter-based application.
|
||||
*
|
||||
* Returns: a new #MyApplication.
|
||||
*/
|
||||
MyApplication* my_application_new();
|
||||
|
||||
#endif // FLUTTER_MY_APPLICATION_H_
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
# Flutter-related
|
||||
**/Flutter/ephemeral/
|
||||
**/Pods/
|
||||
|
||||
# Xcode-related
|
||||
**/dgph
|
||||
**/xcuserdata/
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
|
||||
#include "ephemeral/Flutter-Generated.xcconfig"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// Generated file. Do not edit.
|
||||
//
|
||||
|
||||
import FlutterMacOS
|
||||
import Foundation
|
||||
|
||||
import path_provider_foundation
|
||||
import sqflite_darwin
|
||||
|
||||
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
|
||||
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
|
||||
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
platform :osx, '10.15'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
|
||||
project 'Runner', {
|
||||
'Debug' => :debug,
|
||||
'Profile' => :release,
|
||||
'Release' => :release,
|
||||
}
|
||||
|
||||
def flutter_root
|
||||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
|
||||
unless File.exist?(generated_xcode_build_settings_path)
|
||||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
|
||||
end
|
||||
|
||||
File.foreach(generated_xcode_build_settings_path) do |line|
|
||||
matches = line.match(/FLUTTER_ROOT\=(.*)/)
|
||||
return matches[1].strip if matches
|
||||
end
|
||||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
|
||||
end
|
||||
|
||||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
|
||||
|
||||
flutter_macos_podfile_setup
|
||||
|
||||
target 'Runner' do
|
||||
use_frameworks!
|
||||
|
||||
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_macos_build_settings(target)
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,705 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXAggregateTarget section */
|
||||
33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
|
||||
isa = PBXAggregateTarget;
|
||||
buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
|
||||
buildPhases = (
|
||||
33CC111E2044C6BF0003C045 /* ShellScript */,
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "Flutter Assemble";
|
||||
productName = FLX;
|
||||
};
|
||||
/* End PBXAggregateTarget section */
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; };
|
||||
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
|
||||
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
|
||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 33CC10EC2044A3C60003C045;
|
||||
remoteInfo = Runner;
|
||||
};
|
||||
33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 33CC111A2044C6BA0003C045;
|
||||
remoteInfo = FLX;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
33CC110E2044A8840003C045 /* Bundle Framework */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Bundle Framework";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||
33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; };
|
||||
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; };
|
||||
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
|
||||
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
|
||||
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
|
||||
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
331C80D2294CF70F00263BE5 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
33CC10EA2044A3C60003C045 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
331C80D6294CF71000263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
331C80D7294CF71000263BE5 /* RunnerTests.swift */,
|
||||
);
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33BA886A226E78AF003329D5 /* Configs */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33E5194F232828860026EE4D /* AppInfo.xcconfig */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
|
||||
);
|
||||
path = Configs;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33CC10E42044A3C60003C045 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33FAB671232836740065AC1E /* Runner */,
|
||||
33CEB47122A05771004F2AC0 /* Flutter */,
|
||||
331C80D6294CF71000263BE5 /* RunnerTests */,
|
||||
33CC10EE2044A3C60003C045 /* Products */,
|
||||
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33CC10ED2044A3C60003C045 /* example.app */,
|
||||
331C80D5294CF71000263BE5 /* RunnerTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33CC11242044D66E0003C045 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33CC10F22044A3C60003C045 /* Assets.xcassets */,
|
||||
33CC10F42044A3C60003C045 /* MainMenu.xib */,
|
||||
33CC10F72044A3C60003C045 /* Info.plist */,
|
||||
);
|
||||
name = Resources;
|
||||
path = ..;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33CEB47122A05771004F2AC0 /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
|
||||
33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
|
||||
33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
|
||||
33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
|
||||
);
|
||||
path = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
33FAB671232836740065AC1E /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */,
|
||||
33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
|
||||
33E51913231747F40026EE4D /* DebugProfile.entitlements */,
|
||||
33E51914231749380026EE4D /* Release.entitlements */,
|
||||
33CC11242044D66E0003C045 /* Resources */,
|
||||
33BA886A226E78AF003329D5 /* Configs */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
331C80D4294CF70F00263BE5 /* RunnerTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
331C80D1294CF70F00263BE5 /* Sources */,
|
||||
331C80D2294CF70F00263BE5 /* Frameworks */,
|
||||
331C80D3294CF70F00263BE5 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
331C80DA294CF71000263BE5 /* PBXTargetDependency */,
|
||||
);
|
||||
name = RunnerTests;
|
||||
productName = RunnerTests;
|
||||
productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
33CC10EC2044A3C60003C045 /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
33CC10E92044A3C60003C045 /* Sources */,
|
||||
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||
33CC10EB2044A3C60003C045 /* Resources */,
|
||||
33CC110E2044A8840003C045 /* Bundle Framework */,
|
||||
3399D490228B24CF009A79C7 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
33CC11202044C79F0003C045 /* PBXTargetDependency */,
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* example.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
33CC10E52044A3C60003C045 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastSwiftUpdateCheck = 0920;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C80D4294CF70F00263BE5 = {
|
||||
CreatedOnToolsVersion = 14.0;
|
||||
TestTargetID = 33CC10EC2044A3C60003C045;
|
||||
};
|
||||
33CC10EC2044A3C60003C045 = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
LastSwiftMigration = 1100;
|
||||
ProvisioningStyle = Automatic;
|
||||
SystemCapabilities = {
|
||||
com.apple.Sandbox = {
|
||||
enabled = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
33CC111A2044C6BA0003C045 = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
ProvisioningStyle = Manual;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 33CC10E42044A3C60003C045;
|
||||
productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
33CC10EC2044A3C60003C045 /* Runner */,
|
||||
331C80D4294CF70F00263BE5 /* RunnerTests */,
|
||||
33CC111A2044C6BA0003C045 /* Flutter Assemble */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
331C80D3294CF70F00263BE5 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
33CC10EB2044A3C60003C045 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
|
||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3399D490228B24CF009A79C7 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
|
||||
};
|
||||
33CC111E2044C6BF0003C045 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
Flutter/ephemeral/FlutterInputs.xcfilelist,
|
||||
);
|
||||
inputPaths = (
|
||||
Flutter/ephemeral/tripwire,
|
||||
);
|
||||
outputFileListPaths = (
|
||||
Flutter/ephemeral/FlutterOutputs.xcfilelist,
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
331C80D1294CF70F00263BE5 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
33CC10E92044A3C60003C045 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
|
||||
33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
|
||||
335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
331C80DA294CF71000263BE5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 33CC10EC2044A3C60003C045 /* Runner */;
|
||||
targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
|
||||
targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
33CC10F52044A3C60003C045 /* Base */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
331C80DB294CF71000263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
331C80DC294CF71000263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
331C80DD294CF71000263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/example";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
338D0CE9231458BD00FA5F75 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
338D0CEA231458BD00FA5F75 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
338D0CEB231458BD00FA5F75 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
33CC10F92044A3C60003C045 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
33CC10FA2044A3C60003C045 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.15;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = macosx;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
33CC10FC2044A3C60003C045 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
33CC10FD2044A3C60003C045 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
33CC111C2044C6BA0003C045 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
33CC111D2044C6BA0003C045 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
331C80DB294CF71000263BE5 /* Debug */,
|
||||
331C80DC294CF71000263BE5 /* Release */,
|
||||
331C80DD294CF71000263BE5 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
33CC10F92044A3C60003C045 /* Debug */,
|
||||
33CC10FA2044A3C60003C045 /* Release */,
|
||||
338D0CE9231458BD00FA5F75 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
33CC10FC2044A3C60003C045 /* Debug */,
|
||||
33CC10FD2044A3C60003C045 /* Release */,
|
||||
338D0CEA231458BD00FA5F75 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
33CC111C2044C6BA0003C045 /* Debug */,
|
||||
33CC111D2044C6BA0003C045 /* Release */,
|
||||
338D0CEB231458BD00FA5F75 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 33CC10E52044A3C60003C045 /* Project object */;
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "331C80D4294CF70F00263BE5"
|
||||
BuildableName = "RunnerTests.xctest"
|
||||
BlueprintName = "RunnerTests"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
enableGPUValidationMode = "1"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "example.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import Cocoa
|
||||
import FlutterMacOS
|
||||
|
||||
@main
|
||||
class AppDelegate: FlutterAppDelegate {
|
||||
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_16.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_32.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_32.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_64.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_128.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_256.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_256.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_512.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_512.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_1024.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 14 KiB |