Compare commits

..

197 Commits

Author SHA1 Message Date
“虞渠成”
2d8f88b980 docs: CHANGELOG记录1.0.8自带资源包版本1.1.8 2026-10-16 10:21:32 +08:00
“虞渠成”
f1acb0c56a docs: 调整CHANGELOG结构,资源包1.1.9归入应用版本1.0.8下记录 2026-10-16 10:20:26 +08:00
“虞渠成”
b321bc76a2 docs: 更新CHANGELOG,记录1.1.9资源包修复并移除1.0.7整理 2026-10-16 10:18:43 +08:00
“虞渠成”
a8f6e617b7 docs: 新增CHANGELOG更新日志文档 2026-10-16 10:16:46 +08:00
“虞渠成”
178602c87b fix: 临时修复竖屏教学视频全屏压扁问题(portraitFullImage非均匀缩放) 2026-10-16 09:53:57 +08:00
“虞渠成”
cd4d4898f7 build: 更新Android版本号并调整so库配置
更新Android包版本号从4到5,同时将arm64-v8a的libc++_shared.so设置为16KB对齐,确保兼容性
2026-10-13 15:35:55 +08:00
“虞渠成”
7eeaecd48f chore: 清理 SyntaxCheck 项目的 obj 目录文件和初始程序文件 2026-10-09 16:10:55 +08:00
“虞渠成”
99e461590d fix: 修复国内设备启动闪退问题,禁用 Firebase 自动初始化
修改 FirebaseAuthManager 改为懒加载,仅在用户触发登录时初始化 Firebase
移除 AndroidManifest 中 Firebase 相关自动初始化的 provider
关闭 MainScene 的服务器后门开关,提升安全性
2026-09-24 10:16:09 +08:00
“虞渠成”
c62ae623e8 feat: 新增国家选择跳过功能,首页可跳过国家选择
新增数据管理器中关联用户账号的跳过标记存储方法,修改首页逻辑,当用户未设置国家且未跳过时弹出国家选择界面,新增选择国家界面的跳过按钮,跳过后本地保存标记不再弹出。
2026-09-23 10:51:38 +08:00
“虞渠成”
1c699434c6 chore: 更新个人页面英文资源图片 2026-09-23 09:59:15 +08:00
“虞渠成”
44228f153d style(ui排行榜页面): 调整文本控件布局与行间距
统一修改多个排行榜文本控件的锚点位置和尺寸偏移,将行间距调整为1.5
2026-09-22 14:36:22 +08:00
“虞渠成”
98e766d5ba 修复安全设置菜单文本错误 2026-09-22 14:07:09 +08:00
“虞渠成”
2113003c81 style(connectDevicePage): 连接提示行间距调整 2026-09-22 13:52:02 +08:00
“虞渠成”
61cbbf80a6 fix: 修复蓝牙扫描、自动锁屏和绑定失败的问题
1. 蓝牙扫描时改用ForceInitialize保证系统蓝牙关闭时能提示开启
2. 移除重复的ForceInitialize调用并避免重复初始化导致iOS扫描失效
3. 进入应用时设置不休眠并修正解锁计时起点为当前时间
4. 绑定失败时清空目标MAC防止无限重试循环
5. 调整个人信息页预制体的控件顺序
2026-09-22 11:25:21 +08:00
“虞渠成”
52e20d10c0 style(ui/rankPage): 排行榜灭蚊数量字体小,避免换行 2026-09-22 09:36:12 +08:00
“虞渠成”
ad92df903f fix: 恢复出厂设置时增加密码校验逻辑
1.  修复恢复出厂设置未校验密码的问题,未设置密码时直接弹出密码校验页
2.  修复密码校验页返回逻辑,正确恢复上一级返回动作
3.  调整设备信息页面UI布局并添加密码校验页面预制体
2026-09-22 09:09:24 +08:00
“虞渠成”
1500451aa8 feat: 添加账号注销功能,优化登录注册流程
1.  新增账号注销全流程功能,包括注销页面、验证码校验和注销接口调用
2.  优化邮箱注册校验逻辑,区分已设置密码和未设置密码的账号
3.  重构个人页面登出逻辑,统一登出处理流程
4.  更新多语言文案,补充注销相关提示文本
5.  调整个人信息页面布局,添加注销账号入口
2026-09-21 15:55:13 +08:00
“虞渠成”
ed0ba72402 style(ui/videoPage): 调整视频页面预制体的锚定位置和尺寸偏移
微调了videoPage预制体的UI布局参数,适配新的界面显示需求
2026-09-21 08:32:37 +08:00
“虞渠成”
e9535bf5f4 fix(ui/videopage): 调整视频页面的UI细节
1. 调整了图片精灵的边框参数
2. 多处文本字体大小从24改为28
3. 禁用了两个冗余的组件
4. 新增了类型选择控件并调整其尺寸
2026-09-20 16:52:17 +08:00
“虞渠成”
5afa36a724 style(selfpage): 调整两个prefab的布局底部边距
将中文和英文的个人页面UI预制体的底部内边距都设为50,统一页面布局间距
2026-09-20 16:40:52 +08:00
“虞渠成”
a4aa4ae111 docs: 修正多语言文案并更新登录页图片
修正了英文多语言文本的表述一致性,同时更新了登录页的两张中文提示图片
2026-09-20 16:12:31 +08:00
“虞渠成”
10ad83d6b0 refactor: 优化密码校验与第三方登录逻辑,新增未设密码引导流程
1. 移除MainScene和UIManager中的首次启动标记逻辑
2. 新增DataManager的HasAnyPassword方法检测用户是否设置过密码
3. 完善HomePage的CheckPasswordPage,新增未设密码引导弹窗
4. 调整SelfVerificationCodePanel支持自定义返回回调
5. 适配苹果第三方登录无需强制设置密码的审核要求
6. 新增多语言词条支持密码引导文案
7. 移除HomePageCtrl在应用暂停时自动锁定按钮的逻辑
2026-09-20 14:04:59 +08:00
“虞渠成”
5791de31f1 fix: 修复UI更新集合修改异常与WiFi环境校验问题,调整登录页布局
1. 修复pendingUIUpdates遍历时的集合修改异常,通过快照方式处理
2. 增加WiFi环境校验,仅WiFi在线时拉取云端配置
3. 批量调整登录页预制体的UI布局参数
2026-09-20 11:07:56 +08:00
“虞渠成”
f7e7c9fcbd fix(selfpage): 更新两个教学视频的地址
分别将中文和英文版本的教学视频资源替换为对应路径的9.mp4文件
2026-09-18 15:31:34 +08:00
“虞渠成”
6e9eeb0026 chore(language): 更新设备教学的多语言文案
将key为100262的多语言文本从"设备教学"修改为"产品操作指南",同步更新中英文文案
2026-09-18 15:00:40 +08:00
“虞渠成”
8a4e2602ff refactor(UI): 修复弹窗返回栈逻辑并优化代码
1. 将TimeSelection的OnCancelClick改为public方法方便外部调用
2. 统一各弹窗的返回注册逻辑,修复返回栈未重置的问题
3. 修正代码缩进和空行格式问题
2026-09-17 16:52:44 +08:00
“虞渠成”
0a0a935c01 style(ui/selfpage): 更新成就页面的中英文图标资源
替换了成就页面的aq_ch和aq_en两张图片资源
2026-09-17 16:18:25 +08:00
“虞渠成”
eea5878552 fix(VideoCtrl): 重构全屏视频适配逻辑,修复适配bug
补充详细的全屏视频适配踩坑注释,重构适配算法,实现按屏幕比例最大化显示视频且不变形,修复了原代码中UI旋转、锚点和uvRect计算错误的问题
2026-09-17 14:59:20 +08:00
“虞渠成”
36e8055c26 feat: 添加自动锁定功能与配置页面
1.  新增自动锁定相关数据存储与逻辑,支持配置锁定间隔
2.  添加个人页安全设置入口与自动锁定设置页面
3.  重构主页自动锁定检测逻辑,替换原有临时计时变量
4.  更新多语言文案与项目版本号
2026-09-17 08:41:18 +08:00
“虞渠成”
1710194d2f fix(ble&homepage): 修复蓝牙参数变化通知与主页状态同步问题
1. 调整BLE参数变化通知的数据长度校验,支持无载荷的通知场景
2. 当参数变化通知无载荷时,主动触发对应配置项的查询
3. 新增蓝牙状态补拉排队机制,解决串行查询期间请求被吞的问题
4. 优化主页配置轮询逻辑,使用独立快照避免BLE回写污染导致的循环查询
5. 新增定时任务变化检测与精准拉取逻辑
2026-09-11 13:42:23 +08:00
“虞渠成”
5478355435 fix: 关闭所有输入框的移动端原生键盘遮挡
将多个UI页面的输入框组件的m_HideMobileInput参数从0改为1,避免移动端系统键盘遮挡输入框,同时移除了扫码相关的多余配置项优化页面参数
2026-09-11 09:44:06 +08:00
“虞渠成”
52cf570f6c refactor(HomePage): 优化在线状态轮询逻辑并新增配置比对刷新
1. 新增应用前后台状态监听,仅前台执行轮询
2. 调整轮询间隔为3秒,增加轮询空值校验
3. 新增设备配置变更检测,自动刷新主页UI
2026-09-09 14:08:36 +08:00
yuqucheng
ff3ae505df Merge branch 'feature/ble-config-notification' of https://dev.nextreal.cn/yuqucheng/killapp into feature/ble-config-notification 2026-09-08 16:03:15 +08:00
yuqucheng
8807c404f3 chore: 更新 iOS FFmpegKit xcframework 依赖库
调整 maccatalyst 分支的框架目录结构,更新各架构二进制与 Info.plist 配置
2026-09-08 16:02:07 +08:00
“虞渠成”
4770b82766 Merge branch 'feature/ble-config-notification' of https://dev.nextreal.cn/yuqucheng/killapp into feature/ble-config-notification 2026-09-08 15:09:21 +08:00
“虞渠成”
6e385e2bab refactor(iOS/视频页): 清理无用调试日志并修复类型转换问题
1. 移除VideoPageCtrl中多余的Debug.Log调试输出
2. 为iOS平台的FFmpegKit信号忽略调用添加正确的枚举强转
2026-09-08 15:08:24 +08:00
yuqucheng
66c6da296e 添加ffmpeg依赖库 2026-09-08 15:07:41 +08:00
“虞渠成”
56e52cac81 chore: 添加入iOS平台的FFmpegKit依赖库 2026-09-08 14:37:59 +08:00
“虞渠成”
52a3e9f06c feat(video,ios): 接入 iOS 端 ffmpeg-kit 转码桥
- 新增 Assets/Plugins/iOS/FFmpegKitIOS.mm: ObjC++ extern C 桥,调 ffmpeg-kit executeWithArguments 做 libx264 重编码

- FFmpegKitBridge.cs 新增 UNITY_IOS 分支,经 DllImport(__Internal) 后台线程调用,参数与 Android 一致

- 新增 Assets/Plugins/iOS/FFmpegKit/README: 说明需放入的 ffmpegkit.xcframework 及构建来源

- 注: xcframework 需 macOS 自编译(arthenica ffmpeg-kit ios.sh --full --enable-gpl -x),放好前 .mm 链接头文件编译期报错属预期
2026-09-08 14:10:41 +08:00
“虞渠成”
4726107e19 feat(video,android): 视频下载转码播放 + 列表下载/播放按钮
- 集成 ffmpeg-kit-full-gpl 6.0.3(arm64),用 libx264 重编码修复 .h264 缺 SPS/PPS 导致的播放卡死

- 新增 VideoDownloadPlayService/VideoCacheManager,.mp4 直下直播、.h264 下载后转 mp4 缓存,转码完成后删除临时 .h264

- FFmpegKitBridge 走主线程 JNI 调用规避 IL2CPP 后台线程 FindClass 不稳定

- 视频列表按缓存状态显示 下载/播放 按钮,下载中亮色条显示百分比;播放面板原下载按钮改为保存到相册
2026-09-08 13:31:31 +08:00
“虞渠成”
8074ba71c0 更新readme 2026-09-07 09:17:25 +08:00
“虞渠成”
ae7a68aad1 docs: 重写README补充架构说明与开发备忘
- 项目概况/技术栈/启动流程/目录结构/核心模块(蓝牙/网络/数据/UI/热更)/构建发布备忘
2026-09-07 09:13:21 +08:00
“虞渠成”
20bec0f7e3 chore: 移除无引用的FireBaseCtrl并加固LoadRes的Editor宏保护
- FireBaseCtrl为旧版Firebase Auth实现,类名/GUID/内部类型均无引用,安全清理
- LoadRes顶部using UnityEditor包入#if UNITY_EDITOR,消除真机编译隐患
- 关闭测试服务器切换后门(enableServerBackdoor=0)
2026-09-07 09:12:23 +08:00
“虞渠成”
99ffc19f60 fix(bluetooth,ui): 修复蓝牙关闭后的断开链路与响应数据空引用
- 关蓝牙时跳过0x70协议告别帧与扫描(BluetoothLeScanner为null会抛NPE中断主页Init)
- 初始化前检查蓝牙开关静默跳过,错误回调不再误报初始化失败,断开清理不在蓝牙关闭时自动重扫
- 错误/超时响应统一携带空Data,修复超时回调BitConverter.ToString(null)崩溃
- 主页Init增加异常兜底:保证Loading收尾并记录完整异常
2026-09-07 09:12:14 +08:00
“虞渠成”
320ece473f feat(bluetooth,ui): 添加毫米波雷达状态支持并优化设备状态处理
1. 新增MillimeterWaveSetting设备状态字段与更新方法
2. 修复HomePageCtrl中设备配置空引用风险
3. 重构BLE通讯状态更新逻辑,统一MAC地址获取
4. 补充各类BLE通知的数据长度校验
5. 新增设备锁状态参数变更通知处理
6. 优化日志描述与协程管理逻辑
2026-09-04 10:59:43 +08:00
“虞渠成”
8e879b009a 暂时提交 2026-09-03 13:33:58 +08:00
“虞渠成”
2dd4013f6f chore: 清理无用的BLE文档并调整主页UI布局
1. 删除了Assets/Scripts/Bluetooth目录下的BLE通信接口文档文件
2. 批量修改homePage.prefab中多个UI元素的锚点、位置和尺寸参数
3. 禁用了一个多余的游戏对象
2026-09-03 11:26:33 +08:00
“虞渠成”
3c9d6aea22 chore(Firebase): 移除无用的FCM相关监听和回调方法
移除了Firebase云消息推送的令牌接收和消息接收的事件监听,以及对应的回调函数,清理冗余代码
2026-09-02 17:02:57 +08:00
“虞渠成”
457fee5651 fix(iOS打包): 添加非豁免加密配置项避免手动处理加密问卷
在iOS打包后处理脚本中添加ITSAppUsesNonExemptEncryption配置,设为false表示未使用非豁免加密,无需每次提交时手动回答苹果加密相关问卷
2026-09-02 10:13:03 +08:00
“虞渠成”
0a5b4d04cb style(个人信息页): 修改文本对齐方式为居中对齐
调整了个人信息页面预制体中文本组件的对齐参数,优化页面显示效果
2026-09-02 09:42:45 +08:00
“虞渠成”
9767c09454 style(个人信息页): 调整两个文本控件的尺寸和字体参数
修改了两个文本控件的大小Delta,调整了字体适配范围,修正了对齐方式
2026-09-02 09:41:44 +08:00
“虞渠成”
c8d79cd7e0 style: 调整排行榜和首页UI的布局与文本样式
统一修改多个UI控件的锚点、尺寸、间距,更新文本适配参数与默认文本,修复部分控件显示异常问题
2026-09-02 09:18:24 +08:00
“虞渠成”
d3140b9d71 build: 升级版本号至1.0.7并调整输入框字符限制
1.  将项目版本号从1.0.6更新为1.0.7
2.  调整通用输入框最大字符数为16,同步更新个人页面用户名输入框的字符限制
2026-09-02 08:40:15 +08:00
“虞渠成”
736fb1af04 fix(scanqr,homepagecharts): 修复并优化多处代码逻辑
1. 移除iOS端多余的对焦维护协程,简化相机对焦逻辑
2. 为首页图表初始化添加异常捕获,避免崩溃
3. 修复图表数据越界访问问题,修正switch分支缩进错误
2026-09-01 16:51:58 +08:00
“虞渠成”
432b80dfa3 fix: 修复多处UI返回逻辑、优化扫码对焦与UI布局
1.  优化HomePage加载逻辑,修复加载弹窗重复显示问题
2.  重构蓝牙分享页、重命名页的返回事件绑定逻辑
3.  优化iOS/Android扫码对焦功能,支持多后置摄像头、软触发对焦
4.  调整扫码预览布局与参数,提升扫码识别率与适配性
5.  删除冗余的Android状态栏管理脚本与无用文件
6.  新增返回回调调试日志
2026-09-01 15:47:57 +08:00
“虞渠成”
e84d72dbf7 refactor(homepage): 新增主页下拉刷新功能,优化密码校验逻辑
1.  新增HomePagePullRefreshTrigger组件实现全局下拉刷新
2.  调整Android最低SDK版本到31
3.  新增密码校验失败的多语言文案
4.  重构密码校验逻辑,添加异常捕获和统一的错误提示
5.  优化首页离线时的页面重置逻辑
2026-09-01 09:25:48 +08:00
“虞渠成”
8c40683026 build(android): 更新安卓应用版本号为4
将AndroidBundleVersionCode从1调整为4,适配安卓版本发布要求
2026-08-31 13:49:30 +08:00
“虞渠成”
f5c88e0e21 build: 更新项目版本号和安卓构建编号
将bundleVersion从1.0.5更新为1.0.6,同时将AndroidBundleVersionCode从3调整为1
2026-08-31 13:36:21 +08:00
“虞渠成”
f135908d27 feat: 添加测试服务器水印功能并优化服务器环境切换逻辑
1. 新增测试水印控件,根据服务器环境自动显隐
2. 限制无后门权限时无法切换测试服务器
3. 后门关闭时强制使用正式服务器并重置本地环境配置
4. 更新多语言文案,简化补光灯英文翻译
5. 调整主页UI布局适配新控件
2026-08-31 13:32:37 +08:00
“虞渠成”
a3de9f93a1 fix(homepage): 修复页面UI布局与文本显示问题
1. 修复无设备时loading不消失的问题
2. 修复首页部分UI显示不全的问题
2026-08-31 13:07:55 +08:00
“虞渠成”
b43121d2ec refactor(FirmwareUpdatePage): 重构固件升级流程逻辑
1. 拆分同步和异步点击处理方法,优化防连点逻辑
2. 简化等待设备重启的流程,不再轮询设备版本
3. 调整升级状态的清理和恢复时机
2026-08-27 14:18:31 +08:00
“虞渠成”
a95b257b0d feat: 新增OTA升级相关功能与设备列表缓存优化
1.  新增设备信息页OTA升级进度UI与本地持久化传输状态
2.  实现WiFi模式OTA非全屏进度订阅与重启等待逻辑
3.  新增设备列表本地缓存与加载、清空功能
4.  优化蓝牙管理:移除自动弹窗,改为提示用户手动开启蓝牙
5.  新增网络状态监听与设备在线状态刷新逻辑
6.  新增多语言文案与蓝牙未开启提示资源
7.  优化网络请求处理,新增静默错误提示参数
2026-08-27 13:11:55 +08:00
“虞渠成”
77b29b4f15 fix:去除UI显示的默认值 2026-08-26 13:31:30 +08:00
“虞渠成”
e4556286ff fix(ui/homepage/设备说明): 调整布局底部边距,移除冗余的Start初始化调用
1.  调整了首页设备说明预制体的m_Bottom布局边距从0改为30,修复布局偏移问题
2.  移除了DeviceTeachingPage中冗余的自动调用Init的Start方法
2026-08-26 09:43:16 +08:00
“虞渠成”
8568724c3f feat: 新增WiFi OTA升级功能与相关优化
1. 新增多语言文案用于OTA升级提示
2. 优化更新进度显示为整数百分比
3. 调整设备轮询间隔为5秒
4. 新增SSE流式请求处理与OTA数据模型
5. 实现WiFi环境下基于SSE的OTA升级流程
6. 增加蓝牙环境下OTA升级的前置校验与提示
2026-08-25 14:12:45 +08:00
“虞渠成”
ca042827d6 Merge branch 'master' of https://dev.nextreal.cn/yuqucheng/killapp 2026-08-24 15:06:39 +08:00
“虞渠成”
ba5753a2ef fix(home page): 修复加载弹窗显示时机不正确的问题
调整了加载弹窗的显示和隐藏位置,在初始化开始时显示加载弹窗,初始化完成后隐藏弹窗,优化页面加载体验
2026-08-24 15:06:34 +08:00
yuqucheng
a1f3221ae0 fix:去掉测试用启动logo 2026-08-24 13:31:58 +08:00
“虞渠成”
dccd851058 fix(固件更新):
1.优先走蓝牙OTA
2.OTA完成后等待15s再返回首页
3.调整固件更新UI显示
2026-08-24 11:09:22 +08:00
“虞渠成”
bfb56b8423 chore: 新增通用高斯模糊材质资源
添加了UI通用的高斯模糊材质文件及其.meta配置,用于后续UI特效渲染使用
2026-08-21 15:59:40 +08:00
“虞渠成”
ebe8e38ddd style(个人页面): 添加视频预览模糊 2026-08-21 15:34:49 +08:00
“虞渠成”
c3d92fe037 refactor: 优化蓝牙切换逻辑与UI布局修复
1. 新增isSwitchingDevice标记,避免切换设备时误跳转主页
2. 修复蓝牙扫描自动连接逻辑,防止切换设备时流程卡住
3. 增加空值判断避免页面销毁后回调崩溃
4. 批量调整UI预制体的布局参数与材质引用
5. 修复个人页面文本本地化与对齐问题
2026-08-21 15:11:22 +08:00
“虞渠成”
41cfdc380e fix(deviceinfopage): 修复设备信息页面布局与文本问题
调整了页面内布局参数,包括内边距、控件锚点与位置,清空了冗余的占位文本
2026-08-21 10:08:32 +08:00
“虞渠成”
0f14d60f2f feat: 完善设备连接流程与多资源更新
1.  新增视频加载中的提示文案与图标资源
2.  调整服务器API地址为正式环境
3.  重构连接设备页面逻辑,优化设备注册绑定流程
4.  更新教学视频与文案为中文版本
5.  增加视频播放前的就绪校验逻辑
2026-08-21 09:49:21 +08:00
“虞渠成”
3703d3a233 refactor: 优化视频播放控件与UI界面
1. 新增竖屏全屏显示适配,支持横竖屏视频自动适配
2. 重构视频窗口适配逻辑,保持比例避免画面变形
3. 修复多个UI预制体的布局与绑定问题
4. 删除废弃的多语言变体预制体
5. 优化播放加载与结束时的UI状态重置逻辑
2026-08-20 15:50:11 +08:00
“虞渠成”
89a05951f4 build: 配置项目代码分析抑制与开发环境
1.  添加全局代码抑制文件,修复Unity消息方法的静态分析误报
2.  新增Directory.Build.props配置,禁用构建时代码风格强制检查
3.  更新packages配置,添加Antigravity IDE包并升级Visual Scripting版本
4.  优化VSCode调试配置与开发环境设置
5.  添加EditorConfig统一代码格式规则
2026-08-20 09:05:50 +08:00
“虞渠成”
f0a6f0f764 feat: 完成设备置顶、重命名、分享功能迭代
本次提交包含以下核心更新:
1. 新增设备置顶功能,支持将设备在列表中优先展示
2. 实现设备重命名、分享、取消共享功能
3. 优化首页设备列表滑动交互,重构设备项UI菜单逻辑
4. 新增is_top设备字段并完善设备列表排序逻辑
5. 调整部分UI布局与服务器接口地址
6. 补充多语言文案与新增提示文本
7. 修复绑定设备错误提示适配逻辑
2026-08-19 17:08:15 +08:00
“虞渠成”
3a335e60a2 chore: 重构DOTween插件路径并更新相关代码
1. 将DOTween从原Plugins/DOTween迁移到Plugins/Demigiant/DOTween
2. 更新版本号解析逻辑,适配设备端压缩编码格式
3. 新增UI动画组件UIAnimator及其编辑器脚本
4. 优化主页设备列表项滑动菜单功能
5. 移除无用的VSCode编辑器包配置
6. 更新多语言文案修正末尾标点
7. 调整主页锁定超时配置为可配置项
2026-08-19 09:47:44 +08:00
“虞渠成”
76321e6bb7 fix(homepage&lenssetting): 限制镜头英尺显示数值不超过19
统一在两处页面的单位转换逻辑中添加最大值限制,避免出现过大的英尺展示文本
2026-08-14 15:04:45 +08:00
“虞渠成”
77f9ce94c1 fix:安全学习标题显示不全 2026-08-14 13:24:27 +08:00
“虞渠成”
40a3a841a9 fix: 修复蓝牙异常和OTA升级的返回逻辑问题
1. 蓝牙操作失败时立即隐藏加载弹窗避免卡住
2. 首页断开蓝牙时延迟刷新UI并正确刷新主页
3. OTA升级期间拦截返回操作,升级完成后恢复
2026-08-14 11:24:48 +08:00
“虞渠成”
d41c3384df feat:缩短超时时间 2026-08-14 10:39:27 +08:00
“虞渠成”
da357a030b feat: 新增第三方登录绑定密码功能,优化OTA超时和WiFi提示
1. 新增用户数据结构,支持第三方绑定时设置密码
2. 新增第三方绑定密码设置UI流程,更新多语言文案
3. 调整BLE默认响应超时为3秒,OTA时临时延长至10秒
4. 添加WiFi配置页面的2.4GHz频段提示
2026-08-14 10:07:53 +08:00
“虞渠成”
e11d67df32 feat: 为多处UI交互添加防连点重入逻辑
1.  为WiFi配置、固件升级、设备信息页的多个设置页面添加防重复点击逻辑
2.  为定时任务、FOV/镜头/灯光/安全设置、消息页等主页功能添加防连点
3.  新增锁定指令、WiFi配置发送的状态标记避免重复触发
4.  所有页面打开时检查实例状态,避免重复创建页面实例
2026-08-14 08:35:38 +08:00
“虞渠成”
c3910747dd chore: 优化登录流程,更新版本号并调整UI
1. 重构第三方登录逻辑,统一登录处理流程
2. 移除BindFireBaseRequest多余的code字段
3. 更新项目版本号至1.0.4
4. 调整登录页面按钮布局与图标
5. 修复权限描述文本格式
2026-08-13 16:11:31 +08:00
“虞渠成”
3a594e8399 fix(ui): 修复被分享者rgb未隐藏的问题 2026-08-12 10:12:41 +08:00
yuqucheng
9316f8f331 feat(iOS): 完善iOS平台WiFi配对与权限本地化适配
1. 新增iOSWiFiHelper类实现异步获取WiFi SSID,自动请求位置权限
2. 新增iOS权限描述本地化处理器,实现中英文权限文案自动切换
3. 更新所有iOS权限描述为更清晰的英文/中文说明
4. 优化iOS编译后处理脚本优先级,避免被其他插件覆盖
5. 在连接设备页面和WiFi设置页面自动填充当前WiFi名称
6. 更新应用版本号与构建号
2026-08-07 16:14:10 +08:00
“虞渠成”
954cb33e71 feat(network): 添加服务器环境切换后门功能
1. 新增服务器后门触发逻辑,支持在屏幕左下角连续点击切换测试/正式服务器
2. 新增本地持久化服务器环境配置,重启应用后保持当前环境
3. 调整初始服务器地址为正式服务器地址,新增多服务器URL配置支持
4. 为网络配置添加详细注释和编辑器表头说明
2026-08-05 13:30:32 +08:00
“虞渠成”
9658ee4c0f chore: 调整安卓版本号和不安全http选项配置
更新安卓构建版本号从2到3,将不安全http选项重置为0
2026-08-03 13:15:03 +08:00
“虞渠成”
a676670855 build(android): 更新安卓版本号与谷歌服务配置
1.  将安卓版本号从1升级到2
2.  新增调试用的谷歌服务客户端配置
3.  添加权限移除规则屏蔽广告ID相关权限
2026-08-03 09:02:33 +08:00
“虞渠成”
1e6d269866 style(safetylearningpage): 调整讲解页面UI元素的锚定Y轴位置
将对应控件的锚定位置从y=20调整为y=37,修正页面布局偏移问题
2026-07-29 10:18:20 +08:00
“虞渠成”
4d409e215a style: 调整登录页和个人页UI布局与组件
统一修改两个页面的RectTransform锚点、位置、尺寸,为列表项添加布局组和ContentSizeFitter组件,调整间距与对齐方式
2026-07-29 09:54:34 +08:00
“虞渠成”
146938ef95 feat: 新增资源、更新页面功能与资源配置
1. 新增两张UI纹理图片并配置导入参数
2. 更新个人中心重置密码面板注释
3. 为国家选择组件添加加载弹窗显示隐藏逻辑
4. 简化注册设置密码面板的冗余代码
5. 更新主场景资源位置配置
6. 替换个人中心密码页的UI精灵资源
7. 优化资源更新逻辑,添加内存bundle缓存清理与调试日志
2026-07-29 09:31:30 +08:00
“虞渠成”
c6ce76cd76 fix(validation&password): 新增密码为空时的校验处理逻辑
修改了邮箱校验的前置处理逻辑,同时在两个设置密码的面板中添加密码为空时的快速校验拦截,重置规则显示并禁用确认按钮
2026-07-28 15:48:36 +08:00
“虞渠成”
4d0448c80d feat: 新增重置密码功能并完善密码校验逻辑
1.  新增加速度传感器设备不稳定错误提示
2.  新增多套密码校验规则与多语言文案
3.  重构个人页面与密码设置面板的校验逻辑
4.  优化设备状态错误展示与UI布局
5.  新增重置密码相关的UI资源与逻辑
2026-07-28 14:54:36 +08:00
“虞渠成”
4c253a419e fix(homepage): 修复数据统计图表索引错误并优化上传逻辑
1. 修正每日/每周/每月/年度统计图表的索引偏移问题,正确匹配数据下标
2. 将灭蚊数据上传改为分批上传,避免单次上传数据量过大
3. 更新上传完成的日志和提示文案,显示实际上传的数量
2026-07-27 14:07:06 +08:00
“虞渠成”
f9ac8a931b fix(HomePageCtrl): 修复蚊子数量提示的变量拼接错误
将硬编码的aimMosquitoDataCount字符串替换为实际变量值,修正数量提示显示错误
2026-07-27 13:33:31 +08:00
“虞渠成”
8d86986875 build: 更新.gitignore匹配规则
将单独的灭蚊_mapping.txt替换为通用的*_mapping.txt匹配所有映射文件
2026-07-27 13:23:37 +08:00
“虞渠成”
1b29d285e2 build: 更新版本号与安卓依赖配置
1.  将bundleVersion从1.0.1更新至1.0.2
2.  将安卓目标SDK版本从0改为36
3.  修正Firebase依赖的注释行号
4.  更新firebase-analytics-unity依赖的注释位置
2026-07-27 13:22:31 +08:00
“虞渠成”
7fb3cd8162 feat(homepage): 添设备控制解锁动画与资源更新
1. 新增设备控制解锁动画逻辑,使用DOTween实现锁图标位移动画与旋转动画
2. 更新多语言配置,修正100118词条文本
3. 新增主页锁图标相关资源与预制件配置
4. 调整安全学习页面与主页部分UI布局与显示状态
2026-07-27 08:26:37 +08:00
“虞渠成”
108fa22ab0 refactor(homepage): 更新页面文案与布局,优化消杀数据同步提示
1. 调整首页按钮文本为Visual Aid,同步更新多语言配置
2. 优化消杀数据同步过程中的Toast提示文案
3. 修正部分UI布局参数与控件绑定
4. 更新设备信息页面的UI布局与控件状态
2026-07-24 14:03:52 +08:00
yuqucheng
a6c5b01d6f feat(connectDevicePage): add centerCropRatio configuration item
新增了扫码页面的中心裁剪比例配置参数,用于调整扫码区域的裁剪比例
2026-07-23 16:36:24 +08:00
“虞渠成”
e8ce6c78be refactor(ScanQRcode): 优化纹理原始数据获取逻辑
将直接获取的原始数据缓存后再转为数组,避免重复调用获取开销
2026-07-23 16:29:30 +08:00
“虞渠成”
6626c8d613 perf(scanQRcode): 优化二维码扫描的像素数据获取方式
1.  减少了扫描间隔从0.2秒到0.1秒,提升扫描灵敏度
2.  直接获取纹理原始RGB字节数据,移除手动转换像素的循环,减少性能开销
2026-07-23 16:26:37 +08:00
“虞渠成”
1e1fd209f9 fix(connectDevice): 修复跨平台蓝牙设备连接逻辑
适配iOS和Android不同的蓝牙地址规则,通过有效地址匹配设备后再发起连接
2026-07-23 16:21:24 +08:00
“虞渠成”
00baf6574a fix(scanQRcode): 修正扫码页面裁切缩放逻辑
调整了中心裁切区域的计算参数和缩放系数,保证画面不变形同时优化裁切逻辑注释
2026-07-23 16:09:56 +08:00
“虞渠成”
15c502c959 feat(scanQRcode): add center crop zoom and bilinear sampling for preview
新增扫码预览的中心裁切放大功能,支持自定义裁切比例,同时使用双线性插值提升画面缩放质量
2026-07-23 16:05:02 +08:00
“虞渠成”
807f940cfb feat(iOS): 新增原生相机对焦插件并适配扫码页面
1. 新增iOS平台原生相机对焦辅助插件,支持开启连续自动对焦和点击单点对焦
2. 适配扫码页面,iOS平台使用原生插件实现对焦功能,修复Unity自带autoFocusPoint无效问题
3. 添加点击屏幕触发单点对焦,1.5秒后自动恢复连续对焦
4. 新增定时维护对焦状态的协程,防止系统重置对焦模式
2026-07-23 15:48:01 +08:00
“虞渠成”
8972a69e86 chore: 更新firebase配置并修复部分代码问题
1.  更新安卓端google-services.json配置,新增第三方登录客户端信息
2.  修复Firebase登录时错误日志打印不详细的问题,添加完整错误信息输出
3.  完善第三方绑定流程,保存当前登录邮箱
4.  修复ConnectDevice页面的代码缩进和语法问题
2026-07-23 14:22:35 +08:00
yuqucheng
3796d0ce33 fix(network): 修复文件下载未校验数据的问题
增加对下载数据的空值和长度校验,下载失败时打印错误日志并返回false,同时避免写入空数据
2026-07-22 14:25:30 +08:00
“虞渠成”
3805e9c46e 恢复错误提交 2026-07-22 13:17:36 +08:00
“虞渠成”
00e19ec55a 更新产品图 2026-07-22 13:15:32 +08:00
“虞渠成”
b272aede58 [fix]修复验证码输入错误提示不显示问题 2026-07-21 14:31:07 +08:00
“虞渠成”
d9e66a2327 feat(editor): 新增一键打包AB资源工具,支持自动生成list.json
新增BuildTool编辑器窗口,集成AssetBundle Browser实现一键打包,自动生成版本化的list.json配置文件,支持同步拷贝到StreamingAssets目录
2026-07-15 16:37:05 +08:00
“虞渠成”
ff418c307a 更新版本号到1.0.1 2026-07-15 10:01:36 +08:00
“虞渠成”
715921b9f2 feat: 新增WiFi OTA推送功能,完善固件更新流程
1. 新增多服务器API地址配置
2. 添加OTA推送请求数据结构
3. 实现WiFi模式下直接推送OTA指令逻辑
4. 新增多语言提示文本
5. 补充BLE通信接口文档
6. 修复部分代码格式和跳转逻辑问题
2026-07-14 17:05:14 +08:00
“虞渠成”
5105f6fbfa feat: 新增安全学习页面退出提示功能
1. 新增多语言词条用于温馨提示和退出确认弹窗
2. 调整视频页面UI布局适配全屏显示
3. 优化蓝牙延迟返回逻辑避免重复跳转主页
4. 为安全学习页面添加返回确认弹窗逻辑
5. 为安全学习页面预制体绑定退出提示弹窗组件
2026-07-14 13:43:57 +08:00
“虞渠成”
b83bf75330 refactor(蓝牙&多语言): 优化多项功能并修复问题
1. 更新多语言文件中星期的英文缩写为完整标准写法
2. 移除OTA传输中的额外延迟,优化传输速度
3. 蓝牙连接时请求高吞吐量MTU和连接优先级
4. 修复蚊虫数据请求前初始化容器的时序问题
5. 重构BLE帧解析逻辑,批量处理帧避免协程积压
2026-07-14 08:56:20 +08:00
“虞渠成”
8f20291be6 feat: 添加国家/地区选择与展示功能
1. 新增多语言国家配置项,完善语言包
2. 实现国家选择弹窗组件,支持搜索、滚动定位和返回逻辑
3. 个人页面添加国家选择入口与展示逻辑
4. 排行榜列表新增国家名称展示
5. 优化数据变更检测逻辑,过滤无意义空值
6. 调整部分UI布局适配新增元素
2026-07-13 14:17:12 +08:00
“虞渠成”
31ea68bebc feat: 添加国家选择功能与相关资源
1. 新增国家选择页面预制体与相关UI纹理资源
2. 在用户信息中添加国家代码字段
3. 主页启动时自动唤起国家选择页面完成初始化
2026-07-10 17:04:54 +08:00
“虞渠成”
be9d69f6eb feat: 添加国家选择组件与设备统计上报功能
1. 新增国家选择UI组件与相关配置文件
2. 新增多语言国家列表支持与获取接口
3. 新增设备统计数据上报定时任务
4. 修复固件版本号计算的索引错误
5. 添加新的多语言提示文案
2026-07-10 16:11:09 +08:00
“虞渠成”
4f6399f0b0 fix(ble): 调整BLE通知处理的参数传递逻辑
移除HandleNotification方法的command参数,直接从数据首字节获取命令号,简化调用传参
2026-07-09 10:17:11 +08:00
yuqucheng
753cadb4a1 ios优化 2026-07-07 15:50:34 +08:00
“虞渠成”
718b91c5a9 chore: 新增纹理资源并调整纹理导入设置
1. 新增3张纹理图片及其.meta配置文件
2. 修改512×××.png的导入参数,调整mipmap、压缩格式等设置
3. 移除原有的iOS/Android应用图标配置
2026-07-07 14:32:34 +08:00
“虞渠成”
d1238f518a build: 添加iOS应用图标资源及对应的meta配置
新增了全尺寸iOS应用图标文件和对应导入配置,同时删除了旧的80.png纹理配置文件,完善项目移动端图标资源配置
2026-07-07 10:53:55 +08:00
yuqucheng
5e0560d75a feat(editor): add iOS icon auto-replace post processor
解决Unity打包iOS时压缩图标导致模糊的问题,将Assets/Icons/iOS/下的高清图标自动替换到Xcode项目的Assets.car中
2026-07-07 10:43:07 +08:00
“虞渠成”
df241030ac Merge branch 'master' of https://dev.nextreal.cn/yuqucheng/killapp 2026-07-07 10:32:32 +08:00
“虞渠成”
a01ff23268 feat: 新增音效资源并优化音效选择功能
1. 新增Arc、Ion、Sonic、Plasma、Quantum、Hardlight共6种音效资源及导入配置
2. 为多选弹窗组件添加点击回调事件,支持选项点击预览音效
3. 为音画设置页面添加音效预览功能,绑定新增的音效资源
4. 修复iOS构建脚本的编译宏条件问题
5. 更新.gitignore忽略灭蚊_mapping.txt文件
2026-07-07 10:32:26 +08:00
yuqucheng
1f929a7025 refactor(editor): 简化iOS重复shell脚本修复逻辑
移除冗余的added状态判断,直接执行框架添加和文件写入操作
2026-07-07 10:28:39 +08:00
yuqucheng
89609dea58 fix(iOS): 修复iOS 14+获取WiFi名称的权限与适配问题
1. 添加位置权限请求逻辑适配iOS 14+ NEHotspotNetwork要求
2. 新增NetworkExtension框架依赖并更新Xcode项目配置
3. 修复构建脚本中的日志标识与应用名大小写问题
4. 更新启动图标配置与iOS项目设置
5. 优化WiFi SSID获取的兼容逻辑与日志输出
2026-07-06 16:49:18 +08:00
“虞渠成”
400fdf60a5 fix: 修复wifi设置页返回逻辑与多语言标点问题
1. 修正多语言文案中的逗号格式问题
2. 新增wifi页面来源参数,根据来源正确处理返回栈
2026-07-06 16:31:28 +08:00
“虞渠成”
9d0287733e Merge branch 'master' of https://dev.nextreal.cn/yuqucheng/killapp 2026-07-06 16:03:23 +08:00
“虞渠成”
5b9654103f fix: 调整WiFi设置相关提示与逻辑
1. 更新100293多语言提示文案,优化表述
2. 缩短设备轮询间隔从30秒到10秒
3. 新增WiFi页面跳转判断,无蓝牙时弹出提示
4. 完善SetWifiPage的返回逻辑与初始化参数
2026-07-06 16:01:47 +08:00
yuqucheng
82c997068d feat: 更新iOS构建脚本、Firebase依赖及图标资源
- 优化 iOS 重复 Shell 脚本修复逻辑
- 添加 Firebase Analytics 依赖
- 重命名图标资源为 Icon-iPhone 标准格式
2026-07-06 15:42:29 +08:00
“虞渠成”
1847d74de2 feat: 完成多项功能迭代与项目配置优化
1. 新增WiFi连接UI预制体与多语言文案
2. 重构BLE通信通知处理逻辑
3. 调整数据库总工作时长类型为float
4. 更新项目与Android构建配置
5. 主页添加消杀数据上传进度提示
2026-07-06 15:40:04 +08:00
“虞渠成”
a7024a6e19 更新启动页 2026-07-03 16:18:34 +08:00
“虞渠成”
f52b2a6b29 feat: 更新音效系统与Android混淆配置
1.  新增Sonic等6种音效类型替换原有音效枚举
2.  移除音效多语言配置直接使用枚举名显示
3.  修复工厂重置与页面返回的加载弹窗逻辑
4.  优化蓝牙连接时的UI数据覆盖问题
5.  启用自定义Proguard规则保护蓝牙与文件选择插件
2026-07-03 16:09:54 +08:00
“虞渠成”
85df7e39dc refactor(home&deviceinfo): 完善设备连接状态管理与恢复出厂逻辑
1. 新增将WiFi和蓝牙状态存入DataManager全局管理
2. 更新多语言文案,优化反馈提示文本
3. 修复校验密码页面清空错误提示逻辑
4. 重构设备恢复出厂设置流程,适配WiFi和蓝牙两种连接模式
5. 调整设备信息页面UI布局与绑定控件
2026-07-03 14:41:12 +08:00
“虞渠成”
17c63802f3 fix: 优化设备共享用户页面头像展示逻辑与UI细节
1. 简化头像加载判断逻辑,移除无头像时的调试日志和隐藏头像遮罩的冗余代码
2. 更新个人页面背景颜色为深灰色
3. 完善设备信息页面的头像项UI布局和资源替换,修复遮罩显示问题
2026-07-03 13:17:42 +08:00
“虞渠成”
077862d3c5 Merge remote-tracking branch 'kill/master' 2026-07-03 11:22:40 +08:00
“虞渠成”
4f3b9380d9 优化语言 2026-07-03 11:16:21 +08:00
yuqucheng
0f35153d25 iosdebug 2026-07-03 10:15:44 +08:00
“虞渠成”
d8537859d1 优化头像显示 2026-06-30 16:12:57 +08:00
“虞渠成”
85ee694121 feat(selfpage&schedule): 添加反馈空内容校验与任务跨天逻辑优化
1. 新增多语言文案用于反馈内容为空提示
2. 调整个人页面头像控件尺寸并隐藏默认显示
3. 增加反馈提交前的内容非空校验
4. 优化BLE设备mac字段提交逻辑
5. 重构日程任务判断逻辑,支持跨天任务识别
2026-06-29 16:47:17 +08:00
“虞渠成”
2e59fd86ff 回退定时任务修改 2026-06-29 14:40:26 +08:00
“虞渠成”
c27ef0847a refactor(home schedule): 调整定时任务筛选和展示逻辑,更新多语言文案
1. 优化密码校验正则,支持全角特殊字符
2. 更新首页无定时任务的多语言文案
3. 重构今日任务查找逻辑,仅筛选未开始任务并简化展示
2026-06-29 14:01:49 +08:00
“虞渠成”
cc336fd4af refactor: 优化设备配置同步逻辑,修复参数传递问题
主要变更:
1.  修复相机背景色为纯黑
2.  调整HTTP请求序列化库为Newtonsoft.Json并添加调试日志
3.  统一设备请求使用ble_mac而非device_sn
4.  重构DeviceConfig实现深拷贝和差异对比,仅同步变更字段
5.  优化指纹数据同步逻辑,新增本地状态更新方法
6.  新增亮度配置同步调用
7.  修复用户列表UI缺少遮罩
2026-06-29 13:12:20 +08:00
“虞渠成”
e3cdc4b539 修复答题页视频播放结束 无限loading 2026-06-26 15:31:20 +08:00
“虞渠成”
e5e6c2bb99 debug 2026-06-26 15:17:42 +08:00
“虞渠成”
6178e3559a 取消封面图 2026-06-26 15:06:07 +08:00
“虞渠成”
a82480b443 debug 2026-06-26 14:55:45 +08:00
yuqucheng
9e2b4a435c ios图标 2026-06-26 14:47:57 +08:00
“虞渠成”
dda8163ac4 debug 2026-06-26 14:15:49 +08:00
“虞渠成”
12eab8a3e1 不提交打包文件 2026-06-26 13:30:42 +08:00
“虞渠成”
cb14d1a847 debug 2026-06-26 13:29:59 +08:00
“虞渠成”
6db1c0516e 资源修正 2026-06-25 13:46:26 +08:00
“虞渠成”
b02fb8e75e 更新翻译 2026-06-25 13:27:56 +08:00
yuqucheng
42508d321e 显示状态栏 2026-06-25 11:31:12 +08:00
“虞渠成”
5e67d38bd2 debug 2026-06-25 10:43:57 +08:00
“虞渠成”
e69d3e4cbb 蓝牙设置通过wifi同步 2026-06-24 10:20:15 +08:00
“虞渠成”
d6eda72140 优化wifi 2026-06-23 15:54:48 +08:00
“虞渠成”
e22f0a13a0 wifi适配 2026-06-23 15:37:55 +08:00
“虞渠成”
655afe81f3 优化蓝牙连接 2026-06-23 15:19:47 +08:00
yuqucheng
fb67d4b324 修复ios问题 2026-06-23 11:27:51 +08:00
“虞渠成”
4345a9c326 UI替换字体遗漏 2026-06-23 11:04:56 +08:00
“虞渠成”
bdb9e6c833 ios登录测试 2026-06-23 10:08:49 +08:00
“虞渠成”
3a35ffcbc5 修复ios蓝牙通信 删除无用组件 2026-06-23 08:53:01 +08:00
yuqucheng
ba393f5266 ios打包 2026-06-22 17:05:53 +08:00
“虞渠成”
cec4f941ec debug 2026-06-22 14:57:16 +08:00
“虞渠成”
d5eec25b7d 修复字体显示 2026-06-18 12:53:32 +08:00
“虞渠成”
2c4bab399c Merge branch 'master' of https://dev.nextreal.cn/yuqucheng/killapp 2026-06-18 09:38:32 +08:00
“虞渠成”
257fbcf7d8 增加苹果登录,优化扫码 2026-06-18 09:38:23 +08:00
yuqucheng
529f3b5360 更新 .gitignore,忽略 StreamingAssets 2026-06-18 09:34:30 +08:00
yuqucheng
1c73aef665 ios打包 2026-06-18 09:33:54 +08:00
“虞渠成”
9728ded717 debug 2026-06-17 17:46:30 +08:00
“虞渠成”
2df886825f 更换字体优化 2026-06-17 17:37:49 +08:00
“虞渠成”
412184ef1b wifi适配 2026-06-17 15:42:55 +08:00
“虞渠成”
3d16c2bddc chore: 移除整个TextMesh Pro相关资源文件
删除了TextMesh Pro的字体、材质、着色器、精灵资源、配置文件以及所有关联的元数据文件,清理了项目中的TMP相关冗余资源。
2026-06-15 10:29:47 +08:00
“虞渠成”
fc4de7e65f fix(OneMessage): 修正消息创建时间显示为UTC时间的问题
将消息创建时间从UTC时间转换为本地时间后再显示,确保界面展示的时间符合用户所在时区
2026-06-15 10:28:25 +08:00
“虞渠成”
696b508187 debug 2026-06-12 16:07:27 +08:00
“虞渠成”
4825f824b4 chore: 移除无用的空projectSetting配置项
清理ProjectSettings/GvhProjectSettings.xml里冗余的空项目设置节点
2026-06-12 09:47:06 +08:00
“虞渠成”
e68e961ae3 Merge branch 'master' of https://dev.nextreal.cn/yuqucheng/killapp 2026-06-12 09:45:37 +08:00
“虞渠成”
33fda50870 更新firebase 2026-06-12 09:42:44 +08:00
yuqucheng
7807177674 ios debug 2026-06-12 09:00:46 +08:00
“虞渠成”
a53c2b0d3a 添加ios 配置文件 2026-06-12 08:58:59 +08:00
“虞渠成”
ed4a57b29d 0611 2026-06-11 11:17:27 +08:00
“虞渠成”
3abf31324c 0610 2026-06-10 15:04:14 +08:00
“虞渠成”
7b5272b468 0608 2026-06-08 08:55:10 +08:00
“虞渠成”
0a13215796 0601 2026-06-01 08:31:23 +08:00
“虞渠成”
2ec090466f 完成更多设置 2026-05-18 08:42:33 +08:00
“虞渠成”
226bf2f945 定时任务,模式选择,fov设置,距离设置,可见光设置,安全设置 2026-05-11 08:39:33 +08:00
“虞渠成”
a30c334bb5 设备绑定 2026-04-28 16:35:51 +08:00
“虞渠成”
a06bf877a4 新手教程完成,连接设备UI 2026-04-24 16:57:44 +08:00
“虞渠成”
80857fdb47 完整实现登录注册所有功能 2026-04-20 08:31:41 +08:00
“虞渠成”
01cd15f9c1 登录注册相关 2026-04-16 14:57:19 +08:00
“虞渠成”
f86630349c 初版 蓝牙工具 2026-03-30 16:25:00 +08:00
“虞渠成”
471f4c8962 init 2025-11-18 09:18:48 +08:00
2467 changed files with 546244 additions and 6 deletions

35
.editorconfig Normal file
View File

@ -0,0 +1,35 @@
# Antigravity IDE — Unity Analyzer Configuration
# Auto-generated. Safe to customize.
root = true
[*.cs]
# Formatting
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
# Unity-specific diagnostic suppressions
# IDE0051: Remove unused private members — false positive for Unity messages
dotnet_diagnostic.IDE0051.severity = none
# IDE0044: Add readonly modifier — false positive for serialized fields
dotnet_diagnostic.IDE0044.severity = none
# CS0649: Field is never assigned — false positive for [SerializeField]
dotnet_diagnostic.CS0649.severity = none
[*.shader]
indent_style = tab
[*.uss]
indent_style = space
indent_size = 4
[*.uxml]
indent_style = space
indent_size = 4

14
.gitignore vendored
View File

@ -29,7 +29,9 @@
# Gradle cache directory
.gradle/
# 资源包
/AssetBundles/
/Assets/StreamingAssets/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
@ -69,7 +71,11 @@ crashlytics-build.properties
# Packed Addressables
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
# Temporary auto-generated Android Assets
/[Aa]ssets/[Ss]treamingAssets/aa.meta
/[Aa]ssets/[Ss]treamingAssets/aa/*
# Streaming Assets (build artifacts, don't commit)
/[Aa]ssets/[Ss]treamingAssets/
ProjectSettings/ProjectVersion.txt
Assets/Resources/BillingMode.json
Assets/Resources/BillingMode.json.meta
*_mapping.txt
.dbg/

View File

@ -0,0 +1,7 @@
---
alwaysApply: true
scene: git_message
---
用中文编写提交信息

5
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"recommendations": [
"visualstudiotoolsforunity.vstuc"
]
}

19
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,19 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Unity Editor",
"type": "unity",
"request": "attach",
"path": "${workspaceFolder}/Library/EditorInstance.json"
},
{
"name": "Attach to Unity Player",
"type": "unity",
"request": "attach",
"transportArgs": {
"port": 56000
}
}
]
}

10
.vscode/mcp.json vendored Normal file
View File

@ -0,0 +1,10 @@
{
"mcpServers": {
"mcp-unity": {
"command": "node",
"args": [
"D:/unity_project/Kill/Library/PackageCache/com.gamelovers.mcp-unity@0d46436568/Server~/build/index.js"
]
}
}
}

64
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,64 @@
{
"dotnet.defaultSolution": "Kill.sln",
"dotnet.dotnetPath": "C:/Program Files/dotnet/dotnet.exe",
"dotrush.roslyn.dotnetSdkDirectory": "C:/Program Files/dotnet/sdk/8.0.113",
"dotrush.msbuildProperties": {
"DefineConstants": "UNITY_EDITOR"
},
"dotrush.roslyn.projectOrSolutionFiles": [
"D:/unity_project/Kill/Kill.sln"
],
"dotrush.roslyn.restoreProjectsBeforeLoading": false,
"files.exclude": {
"**/.DS_Store": true,
"**/.git": true,
"**/.gitmodules": true,
"**/*.booproj": true,
"**/*.pidb": true,
"**/*.suo": true,
"**/*.user": true,
"**/*.userprefs": true,
"**/*.unityproj": true,
"**/*.dll": true,
"**/*.exe": true,
"**/*.pdf": true,
"**/*.mid": true,
"**/*.midi": true,
"**/*.wav": true,
"**/*.gif": true,
"**/*.ico": true,
"**/*.jpg": true,
"**/*.jpeg": true,
"**/*.png": true,
"**/*.psd": true,
"**/*.tga": true,
"**/*.tif": true,
"**/*.tiff": true,
"**/*.3ds": true,
"**/*.3DS": true,
"**/*.fbx": true,
"**/*.FBX": true,
"**/*.lxo": true,
"**/*.LXO": true,
"**/*.ma": true,
"**/*.MA": true,
"**/*.obj": true,
"**/*.OBJ": true,
"**/*.asset": true,
"**/*.cubemap": true,
"**/*.flare": true,
"**/*.mat": true,
"**/*.meta": true,
"**/*.prefab": true,
"**/*.unity": true,
"build/": true,
"Build/": true,
"Library/": true,
"library/": true,
"obj/": true,
"Obj/": true,
"ProjectSettings/": true,
"temp/": true,
"Temp/": true
}
}

6
.vsconfig Normal file
View File

@ -0,0 +1,6 @@
{
"version": "1.0",
"components": [
"Microsoft.VisualStudio.Workload.ManagedGame"
]
}

View File

@ -0,0 +1,352 @@
version=1
# This file caches language service data to improve the performance of C# Dev Kit.
# It is not intended for manual editing. It can safely be deleted and will be
# regenerated automatically. For more information, see https://aka.ms/lscache
#
# To control where cache files are stored, use the following VS Code setting:
# "dotnet.projectsystem.cacheInProjectFolder": true
[project]
language=C#
primary
lastDtbSucceeded
[properties]
AssemblyName=Assembly-CSharp-Editor
CommandLineArgsForDesignTimeEvaluation=-langversion:9.0 -define:UNITY_2022_3_62;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_RUNTIME_PERMISSIONS;ENABLE_ENGINE_CODE_STRIPPING;ENABLE_ONSCREEN_KEYBOARD;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_ANDROID;TEXTCORE_1_0_OR_NEWER;UNITY_ANDROID;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;UNITY_CAN_SHOW_SPLASH_SCREEN;UNITY_HAS_GOOGLEVR;UNITY_HAS_TANGO;ENABLE_SPATIALTRACKING;ENABLE_ETC_COMPRESSION;PLATFORM_EXTENDS_VULKAN_DEVICE;PLATFORM_HAS_MULTIPLE_SWAPCHAINS;UNITY_ANDROID_SUPPORTS_SHADOWFILES;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;NET_4_6;NET_UNITY_4_8;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER;UNITY_EDITOR_ONLY_COMPILATION
CompilerGeneratedFilesOutputPath=
MaxSupportedLangVersion=8.0
ProjectAssetsFile=<PATH>Temp/obj/Debug/Assembly-CSharp-Editor/project.assets.json
RootNamespace=
RunAnalyzers=
RunAnalyzersDuringLiveAnalysis=
SolutionPath=<PATH>Kill.sln
TargetFrameworkIdentifier=.NETStandard
TargetPath=<PATH>Temp/bin/Debug/Assembly-CSharp-Editor.dll
TargetRefPath=
TemporaryDependencyNodeTargetIdentifier=netstandard2.1
[commandLineArguments]
/noconfig
/unsafe-
/checked-
/nowarn:0169,USG0001,1701,1702
/fullpaths
/nostdlib+
/errorreport:prompt
/warn:4
/define:UNITY_2022_3_62;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_RUNTIME_PERMISSIONS;ENABLE_ENGINE_CODE_STRIPPING;ENABLE_ONSCREEN_KEYBOARD;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_ANDROID;TEXTCORE_1_0_OR_NEWER;UNITY_ANDROID;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;UNITY_CAN_SHOW_SPLASH_SCREEN;UNITY_HAS_GOOGLEVR;UNITY_HAS_TANGO;ENABLE_SPATIALTRACKING;ENABLE_ETC_COMPRESSION;PLATFORM_EXTENDS_VULKAN_DEVICE;PLATFORM_HAS_MULTIPLE_SWAPCHAINS;UNITY_ANDROID_SUPPORTS_SHADOWFILES;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;NET_4_6;NET_UNITY_4_8;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER;UNITY_EDITOR_ONLY_COMPILATION;DEBUG;NETSTANDARD;NETSTANDARD2_1;NETSTANDARD1_0_OR_GREATER;NETSTANDARD1_1_OR_GREATER;NETSTANDARD1_2_OR_GREATER;NETSTANDARD1_3_OR_GREATER;NETSTANDARD1_4_OR_GREATER;NETSTANDARD1_5_OR_GREATER;NETSTANDARD1_6_OR_GREATER;NETSTANDARD2_0_OR_GREATER;NETSTANDARD2_1_OR_GREATER
/highentropyva+
/debug+
/debug:full
/filealign:512
/optimize-
/out:Temp\obj\Debug\Assembly-CSharp-Editor\Assembly-CSharp-Editor.dll
/target:library
/warnaserror-
/utf8output
/deterministic+
/langversion:9.0
/warnaserror+:NU1605
[sourceFiles]
Assets/Editor/
iOSPermissionPostProcessor.cs
iOSWiFiBuildPostProcessor.cs
YqcTools.cs
Assets/
Scripts/Editor/SHA1Helper.cs
Shatalmic/Editor/BluetoothPostProcessBuild.cs
Temp/obj/Debug/Assembly-CSharp-Editor/.NETStandard,Version=v2.1.AssemblyAttributes.cs
[metadataReferences]
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/Managed/
UnityEditor.Graphs.dll
UnityEngine/
UnityEditor.CoreModule.dll
UnityEditor.DeviceSimulatorModule.dll
UnityEditor.DiagnosticsModule.dll
UnityEditor.dll
UnityEditor.EditorToolbarModule.dll
UnityEditor.GraphViewModule.dll
UnityEditor.PresetsUIModule.dll
UnityEditor.QuickSearchModule.dll
UnityEditor.SceneTemplateModule.dll
UnityEditor.SceneViewModule.dll
UnityEditor.TextCoreFontEngineModule.dll
UnityEditor.TextCoreTextEngineModule.dll
UnityEditor.UIBuilderModule.dll
UnityEditor.UIElementsModule.dll
UnityEditor.UIElementsSamplesModule.dll
UnityEditor.UnityConnectModule.dll
UnityEngine.AccessibilityModule.dll
UnityEngine.AIModule.dll
UnityEngine.AndroidJNIModule.dll
UnityEngine.AnimationModule.dll
UnityEngine.ARModule.dll
UnityEngine.AssetBundleModule.dll
UnityEngine.AudioModule.dll
UnityEngine.ClothModule.dll
UnityEngine.ClusterInputModule.dll
UnityEngine.ClusterRendererModule.dll
UnityEngine.ContentLoadModule.dll
UnityEngine.CoreModule.dll
UnityEngine.CrashReportingModule.dll
UnityEngine.DirectorModule.dll
UnityEngine.dll
UnityEngine.DSPGraphModule.dll
UnityEngine.GameCenterModule.dll
UnityEngine.GIModule.dll
UnityEngine.GridModule.dll
UnityEngine.HotReloadModule.dll
UnityEngine.ImageConversionModule.dll
UnityEngine.IMGUIModule.dll
UnityEngine.InputLegacyModule.dll
UnityEngine.InputModule.dll
UnityEngine.JSONSerializeModule.dll
UnityEngine.LocalizationModule.dll
UnityEngine.NVIDIAModule.dll
UnityEngine.ParticleSystemModule.dll
UnityEngine.PerformanceReportingModule.dll
UnityEngine.Physics2DModule.dll
UnityEngine.PhysicsModule.dll
UnityEngine.ProfilerModule.dll
UnityEngine.PropertiesModule.dll
UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll
UnityEngine.ScreenCaptureModule.dll
UnityEngine.SharedInternalsModule.dll
UnityEngine.SpriteMaskModule.dll
UnityEngine.SpriteShapeModule.dll
UnityEngine.StreamingModule.dll
UnityEngine.SubstanceModule.dll
UnityEngine.SubsystemsModule.dll
UnityEngine.TerrainModule.dll
UnityEngine.TerrainPhysicsModule.dll
UnityEngine.TextCoreFontEngineModule.dll
UnityEngine.TextCoreTextEngineModule.dll
UnityEngine.TextRenderingModule.dll
UnityEngine.TilemapModule.dll
UnityEngine.TLSModule.dll
UnityEngine.UIElementsModule.dll
UnityEngine.UIModule.dll
UnityEngine.UmbraModule.dll
UnityEngine.UnityAnalyticsCommonModule.dll
UnityEngine.UnityAnalyticsModule.dll
UnityEngine.UnityConnectModule.dll
UnityEngine.UnityCurlModule.dll
UnityEngine.UnityTestProtocolModule.dll
UnityEngine.UnityWebRequestAssetBundleModule.dll
UnityEngine.UnityWebRequestAudioModule.dll
UnityEngine.UnityWebRequestModule.dll
UnityEngine.UnityWebRequestTextureModule.dll
UnityEngine.UnityWebRequestWWWModule.dll
UnityEngine.VehiclesModule.dll
UnityEngine.VFXModule.dll
UnityEngine.VideoModule.dll
UnityEngine.VirtualTexturingModule.dll
UnityEngine.VRModule.dll
UnityEngine.WindModule.dll
UnityEngine.XRModule.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/
Unity.Android.Gradle.dll
Unity.Android.GradleProject.dll
Unity.Android.Types.dll
UnityEditor.Android.Extensions.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/
PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll
UnityReferenceAssemblies/unity-4.8-api/Facades/
Microsoft.Win32.Primitives.dll
netstandard.dll
System.AppContext.dll
System.Buffers.dll
System.Collections.Concurrent.dll
System.Collections.dll
System.Collections.NonGeneric.dll
System.Collections.Specialized.dll
System.ComponentModel.Annotations.dll
System.ComponentModel.dll
System.ComponentModel.EventBasedAsync.dll
System.ComponentModel.Primitives.dll
System.ComponentModel.TypeConverter.dll
System.Console.dll
System.Data.Common.dll
System.Diagnostics.Contracts.dll
System.Diagnostics.Debug.dll
System.Diagnostics.FileVersionInfo.dll
System.Diagnostics.Process.dll
System.Diagnostics.StackTrace.dll
System.Diagnostics.TextWriterTraceListener.dll
System.Diagnostics.Tools.dll
System.Diagnostics.TraceSource.dll
System.Drawing.Primitives.dll
System.Dynamic.Runtime.dll
System.Globalization.Calendars.dll
System.Globalization.dll
System.Globalization.Extensions.dll
System.IO.Compression.ZipFile.dll
System.IO.dll
System.IO.FileSystem.dll
System.IO.FileSystem.DriveInfo.dll
System.IO.FileSystem.Primitives.dll
System.IO.FileSystem.Watcher.dll
System.IO.IsolatedStorage.dll
System.IO.MemoryMappedFiles.dll
System.IO.Pipes.dll
System.IO.UnmanagedMemoryStream.dll
System.Linq.dll
System.Linq.Expressions.dll
System.Linq.Parallel.dll
System.Linq.Queryable.dll
System.Memory.dll
System.Net.Http.Rtc.dll
System.Net.NameResolution.dll
System.Net.NetworkInformation.dll
System.Net.Ping.dll
System.Net.Primitives.dll
System.Net.Requests.dll
System.Net.Security.dll
System.Net.Sockets.dll
System.Net.WebHeaderCollection.dll
System.Net.WebSockets.Client.dll
System.Net.WebSockets.dll
System.ObjectModel.dll
System.Reflection.DispatchProxy.dll
System.Reflection.dll
System.Reflection.Emit.dll
System.Reflection.Emit.ILGeneration.dll
System.Reflection.Emit.Lightweight.dll
System.Reflection.Extensions.dll
System.Reflection.Primitives.dll
System.Resources.Reader.dll
System.Resources.ResourceManager.dll
System.Resources.Writer.dll
System.Runtime.CompilerServices.VisualC.dll
System.Runtime.dll
System.Runtime.Extensions.dll
System.Runtime.Handles.dll
System.Runtime.InteropServices.dll
System.Runtime.InteropServices.RuntimeInformation.dll
System.Runtime.InteropServices.WindowsRuntime.dll
System.Runtime.Numerics.dll
System.Runtime.Serialization.Formatters.dll
System.Runtime.Serialization.Json.dll
System.Runtime.Serialization.Primitives.dll
System.Runtime.Serialization.Xml.dll
System.Security.Claims.dll
System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Csp.dll
System.Security.Cryptography.Encoding.dll
System.Security.Cryptography.Primitives.dll
System.Security.Cryptography.X509Certificates.dll
System.Security.Principal.dll
System.Security.SecureString.dll
System.ServiceModel.Duplex.dll
System.ServiceModel.Http.dll
System.ServiceModel.NetTcp.dll
System.ServiceModel.Primitives.dll
System.ServiceModel.Security.dll
System.Text.Encoding.dll
System.Text.Encoding.Extensions.dll
System.Text.RegularExpressions.dll
System.Threading.dll
System.Threading.Overlapped.dll
System.Threading.Tasks.dll
System.Threading.Tasks.Extensions.dll
System.Threading.Tasks.Parallel.dll
System.Threading.Thread.dll
System.Threading.ThreadPool.dll
System.Threading.Timer.dll
System.ValueTuple.dll
System.Xml.ReaderWriter.dll
System.Xml.XDocument.dll
System.Xml.XmlDocument.dll
System.Xml.XmlSerializer.dll
System.Xml.XPath.dll
System.Xml.XPath.XDocument.dll
UnityReferenceAssemblies/unity-4.8-api/
Microsoft.CSharp.dll
mscorlib.dll
System.ComponentModel.Composition.dll
System.Core.dll
System.Data.DataSetExtensions.dll
System.Data.dll
System.dll
System.Drawing.dll
System.IO.Compression.dll
System.IO.Compression.FileSystem.dll
System.Net.Http.dll
System.Numerics.dll
System.Numerics.Vectors.dll
System.Runtime.Serialization.dll
System.Transactions.dll
System.Xml.dll
System.Xml.Linq.dll
Assets/ExternalDependencyManager/Editor/1.2.186/
Google.IOSResolver.dll
Google.JarResolver.dll
Google.PackageManagerResolver.dll
Google.VersionHandlerImpl.dll
Assets/
ExternalDependencyManager/Editor/Google.VersionHandler.dll
Firebase/Editor/
Firebase.Editor.dll
Firebase.Messaging.Editor.dll
Firebase/Plugins/
Firebase.Analytics.dll
Firebase.App.dll
Firebase.Auth.dll
Firebase.Messaging.dll
Firebase.Platform.dll
Firebase.TaskExtension.dll
Google.MiniJson.dll
Plugins/DOTween/
DOTween.dll
Editor/DOTweenEditor.dll
Plugins/
net2.0/zxing.dll
Newtonsoft.Json.dll
Library/PackageCache/
com.unity.ext.nunit@1.0.6/net35/unity-custom/nunit.framework.dll
com.unity.visualscripting@1.9.4/Editor/VisualScripting.Core/Dependencies/
DotNetZip/Unity.VisualScripting.IonicZip.dll
YamlDotNet/Unity.VisualScripting.YamlDotNet.dll
com.unity.visualscripting@1.9.4/
Editor/VisualScripting.Core/EditorAssetResources/Unity.VisualScripting.TextureAssets.dll
Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll
Library/ScriptAssemblies/
Unity.2D.Sprite.Editor.dll
Unity.AssetBundleBrowser.Editor.dll
Unity.Mobile.AndroidLogcat.Editor.dll
Unity.Rider.Editor.dll
Unity.Timeline.dll
Unity.Timeline.Editor.dll
Unity.VisualScripting.Core.dll
Unity.VisualScripting.Core.Editor.dll
Unity.VisualScripting.Flow.dll
Unity.VisualScripting.Flow.Editor.dll
Unity.VisualScripting.SettingsProvider.Editor.dll
Unity.VisualScripting.Shared.Editor.dll
Unity.VisualScripting.State.dll
Unity.VisualScripting.State.Editor.dll
Unity.VisualStudio.Editor.dll
Unity.VSCode.Editor.dll
UnityEditor.TestRunner.dll
UnityEditor.UI.dll
UnityEngine.TestRunner.dll
UnityEngine.UI.dll
Temp/bin/Debug/
Assembly-CSharp-firstpass.dll
Assembly-CSharp.dll
FirebaseMessagingActivityGenerator.dll
NativeGallery.Editor.dll
NativeGallery.Runtime.dll
[analyzerReferences]
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/Tools/Unity.SourceGenerators/
Unity.Properties.SourceGenerator.dll
Unity.SourceGenerators.dll
C:/Users/YQC/.vscode/extensions/visualstudiotoolsforunity.vstuc-1.2.2/Analyzers/Microsoft.Unity.Analyzers.dll
[analyzerConfigFiles]
Temp/obj/Debug/Assembly-CSharp-Editor/Assembly-CSharp-Editor.GeneratedMSBuildEditorConfig.editorconfig

View File

@ -0,0 +1,324 @@
version=1
# This file caches language service data to improve the performance of C# Dev Kit.
# It is not intended for manual editing. It can safely be deleted and will be
# regenerated automatically. For more information, see https://aka.ms/lscache
#
# To control where cache files are stored, use the following VS Code setting:
# "dotnet.projectsystem.cacheInProjectFolder": true
[project]
language=C#
primary
lastDtbSucceeded
[properties]
AssemblyName=Assembly-CSharp-firstpass
CommandLineArgsForDesignTimeEvaluation=-langversion:9.0 -define:UNITY_2022_3_62;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_RUNTIME_PERMISSIONS;ENABLE_ENGINE_CODE_STRIPPING;ENABLE_ONSCREEN_KEYBOARD;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_ANDROID;TEXTCORE_1_0_OR_NEWER;UNITY_ANDROID;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;UNITY_CAN_SHOW_SPLASH_SCREEN;UNITY_HAS_GOOGLEVR;UNITY_HAS_TANGO;ENABLE_SPATIALTRACKING;ENABLE_ETC_COMPRESSION;PLATFORM_EXTENDS_VULKAN_DEVICE;PLATFORM_HAS_MULTIPLE_SWAPCHAINS;UNITY_ANDROID_SUPPORTS_SHADOWFILES;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;NET_STANDARD_2_1;NETSTANDARD;NETSTANDARD2_1;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER
CompilerGeneratedFilesOutputPath=
MaxSupportedLangVersion=8.0
ProjectAssetsFile=<PATH>Temp/obj/Debug/Assembly-CSharp-firstpass/project.assets.json
RootNamespace=
RunAnalyzers=
RunAnalyzersDuringLiveAnalysis=
SolutionPath=<PATH>Kill.sln
TargetFrameworkIdentifier=.NETStandard
TargetPath=<PATH>Temp/bin/Debug/Assembly-CSharp-firstpass.dll
TargetRefPath=
TemporaryDependencyNodeTargetIdentifier=netstandard2.1
[commandLineArguments]
/noconfig
/unsafe-
/checked-
/nowarn:0169,USG0001,1701,1702
/fullpaths
/nostdlib+
/errorreport:prompt
/warn:4
/define:UNITY_2022_3_62;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_RUNTIME_PERMISSIONS;ENABLE_ENGINE_CODE_STRIPPING;ENABLE_ONSCREEN_KEYBOARD;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_ANDROID;TEXTCORE_1_0_OR_NEWER;UNITY_ANDROID;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;UNITY_CAN_SHOW_SPLASH_SCREEN;UNITY_HAS_GOOGLEVR;UNITY_HAS_TANGO;ENABLE_SPATIALTRACKING;ENABLE_ETC_COMPRESSION;PLATFORM_EXTENDS_VULKAN_DEVICE;PLATFORM_HAS_MULTIPLE_SWAPCHAINS;UNITY_ANDROID_SUPPORTS_SHADOWFILES;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;NET_STANDARD_2_1;NETSTANDARD;NETSTANDARD2_1;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER;DEBUG;NETSTANDARD;NETSTANDARD2_1;NETSTANDARD1_0_OR_GREATER;NETSTANDARD1_1_OR_GREATER;NETSTANDARD1_2_OR_GREATER;NETSTANDARD1_3_OR_GREATER;NETSTANDARD1_4_OR_GREATER;NETSTANDARD1_5_OR_GREATER;NETSTANDARD1_6_OR_GREATER;NETSTANDARD2_0_OR_GREATER;NETSTANDARD2_1_OR_GREATER
/highentropyva+
/debug+
/debug:full
/filealign:512
/optimize-
/out:Temp\obj\Debug\Assembly-CSharp-firstpass\Assembly-CSharp-firstpass.dll
/target:library
/warnaserror-
/utf8output
/deterministic+
/langversion:9.0
/warnaserror+:NU1605
[sourceFiles]
Assets/Plugins/
BluetoothDeviceScript.cs
BluetoothHardwareInterface.cs
DOTween/Modules/
DOTweenModuleAudio.cs
DOTweenModuleEPOOutline.cs
DOTweenModulePhysics.cs
DOTweenModulePhysics2D.cs
DOTweenModuleSprite.cs
DOTweenModuleUI.cs
DOTweenModuleUnityVersion.cs
DOTweenModuleUtils.cs
Temp/obj/Debug/Assembly-CSharp-firstpass/.NETStandard,Version=v2.1.AssemblyAttributes.cs
[metadataReferences]
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/Managed/UnityEngine/
UnityEditor.CoreModule.dll
UnityEditor.DeviceSimulatorModule.dll
UnityEditor.DiagnosticsModule.dll
UnityEditor.dll
UnityEditor.EditorToolbarModule.dll
UnityEditor.GraphViewModule.dll
UnityEditor.PresetsUIModule.dll
UnityEditor.QuickSearchModule.dll
UnityEditor.SceneTemplateModule.dll
UnityEditor.SceneViewModule.dll
UnityEditor.TextCoreFontEngineModule.dll
UnityEditor.TextCoreTextEngineModule.dll
UnityEditor.UIBuilderModule.dll
UnityEditor.UIElementsModule.dll
UnityEditor.UIElementsSamplesModule.dll
UnityEditor.UnityConnectModule.dll
UnityEngine.AccessibilityModule.dll
UnityEngine.AIModule.dll
UnityEngine.AndroidJNIModule.dll
UnityEngine.AnimationModule.dll
UnityEngine.ARModule.dll
UnityEngine.AssetBundleModule.dll
UnityEngine.AudioModule.dll
UnityEngine.ClothModule.dll
UnityEngine.ContentLoadModule.dll
UnityEngine.CoreModule.dll
UnityEngine.CrashReportingModule.dll
UnityEngine.DirectorModule.dll
UnityEngine.dll
UnityEngine.DSPGraphModule.dll
UnityEngine.GameCenterModule.dll
UnityEngine.GIModule.dll
UnityEngine.GridModule.dll
UnityEngine.HotReloadModule.dll
UnityEngine.ImageConversionModule.dll
UnityEngine.IMGUIModule.dll
UnityEngine.InputLegacyModule.dll
UnityEngine.InputModule.dll
UnityEngine.JSONSerializeModule.dll
UnityEngine.LocalizationModule.dll
UnityEngine.ParticleSystemModule.dll
UnityEngine.PerformanceReportingModule.dll
UnityEngine.Physics2DModule.dll
UnityEngine.PhysicsModule.dll
UnityEngine.ProfilerModule.dll
UnityEngine.PropertiesModule.dll
UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll
UnityEngine.ScreenCaptureModule.dll
UnityEngine.SharedInternalsModule.dll
UnityEngine.SpriteMaskModule.dll
UnityEngine.SpriteShapeModule.dll
UnityEngine.StreamingModule.dll
UnityEngine.SubstanceModule.dll
UnityEngine.SubsystemsModule.dll
UnityEngine.TerrainModule.dll
UnityEngine.TerrainPhysicsModule.dll
UnityEngine.TextCoreFontEngineModule.dll
UnityEngine.TextCoreTextEngineModule.dll
UnityEngine.TextRenderingModule.dll
UnityEngine.TilemapModule.dll
UnityEngine.TLSModule.dll
UnityEngine.UIElementsModule.dll
UnityEngine.UIModule.dll
UnityEngine.UmbraModule.dll
UnityEngine.UnityAnalyticsCommonModule.dll
UnityEngine.UnityAnalyticsModule.dll
UnityEngine.UnityConnectModule.dll
UnityEngine.UnityCurlModule.dll
UnityEngine.UnityTestProtocolModule.dll
UnityEngine.UnityWebRequestAssetBundleModule.dll
UnityEngine.UnityWebRequestAudioModule.dll
UnityEngine.UnityWebRequestModule.dll
UnityEngine.UnityWebRequestTextureModule.dll
UnityEngine.UnityWebRequestWWWModule.dll
UnityEngine.VehiclesModule.dll
UnityEngine.VFXModule.dll
UnityEngine.VideoModule.dll
UnityEngine.VRModule.dll
UnityEngine.WindModule.dll
UnityEngine.XRModule.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/NetStandard/compat/2.1.0/shims/netfx/
mscorlib.dll
System.ComponentModel.Composition.dll
System.Core.dll
System.Data.dll
System.dll
System.Drawing.dll
System.IO.Compression.FileSystem.dll
System.Net.dll
System.Numerics.dll
System.Runtime.Serialization.dll
System.ServiceModel.Web.dll
System.Transactions.dll
System.Web.dll
System.Windows.dll
System.Xml.dll
System.Xml.Linq.dll
System.Xml.Serialization.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/NetStandard/compat/2.1.0/shims/netstandard/
Microsoft.Win32.Primitives.dll
System.AppContext.dll
System.Buffers.dll
System.Collections.Concurrent.dll
System.Collections.dll
System.Collections.NonGeneric.dll
System.Collections.Specialized.dll
System.ComponentModel.dll
System.ComponentModel.EventBasedAsync.dll
System.ComponentModel.Primitives.dll
System.ComponentModel.TypeConverter.dll
System.Console.dll
System.Data.Common.dll
System.Diagnostics.Contracts.dll
System.Diagnostics.Debug.dll
System.Diagnostics.FileVersionInfo.dll
System.Diagnostics.Process.dll
System.Diagnostics.StackTrace.dll
System.Diagnostics.TextWriterTraceListener.dll
System.Diagnostics.Tools.dll
System.Diagnostics.TraceSource.dll
System.Diagnostics.Tracing.dll
System.Drawing.Primitives.dll
System.Dynamic.Runtime.dll
System.Globalization.Calendars.dll
System.Globalization.dll
System.Globalization.Extensions.dll
System.IO.Compression.dll
System.IO.Compression.ZipFile.dll
System.IO.dll
System.IO.FileSystem.dll
System.IO.FileSystem.DriveInfo.dll
System.IO.FileSystem.Primitives.dll
System.IO.FileSystem.Watcher.dll
System.IO.IsolatedStorage.dll
System.IO.MemoryMappedFiles.dll
System.IO.Pipes.dll
System.IO.UnmanagedMemoryStream.dll
System.Linq.dll
System.Linq.Expressions.dll
System.Linq.Parallel.dll
System.Linq.Queryable.dll
System.Memory.dll
System.Net.Http.dll
System.Net.NameResolution.dll
System.Net.NetworkInformation.dll
System.Net.Ping.dll
System.Net.Primitives.dll
System.Net.Requests.dll
System.Net.Security.dll
System.Net.Sockets.dll
System.Net.WebHeaderCollection.dll
System.Net.WebSockets.Client.dll
System.Net.WebSockets.dll
System.Numerics.Vectors.dll
System.ObjectModel.dll
System.Reflection.DispatchProxy.dll
System.Reflection.dll
System.Reflection.Emit.dll
System.Reflection.Emit.ILGeneration.dll
System.Reflection.Emit.Lightweight.dll
System.Reflection.Extensions.dll
System.Reflection.Primitives.dll
System.Resources.Reader.dll
System.Resources.ResourceManager.dll
System.Resources.Writer.dll
System.Runtime.CompilerServices.VisualC.dll
System.Runtime.dll
System.Runtime.Extensions.dll
System.Runtime.Handles.dll
System.Runtime.InteropServices.dll
System.Runtime.InteropServices.RuntimeInformation.dll
System.Runtime.Numerics.dll
System.Runtime.Serialization.Formatters.dll
System.Runtime.Serialization.Json.dll
System.Runtime.Serialization.Primitives.dll
System.Runtime.Serialization.Xml.dll
System.Security.Claims.dll
System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Csp.dll
System.Security.Cryptography.Encoding.dll
System.Security.Cryptography.Primitives.dll
System.Security.Cryptography.X509Certificates.dll
System.Security.Principal.dll
System.Security.SecureString.dll
System.Text.Encoding.dll
System.Text.Encoding.Extensions.dll
System.Text.RegularExpressions.dll
System.Threading.dll
System.Threading.Overlapped.dll
System.Threading.Tasks.dll
System.Threading.Tasks.Extensions.dll
System.Threading.Tasks.Parallel.dll
System.Threading.Thread.dll
System.Threading.ThreadPool.dll
System.Threading.Timer.dll
System.ValueTuple.dll
System.Xml.ReaderWriter.dll
System.Xml.XDocument.dll
System.Xml.XmlDocument.dll
System.Xml.XmlSerializer.dll
System.Xml.XPath.dll
System.Xml.XPath.XDocument.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/NetStandard/
Extensions/2.0.0/System.Runtime.InteropServices.WindowsRuntime.dll
ref/2.1.0/netstandard.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/
Unity.Android.Gradle.dll
Unity.Android.GradleProject.dll
Unity.Android.Types.dll
Assets/Firebase/Plugins/
Firebase.Analytics.dll
Firebase.App.dll
Firebase.Auth.dll
Firebase.Messaging.dll
Firebase.Platform.dll
Firebase.TaskExtension.dll
Google.MiniJson.dll
Assets/Plugins/
DOTween/DOTween.dll
net2.0/zxing.dll
Newtonsoft.Json.dll
Library/
PackageCache/com.unity.visualscripting@1.9.4/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll
ScriptAssemblies/
Unity.2D.Sprite.Editor.dll
Unity.AssetBundleBrowser.Editor.dll
Unity.Mobile.AndroidLogcat.Editor.dll
Unity.Rider.Editor.dll
Unity.Timeline.dll
Unity.Timeline.Editor.dll
Unity.VisualScripting.Core.dll
Unity.VisualScripting.Core.Editor.dll
Unity.VisualScripting.Flow.dll
Unity.VisualScripting.Flow.Editor.dll
Unity.VisualScripting.SettingsProvider.Editor.dll
Unity.VisualScripting.Shared.Editor.dll
Unity.VisualScripting.State.dll
Unity.VisualScripting.State.Editor.dll
Unity.VisualStudio.Editor.dll
Unity.VSCode.Editor.dll
UnityEditor.UI.dll
UnityEngine.UI.dll
Temp/bin/Debug/
FirebaseMessagingActivityGenerator.dll
NativeGallery.Editor.dll
NativeGallery.Runtime.dll
[analyzerReferences]
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/Tools/Unity.SourceGenerators/
Unity.Properties.SourceGenerator.dll
Unity.SourceGenerators.dll
C:/Users/YQC/.vscode/extensions/visualstudiotoolsforunity.vstuc-1.2.2/Analyzers/Microsoft.Unity.Analyzers.dll
[analyzerConfigFiles]
Temp/obj/Debug/Assembly-CSharp-firstpass/Assembly-CSharp-firstpass.GeneratedMSBuildEditorConfig.editorconfig

View File

@ -0,0 +1,424 @@
version=1
# This file caches language service data to improve the performance of C# Dev Kit.
# It is not intended for manual editing. It can safely be deleted and will be
# regenerated automatically. For more information, see https://aka.ms/lscache
#
# To control where cache files are stored, use the following VS Code setting:
# "dotnet.projectsystem.cacheInProjectFolder": true
[project]
language=C#
primary
lastDtbSucceeded
[properties]
AssemblyName=Assembly-CSharp
CommandLineArgsForDesignTimeEvaluation=-langversion:9.0 -define:UNITY_2022_3_62;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_RUNTIME_PERMISSIONS;ENABLE_ENGINE_CODE_STRIPPING;ENABLE_ONSCREEN_KEYBOARD;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_ANDROID;TEXTCORE_1_0_OR_NEWER;UNITY_ANDROID;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;UNITY_CAN_SHOW_SPLASH_SCREEN;UNITY_HAS_GOOGLEVR;UNITY_HAS_TANGO;ENABLE_SPATIALTRACKING;ENABLE_ETC_COMPRESSION;PLATFORM_EXTENDS_VULKAN_DEVICE;PLATFORM_HAS_MULTIPLE_SWAPCHAINS;UNITY_ANDROID_SUPPORTS_SHADOWFILES;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;NET_STANDARD_2_1;NETSTANDARD;NETSTANDARD2_1;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER
CompilerGeneratedFilesOutputPath=
MaxSupportedLangVersion=8.0
ProjectAssetsFile=<PATH>Temp/obj/Debug/Assembly-CSharp/project.assets.json
RootNamespace=
RunAnalyzers=
RunAnalyzersDuringLiveAnalysis=
SolutionPath=<PATH>Kill.sln
TargetFrameworkIdentifier=.NETStandard
TargetPath=<PATH>Temp/bin/Debug/Assembly-CSharp.dll
TargetRefPath=
TemporaryDependencyNodeTargetIdentifier=netstandard2.1
[commandLineArguments]
/noconfig
/unsafe-
/checked-
/nowarn:0169,USG0001,1701,1702
/fullpaths
/nostdlib+
/errorreport:prompt
/warn:4
/define:UNITY_2022_3_62;UNITY_2022_3;UNITY_2022;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_RUNTIME_PERMISSIONS;ENABLE_ENGINE_CODE_STRIPPING;ENABLE_ONSCREEN_KEYBOARD;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;ENABLE_VIDEO;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_NAVIGATION_PACKAGE_DEBUG_VISUALIZATION;ENABLE_NAVIGATION_HEIGHTMESH_RUNTIME_SUPPORT;ENABLE_NAVIGATION_UI_REQUIRES_PACKAGE;PLATFORM_ANDROID;TEXTCORE_1_0_OR_NEWER;UNITY_ANDROID;UNITY_ANDROID_API;ENABLE_EGL;ENABLE_NETWORK;ENABLE_RUNTIME_GI;ENABLE_CRUNCH_TEXTURE_COMPRESSION;UNITY_CAN_SHOW_SPLASH_SCREEN;UNITY_HAS_GOOGLEVR;UNITY_HAS_TANGO;ENABLE_SPATIALTRACKING;ENABLE_ETC_COMPRESSION;PLATFORM_EXTENDS_VULKAN_DEVICE;PLATFORM_HAS_MULTIPLE_SWAPCHAINS;UNITY_ANDROID_SUPPORTS_SHADOWFILES;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;ENABLE_UNITYADS_RUNTIME;UNITY_UNITYADS_API;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;NET_STANDARD_2_1;NETSTANDARD;NETSTANDARD2_1;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_LEGACY_INPUT_MANAGER;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER;DEBUG;NETSTANDARD;NETSTANDARD2_1;NETSTANDARD1_0_OR_GREATER;NETSTANDARD1_1_OR_GREATER;NETSTANDARD1_2_OR_GREATER;NETSTANDARD1_3_OR_GREATER;NETSTANDARD1_4_OR_GREATER;NETSTANDARD1_5_OR_GREATER;NETSTANDARD1_6_OR_GREATER;NETSTANDARD2_0_OR_GREATER;NETSTANDARD2_1_OR_GREATER
/highentropyva+
/debug+
/debug:full
/filealign:512
/optimize-
/out:Temp\obj\Debug\Assembly-CSharp\Assembly-CSharp.dll
/target:library
/warnaserror-
/utf8output
/deterministic+
/langversion:9.0
/warnaserror+:NU1605
[sourceFiles]
Assets/Scripts/Bluetooth/
BLECommunicationManager.cs
BluetoothManager.cs
OTAManager.cs
Protocol/
BLEProtocolStructs.cs
CRC16.cs
Assets/Scripts/Core/
AndroidStatusBarManager.cs
Loom.cs
Utils/AndroidFilePicker.cs
Assets/Scripts/Managers/
DataBase.cs
DataManager.cs
FirebaseAuthManager.cs
FireBaseCtrl.cs
LanguageManager.cs
LoadRes.cs
Assets/Scripts/Network/
HttpRequestManager.cs
NetworkCtrl.cs
NetworkModels.cs
NetworkStateManager.cs
RequestQueueManager.cs
ResponseCode.cs
Assets/Scripts/UI/Components/
AvatarSelection.cs
ColorPicker.cs
DeviceUI.cs
LoadingUI.cs
MultiLanguageText.cs
MutiSelectPage.cs
NumPicker.cs
QRCodeGenerator.cs
RepeatSelection.cs
SlideSelector.cs
Switch.cs
TimeSelection.cs
ToastUI.cs
VerificationCodeInput.cs
VideoCtrl.cs
WindowTipCtrl.cs
Assets/Scripts/UI/Pages/
BluetoothDemoUI.cs
ConnectDevice/
ConnectDevicePageCtrl.cs
NativeQRScanner.cs
ScanQRcode.cs
DeviceInfoPage/
DeviceInfoPage.cs
LCDSetting.cs
RenamePage.cs
RGBlightSetting.cs
VideoAndSoundSetting.cs
HomePage/
FovSettingPage.cs
HomePageCtrl.cs
HomePageDeviceCtrl.cs
HomePageDeviceItem.cs
HomePageDevicePage.cs
HomePageDeviceState.cs
HomePageSchedule.cs
LensSettingPage.cs
LightSettingPage.cs
SafetySettingPage.cs
ScheduleSetting/
OneSchedule.cs
ScheduleEditPage.cs
ScheduleSettingPage.cs
Login/
LoginPageCtrl.cs
LoginSubPageBase.cs
SubPages/
LoginPanel.cs
LoginPasswordPanel.cs
PrivacyTipPanel.cs
RegisterPanel.cs
SetPasswordPanel.cs
ThirdPartyBindPanel.cs
VerificationCodePanel.cs
Safetylearning/
SafetylearningAnswer.cs
SafetylearningOption.cs
SafetylearningPageCtrl.cs
SafetylearningQuestion.cs
SafetylearningTestPage.cs
SafetylearningVideoPage.cs
SelfPage/
ChangeLanguagePage.cs
SelfInfoPage.cs
SelfPage.cs
SelfQrcodePage.cs
SelfSetPasswordPanel.cs
SelfVerificationCodePanel.cs
Assets/Scripts/
UI/UIManager.cs
Utils/
MainThread.cs
ValidationUtils.cs
Assets/Shatalmic/Example/iBeaconExample/
iBeaconExampleScript.cs
iBeaconItemScript.cs
Assets/Shatalmic/Example/MultipleLevels/
DeviceObject.cs
FoundDeviceListScript.cs
Level1Script.cs
Level2Script.cs
Assets/Shatalmic/Example/ScannerTest/
ScannedItemScript.cs
ScannerTestScript.cs
Assets/Shatalmic/Example/StartingExample/StartingExample.cs
Temp/obj/Debug/Assembly-CSharp/.NETStandard,Version=v2.1.AssemblyAttributes.cs
[metadataReferences]
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/Managed/UnityEngine/
UnityEditor.CoreModule.dll
UnityEditor.DeviceSimulatorModule.dll
UnityEditor.DiagnosticsModule.dll
UnityEditor.dll
UnityEditor.EditorToolbarModule.dll
UnityEditor.GraphViewModule.dll
UnityEditor.PresetsUIModule.dll
UnityEditor.QuickSearchModule.dll
UnityEditor.SceneTemplateModule.dll
UnityEditor.SceneViewModule.dll
UnityEditor.TextCoreFontEngineModule.dll
UnityEditor.TextCoreTextEngineModule.dll
UnityEditor.UIBuilderModule.dll
UnityEditor.UIElementsModule.dll
UnityEditor.UIElementsSamplesModule.dll
UnityEditor.UnityConnectModule.dll
UnityEngine.AccessibilityModule.dll
UnityEngine.AIModule.dll
UnityEngine.AndroidJNIModule.dll
UnityEngine.AnimationModule.dll
UnityEngine.ARModule.dll
UnityEngine.AssetBundleModule.dll
UnityEngine.AudioModule.dll
UnityEngine.ClothModule.dll
UnityEngine.ContentLoadModule.dll
UnityEngine.CoreModule.dll
UnityEngine.CrashReportingModule.dll
UnityEngine.DirectorModule.dll
UnityEngine.dll
UnityEngine.DSPGraphModule.dll
UnityEngine.GameCenterModule.dll
UnityEngine.GIModule.dll
UnityEngine.GridModule.dll
UnityEngine.HotReloadModule.dll
UnityEngine.ImageConversionModule.dll
UnityEngine.IMGUIModule.dll
UnityEngine.InputLegacyModule.dll
UnityEngine.InputModule.dll
UnityEngine.JSONSerializeModule.dll
UnityEngine.LocalizationModule.dll
UnityEngine.ParticleSystemModule.dll
UnityEngine.PerformanceReportingModule.dll
UnityEngine.Physics2DModule.dll
UnityEngine.PhysicsModule.dll
UnityEngine.ProfilerModule.dll
UnityEngine.PropertiesModule.dll
UnityEngine.RuntimeInitializeOnLoadManagerInitializerModule.dll
UnityEngine.ScreenCaptureModule.dll
UnityEngine.SharedInternalsModule.dll
UnityEngine.SpriteMaskModule.dll
UnityEngine.SpriteShapeModule.dll
UnityEngine.StreamingModule.dll
UnityEngine.SubstanceModule.dll
UnityEngine.SubsystemsModule.dll
UnityEngine.TerrainModule.dll
UnityEngine.TerrainPhysicsModule.dll
UnityEngine.TextCoreFontEngineModule.dll
UnityEngine.TextCoreTextEngineModule.dll
UnityEngine.TextRenderingModule.dll
UnityEngine.TilemapModule.dll
UnityEngine.TLSModule.dll
UnityEngine.UIElementsModule.dll
UnityEngine.UIModule.dll
UnityEngine.UmbraModule.dll
UnityEngine.UnityAnalyticsCommonModule.dll
UnityEngine.UnityAnalyticsModule.dll
UnityEngine.UnityConnectModule.dll
UnityEngine.UnityCurlModule.dll
UnityEngine.UnityTestProtocolModule.dll
UnityEngine.UnityWebRequestAssetBundleModule.dll
UnityEngine.UnityWebRequestAudioModule.dll
UnityEngine.UnityWebRequestModule.dll
UnityEngine.UnityWebRequestTextureModule.dll
UnityEngine.UnityWebRequestWWWModule.dll
UnityEngine.VehiclesModule.dll
UnityEngine.VFXModule.dll
UnityEngine.VideoModule.dll
UnityEngine.VRModule.dll
UnityEngine.WindModule.dll
UnityEngine.XRModule.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/NetStandard/compat/2.1.0/shims/netfx/
mscorlib.dll
System.ComponentModel.Composition.dll
System.Core.dll
System.Data.dll
System.dll
System.Drawing.dll
System.IO.Compression.FileSystem.dll
System.Net.dll
System.Numerics.dll
System.Runtime.Serialization.dll
System.ServiceModel.Web.dll
System.Transactions.dll
System.Web.dll
System.Windows.dll
System.Xml.dll
System.Xml.Linq.dll
System.Xml.Serialization.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/NetStandard/compat/2.1.0/shims/netstandard/
Microsoft.Win32.Primitives.dll
System.AppContext.dll
System.Buffers.dll
System.Collections.Concurrent.dll
System.Collections.dll
System.Collections.NonGeneric.dll
System.Collections.Specialized.dll
System.ComponentModel.dll
System.ComponentModel.EventBasedAsync.dll
System.ComponentModel.Primitives.dll
System.ComponentModel.TypeConverter.dll
System.Console.dll
System.Data.Common.dll
System.Diagnostics.Contracts.dll
System.Diagnostics.Debug.dll
System.Diagnostics.FileVersionInfo.dll
System.Diagnostics.Process.dll
System.Diagnostics.StackTrace.dll
System.Diagnostics.TextWriterTraceListener.dll
System.Diagnostics.Tools.dll
System.Diagnostics.TraceSource.dll
System.Diagnostics.Tracing.dll
System.Drawing.Primitives.dll
System.Dynamic.Runtime.dll
System.Globalization.Calendars.dll
System.Globalization.dll
System.Globalization.Extensions.dll
System.IO.Compression.dll
System.IO.Compression.ZipFile.dll
System.IO.dll
System.IO.FileSystem.dll
System.IO.FileSystem.DriveInfo.dll
System.IO.FileSystem.Primitives.dll
System.IO.FileSystem.Watcher.dll
System.IO.IsolatedStorage.dll
System.IO.MemoryMappedFiles.dll
System.IO.Pipes.dll
System.IO.UnmanagedMemoryStream.dll
System.Linq.dll
System.Linq.Expressions.dll
System.Linq.Parallel.dll
System.Linq.Queryable.dll
System.Memory.dll
System.Net.Http.dll
System.Net.NameResolution.dll
System.Net.NetworkInformation.dll
System.Net.Ping.dll
System.Net.Primitives.dll
System.Net.Requests.dll
System.Net.Security.dll
System.Net.Sockets.dll
System.Net.WebHeaderCollection.dll
System.Net.WebSockets.Client.dll
System.Net.WebSockets.dll
System.Numerics.Vectors.dll
System.ObjectModel.dll
System.Reflection.DispatchProxy.dll
System.Reflection.dll
System.Reflection.Emit.dll
System.Reflection.Emit.ILGeneration.dll
System.Reflection.Emit.Lightweight.dll
System.Reflection.Extensions.dll
System.Reflection.Primitives.dll
System.Resources.Reader.dll
System.Resources.ResourceManager.dll
System.Resources.Writer.dll
System.Runtime.CompilerServices.VisualC.dll
System.Runtime.dll
System.Runtime.Extensions.dll
System.Runtime.Handles.dll
System.Runtime.InteropServices.dll
System.Runtime.InteropServices.RuntimeInformation.dll
System.Runtime.Numerics.dll
System.Runtime.Serialization.Formatters.dll
System.Runtime.Serialization.Json.dll
System.Runtime.Serialization.Primitives.dll
System.Runtime.Serialization.Xml.dll
System.Security.Claims.dll
System.Security.Cryptography.Algorithms.dll
System.Security.Cryptography.Csp.dll
System.Security.Cryptography.Encoding.dll
System.Security.Cryptography.Primitives.dll
System.Security.Cryptography.X509Certificates.dll
System.Security.Principal.dll
System.Security.SecureString.dll
System.Text.Encoding.dll
System.Text.Encoding.Extensions.dll
System.Text.RegularExpressions.dll
System.Threading.dll
System.Threading.Overlapped.dll
System.Threading.Tasks.dll
System.Threading.Tasks.Extensions.dll
System.Threading.Tasks.Parallel.dll
System.Threading.Thread.dll
System.Threading.ThreadPool.dll
System.Threading.Timer.dll
System.ValueTuple.dll
System.Xml.ReaderWriter.dll
System.Xml.XDocument.dll
System.Xml.XmlDocument.dll
System.Xml.XmlSerializer.dll
System.Xml.XPath.dll
System.Xml.XPath.XDocument.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/NetStandard/
Extensions/2.0.0/System.Runtime.InteropServices.WindowsRuntime.dll
ref/2.1.0/netstandard.dll
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/PlaybackEngines/AndroidPlayer/
Unity.Android.Gradle.dll
Unity.Android.GradleProject.dll
Unity.Android.Types.dll
Assets/Firebase/Plugins/
Firebase.Analytics.dll
Firebase.App.dll
Firebase.Auth.dll
Firebase.Platform.dll
Firebase.TaskExtension.dll
Google.MiniJson.dll
iOS/Firebase.Messaging.dll
Assets/Plugins/
DOTween/DOTween.dll
net2.0/zxing.dll
Newtonsoft.Json.dll
Library/
PackageCache/com.unity.visualscripting@1.9.4/Runtime/VisualScripting.Flow/Dependencies/NCalc/Unity.VisualScripting.Antlr3.Runtime.dll
ScriptAssemblies/
Unity.2D.Sprite.Editor.dll
Unity.AssetBundleBrowser.Editor.dll
Unity.Mobile.AndroidLogcat.Editor.dll
Unity.Rider.Editor.dll
Unity.Timeline.dll
Unity.Timeline.Editor.dll
Unity.VisualScripting.Core.dll
Unity.VisualScripting.Core.Editor.dll
Unity.VisualScripting.Flow.dll
Unity.VisualScripting.Flow.Editor.dll
Unity.VisualScripting.SettingsProvider.Editor.dll
Unity.VisualScripting.Shared.Editor.dll
Unity.VisualScripting.State.dll
Unity.VisualScripting.State.Editor.dll
Unity.VisualStudio.Editor.dll
Unity.VSCode.Editor.dll
UnityEditor.UI.dll
UnityEngine.UI.dll
Temp/bin/Debug/
Assembly-CSharp-firstpass.dll
FirebaseMessagingActivityGenerator.dll
NativeGallery.Editor.dll
NativeGallery.Runtime.dll
[analyzerReferences]
../../Unity/2022.3.62f1c1/2022.3.62f1c1/Editor/Data/Tools/Unity.SourceGenerators/
Unity.Properties.SourceGenerator.dll
Unity.SourceGenerators.dll
C:/Users/YQC/.vscode/extensions/visualstudiotoolsforunity.vstuc-1.2.2/Analyzers/Microsoft.Unity.Analyzers.dll
[analyzerConfigFiles]
Temp/obj/Debug/Assembly-CSharp/Assembly-CSharp.GeneratedMSBuildEditorConfig.editorconfig

View File

@ -0,0 +1,5 @@
---
alwaysApply: true
scene: git_message
---
使用中文编写提交信息

8
Assets/AppleAuth.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 91b206d67c05b48dbaaf58ddab34a634
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,163 @@
# Changelog
## [Unreleased]
### Added
### Changed
### Removed
## [1.5.0] - 2025-06-08
### Breaking ⚠️⚠️⚠️
- **GitHub import URL updated.** The package must now be imported using a `?path=Source` URL suffix, and tags no longer include a `v` prefix. This is a breaking change for users importing directly from GitHub.
#### Previous GitHub import (before 1.5.0):
```jsonc
"dependencies": {
"com.lupidan.apple-signin-unity": "https://github.com/lupidan/apple-signin-unity.git#v1.4.4"
}
```
#### Updated GitHub import (starting from 1.5.0):
```jsonc
"dependencies": {
"com.lupidan.apple-signin-unity": "https://github.com/lupidan/apple-signin-unity.git?path=Source#1.5.0"
}
```
### Changed
- Fixed issue with native files not being included in visionOS builds.
- Fixed issue with header files not being included in tvOS builds.
- Reworked package structure and folders to more closely follow Unity's package layout guidelines.
- Updated macOS helper method in `AppleAuthMacosPostprocessorHelper.FixManagerBundleIdentifier` to better locate the `.app` or `.xcodeproj` bundle.
### Removed
- Removed unnecessary `.meta` files inside the `MacOSAppleAuthManager.bundle` to avoid unintended asset import or warnings in Unity.
## [1.4.4] - 2024-11-03
### Changed
- Updates `AddSignInWithAppleWithCompatibility` to support new public constructor for `PBXCapabilityType` introduced in Unity 6000.0.23f1
- Updates `AddSignInWithAppleWithCompatibility` to automatically handle the target to add the compatibility and add the framework. It´s no longer required to provide manually the Unity Framework target.
- Added basic support for visionOS
- Increased minimum Unity Version to 2020.3.48f1
## [1.4.3] - 2023-09-30
### Changed
- Updates `AddSignInWithAppleWithCompatibility` to support new public constructor for `PBXCapabilityType` introduced in Unity 2022.3.10
- Increases minimum target for the macOS bundle to 10.13
### Added
- Add `ToString` override to `AppleError`
## [1.4.2] - 2020-07-17
### Changed
- Handles empty `NSPersonNameComponents` sent by Apple when not requesting a name, to be `nil` natively.
- Updated `MacOSAppleAuthManager.bundle` with the updated native code
### Removed
- Removes `FixSerializationForFullPersonName` and any usage of it when deserializing to avoid NRE
## [1.4.1] - 2020-11-28
### Added
- Updates plugin's main `MacOSAppleAuthManager.bundle` to support Apple Silicon `arm64` architecture
### Changed
- Updates some elements in the dedicated macOS documentation file that were incorrect
## [1.4.0] - 2020-10-18
### Added
- Adds static class `AppleAuthMacosPostprocessorHelper`, so now there should always be an AppleAuth.Editor namespace independent of the current platform.
- Adds static method to `AppleAuthMacosPostprocessorHelper`, `FixManagerBundleIdentifier` is a method to change the plugin's bundle identifier to a custom one based on the current project's application identifier. This should avoid CFBundleIdentifier collision errors when uploading to the MacOS App Store.
- Adds enum value for `LoginOptions` to not request full name or email, `LoginOptions.None`.
### Changed
- Updates sample code Postprocessor script to support the new recommended post processing for macOS builds
## [1.3.0] - 2020-07-18
### Added
- Adds support to set the `State` when making a Login or a Quick Login request to sign in with Apple.
- Improves deserialization for the data.
### Changed
- Makes the parsed classes `internal` to force the usage of the interfaces.
- Minor changes for lower C# compatibility
- `GetAuthorizationErrorCode` no longer returns a nullable reference type. If the error can't be obtained, it returns `Unknown` instead.
## [1.2.0] - 2020-05-16
### Added
- Updates native code to support macOS, including NSPersonNameComponents support.
- Adds Xcode project `MacOSAppleAuthManager/MacOSAppleAuthManager.xcodeproj` to generate `MacOSAppleAuthManager.bundle` reusing existing iOS objective-c files. Bundle identifier is `com.lupidan.MacOSAppleAuthManager`. Minimum macOS version supported is 10.9.
- Makes it so compiling the Xcode project automatically updates the `MacOSAppleAuthManager.bundle` inside `AppleAuth/Native/macOS`
- Adds *unsigned precompiled* `MacOSAppleAuthManager.bundle`.
- Adds `LandscapeSampleScene.unity` scene for a Landscape version to use on macOS builds.
- Adds `macOS_NOTES.md` readme dedicated to macOS codesigning.
- Adds details to install the plugin with ![OpenUPM](https://openupm.com/) in `README.md`
### Changed
- Fixes PostProcessing for Unity 2019.3
- Renamed plugin´s extension method for `ProjectCapabilityManager` to avoid conflicts with the method added in Unity 2019.3. New method name is `AddSignInWithAppleWithCompatibility`.
- Namespace `AppleAuth.IOS.NativeMessages` becomes `AppleAuth.NativeMessages`
- Modified slightly implementation for Person name formatting
- Modified native implementation of AppleAuthManager to support macOS
## [1.1.0] - 2020-02-20
### Added
- Adds a CHANGELOG.md file
- Adds support for tvOS (Experimental)
- Adds new v2 diagram files (`.drawio` and `.png`)
- Adds `AppleAuthQuickLoginArgs` struct containing arguments for Quick Login. (With optional `Nonce`)
- Adds `AppleAuthLoginArgs` structure containing arguments for Normal Login like `LoginOptions`. (With optional `Nonce`)
- Adds support in native code to receive and set a `Nonce` for the Authorization Requests in both Quick Login and Sign in With Apple
- Adds `Update` method to `IAppleAuthManager` to update pending callbacks
- Better API version handling in native objective-c code
### Changed
- Namespace `AppleAuth.IOS` becomes `AppleAuth`
- Namespace `AppleAuth.IOS.Enums` becomes `AppleAuth.Enums`
- Namespace `AppleAuth.IOS.Extensions` becomes `AppleAuth.Extensions`
- Namespace `AppleAuth.IOS.Interfaces` becomes `AppleAuth.Interfaces`
- Namespace `AppleAuth.IOS.Interfaces` becomes `AppleAuth.Interfaces`
- `QuickLogin` now requires a `AppleAuthQuickLoginArgs` to perform the call. Other `QuickLogin` method marked as obsolete.
- `LoginWithAppleId` now requires a `AppleAuthLoginArgs` to perform the call. Other `LoginWithAppleId` method marked as obsolete.
- `AppleAuthManager` no longer requires a Scheduler, the scheduling is built in the manager instance with the method `Update`
- When receiving a completely empty `FullPersonName`, the instance is cleared after deserialization.
- Fixes bug when setting credentials revoked callback between multiple instances of `AppleAuthManager`
- Updates main package file to include both `CHANGELOG.md` and `CHANGELOG.md.meta files`
- Updates the sample project to better resemble the expected Apple flow
- Updates README.md with up to date documentation
### Removed
- Removes Schedulers to simplify the callback handling. `Update` call was moved to `IAppleAuthManager`.
## [1.0.0] - 2020-01-23
- No plugin code changes. Just making the v1.0.0 release. No more "preview package"
- Adding FAQ to the README
## [0.4.0] - 2019-09-24
- Support to stop listening to credential revoked notifications by setting the callback to null
- Implemented a nicer example of the plugin, and rearranged the code
## [0.3.0] - 2019-09-20
- Rearranged files to support for Unity Package Manager
- Made code more compatible with earlier C# versions
- Updated logic for the whole flow
- More documentation in the Readme
## [0.2] - 2019-08-04
- Some more documentation was added
- Added support to listen to Revoked Credentials notifications
- Solved possible crashes that could happen when trying to execute a callback in the Native Message Handler, if the callback was to throw an exception, the application would crash.
[Unreleased]: https://github.com/lupidan/apple-signin-unity/compare/1.5.0...HEAD
[1.5.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.5...1.5.0
[1.4.4]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.3...v1.4.4
[1.4.3]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.2...v1.4.3
[1.4.2]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.1...v1.4.2
[1.4.1]: https://github.com/lupidan/apple-signin-unity/compare/v1.4.0...v1.4.1
[1.4.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.3.0...v1.4.0
[1.3.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.1.0...v1.2.0
[1.1.0]: https://github.com/lupidan/apple-signin-unity/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/lupidan/apple-signin-unity/compare/v0.4.0...v1.0.0
[0.4.0]: https://github.com/lupidan/apple-signin-unity/compare/0.3.0...v0.4.0
[0.3.0]: https://github.com/lupidan/apple-signin-unity/compare/0.2...0.3.0
[0.2]: https://github.com/lupidan/apple-signin-unity/releases/tag/0.2

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 47ff82dfcc8d54955808810c30492220
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2683684c06ae246f782efec99ab8b10a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
{
"name": "AppleAuth.Editor",
"references": [
"AppleAuth"
],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7c9906f2a983d41fca79999faa6934e6
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,105 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
namespace AppleAuth.Editor
{
public static class AppleAuthMacosPostprocessorHelper
{
/// <summary>
/// Use this script to change the bundle identifier of the plugin's library bundle to replace it with a personalized one for your product.
/// This should avoid CFBundleIdentifier Collision errors when uploading the app to the macOS App Store
/// </summary>
/// <remarks>Basically this should replace the plugin's bundle identifier from "com.lupidan.MacOSAppleAuthManager" to "{your.project.application.identifier}.MacOSAppleAuthManager"</remarks>
/// <param name="target">The current build target, so it's only executed when building for MacOS</param>
/// <param name="path">The path of the built .app file</param>
public static void FixManagerBundleIdentifier(BuildTarget target, string path)
{
if (target != BuildTarget.StandaloneOSX)
{
throw new Exception(GetMessage("FixManagerBundleIdentifier should only be called when building for macOS"));
}
try
{
var macosAppleAuthManagerInfoPlistPath = GetInfoPlistPath(path);
var macosAppleAuthManagerInfoPlist = File.ReadAllText(macosAppleAuthManagerInfoPlistPath);
var regex = new Regex(@"\<key\>CFBundleIdentifier\<\/key\>\s*\<string\>(com\.lupidan)\.MacOSAppleAuthManager\<\/string\>");
var match = regex.Match(macosAppleAuthManagerInfoPlist);
if (!match.Success)
{
throw new Exception(GetMessage("Can't locate CFBundleIdentifier in MacOSAppleAuthManager's Info.plist"));
}
var modifiedMacosAppleAuthManagerInfoPlist = macosAppleAuthManagerInfoPlist
.Remove(match.Groups[1].Index, match.Groups[1].Length)
.Insert(match.Groups[1].Index, PlayerSettings.applicationIdentifier);
File.WriteAllText(macosAppleAuthManagerInfoPlistPath, modifiedMacosAppleAuthManagerInfoPlist);
Debug.Log(GetMessage($"Renamed MacOSAppleAuthManager.bundle bundle identifier from \"com.lupidan.MacOSAppleAuthManager\" -> \"{PlayerSettings.applicationIdentifier}.MacOSAppleAuthManager\""));
}
catch (Exception exception)
{
throw new Exception(GetMessage(
$"Error while fixing MacOSAppleAuthManager.bundle bundle identifier :: {exception.Message}"));
}
}
private static string GetMessage(string message) => $"{nameof(AppleAuthMacosPostprocessorHelper)}: {message}";
private static string GetInfoPlistPath(string path)
{
const string bundleName = "MacOSAppleAuthManager.bundle";
var possibleRootPaths = new List<string>();
if (Directory.Exists(path))
{
possibleRootPaths.Add(path);
}
if (Directory.Exists($"{path}.app"))
{
possibleRootPaths.Add($"{path}.app");
}
var bundleDirectories = possibleRootPaths
.SelectMany(possibleRootPath => Directory.GetDirectories(
possibleRootPath,
bundleName,
SearchOption.AllDirectories))
.ToArray();
if (bundleDirectories.Length == 0)
{
throw new Exception(GetMessage($"Can't locate any {bundleName}"));
}
if (bundleDirectories.Length > 1)
{
var allPaths = string.Join("\n", bundleDirectories);
throw new Exception(GetMessage($"Located multiple {bundleName}!\n{allPaths}"));
}
var bundlePath = bundleDirectories[0];
Debug.Log(GetMessage($"Located {bundleName} at {bundlePath}"));
var infoPlistPath = Path.Combine(
bundlePath,
"Contents",
"Info.plist");
if (!File.Exists(infoPlistPath))
{
throw new Exception(GetMessage("Can't locate MacOSAppleAuthManager's Info.plist"));
}
Debug.Log(GetMessage($"Located Info.plist at {infoPlistPath}"));
return infoPlistPath;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 244ee337f35d04f1c91b7f450fb421e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,90 @@
#if UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS
using System;
using System.Reflection;
using UnityEditor.iOS.Xcode;
namespace AppleAuth.Editor
{
public static class ProjectCapabilityManagerExtension
{
/// <summary>
/// Extension method for ProjectCapabilityManager to add the Sign In With Apple capability in compatibility mode.
/// In particular, adds the AuthenticationServices.framework as an Optional framework, preventing crashes in
/// iOS versions previous to 13.0
/// </summary>
/// <param name="manager">The manager for the main target to use when adding the Sign In With Apple capability.</param>
public static void AddSignInWithAppleWithCompatibility(this ProjectCapabilityManager manager)
{
const BindingFlags bindingFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
var managerType = typeof(ProjectCapabilityManager);
var projectField = managerType.GetField("project", bindingFlags);
var entitlementFilePathField = managerType.GetField("m_EntitlementFilePath", bindingFlags);
var targetGuidField = managerType.GetField("m_TargetGuid", bindingFlags);
var getOrCreateEntitlementDocMethod = managerType.GetMethod("GetOrCreateEntitlementDoc", bindingFlags);
if (projectField == null ||
entitlementFilePathField == null ||
targetGuidField == null ||
getOrCreateEntitlementDocMethod == null)
throw new Exception("Can't Add Sign In With Apple programatically in this Unity version.");
var entitlementFilePath = entitlementFilePathField.GetValue(manager) as string;
var entitlementDoc = (PlistDocument) getOrCreateEntitlementDocMethod.Invoke(manager, new object[] { });
if (entitlementDoc != null)
{
var plistArray = new PlistElementArray();
plistArray.AddString("Default");
entitlementDoc.root["com.apple.developer.applesignin"] = plistArray;
}
var project = (PBXProject) projectField.GetValue(manager);
var emptyCapability = GetEmptyCapabilityWithReflection();
var mainTargetGuid = (string)targetGuidField.GetValue(manager);
#if UNITY_2019_3_OR_NEWER
var frameworkTargetGuid = project.GetUnityFrameworkTargetGuid();
#else
var frameworkTargetGuid = mainTargetGuid;
#endif
project.AddFrameworkToProject(frameworkTargetGuid, "AuthenticationServices.framework", true);
project.AddCapability(mainTargetGuid, emptyCapability, entitlementFilePath);
}
private static PBXCapabilityType GetEmptyCapabilityWithReflection()
{
// For Unity version >= 6000.0.23f1
var constructorInfo = typeof(PBXCapabilityType)
.GetConstructor(
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
null,
new[] {typeof(bool), typeof(string), typeof(bool)},
null);
if (constructorInfo != null)
{
return (PBXCapabilityType) constructorInfo
.Invoke(new object[] {true, string.Empty, true});
}
// For Unity version < 6000.0.23f1
constructorInfo = typeof(PBXCapabilityType)
.GetConstructor(
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance,
null,
new[] {typeof(string), typeof(bool), typeof(string), typeof(bool)},
null);
if (constructorInfo != null)
{
return (PBXCapabilityType) constructorInfo
.Invoke(new object[] {"com.lupidan.apple-signin-unity.empty", true, string.Empty, true});
}
throw new Exception("Can't create empty capability in this Unity version.");
}
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f6bbae2bfef6749998d8b2f368d2aaff
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,9 @@
Copyright (c) 2019 Daniel Lupiañez Casares
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 42adfd64036c64657b1ece38984402c3
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

532
Assets/AppleAuth/README.md Normal file
View File

@ -0,0 +1,532 @@
<p align="center">
<img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/SignInWithApple.png" alt="Sign in With Apple"/><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/UnityIcon.png" alt="Unity 3D"/>
</p>
# Sign in with Apple Unity Plugin
by **Daniel Lupiañez Casares**
[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub)](https://github.com/sponsors/lupidan)
[![Release](https://img.shields.io/github/v/release/lupidan/apple-signin-unity?style=for-the-badge!)](https://github.com/lupidan/apple-signin-unity/releases)
[![License](https://img.shields.io/github/license/lupidan/apple-signin-unity.svg)](https://github.com/lupidan/apple-signin-unity/blob/master/LICENSE.md)
[![CHANGELOG](https://img.shields.io/badge/-CHANGELOG-informational)](https://github.com/lupidan/apple-signin-unity/blob/master/CHANGELOG.md)
[![openupm](https://img.shields.io/npm/v/com.lupidan.apple-signin-unity?label=openupm&registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.lupidan.apple-signin-unity/)
[![Stars](https://img.shields.io/github/stars/lupidan/apple-signin-unity.svg?style=social)](https://github.com/lupidan/apple-signin-unity/stargazers)
[![Followers](https://img.shields.io/github/followers/lupidan.svg?style=social)](https://github.com/lupidan?tab=followers)
<p align="center">
<a href="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/SCRN01.png"><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/SCRN01.png" alt="Screenshot1" height="400"/></a>
<a href="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/SCRN02.png"><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/SCRN02.png" alt="Screenshot1" height="400"/></a>
<a href="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/SCRN03.png"><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/SCRN03.png" alt="Screenshot2" height="400"/></a>
</p>
* [Overview](#overview)
* [Features](#features)
+ [Native Sign in with Apple](#native-sign-in-with-apple)
* [Installation](#installation)
+ [Unity Package Manager](#unity-package-manager)
- [Install via Git URL](#install-via-git-url)
- [Install via OpenUPM](#install-via-openupm)
+ [Unity Package File](#unity-package-file)
* [Plugin setup (iOS/tvOS)](#plugin-setup-iostvos)
+ [Programmatic setup with a Script](#programmatic-setup-with-a-script)
+ [Manual entitlements setup](#manual-entitlements-setup)
+ [Enabling Apple capability](#enabling-apple-capability)
+ [Final notes regarding setup](#final-notes-regarding-setup)
* [Plugin setup (macOS)](#plugin-setup-macos)
* [Implement Sign in With Apple](#implement-sign-in-with-apple)
+ [Initializing](#initializing)
+ [Perform Sign In With Apple](#perform-sign-in-with-apple)
+ [Quick login](#quick-login)
+ [Checking credential status](#checking-credential-status)
+ [Listening to credentials revoked notification](#listening-to-credentials-revoked-notification)
+ [Nonce and State support for Authorization Requests](#nonce-and-state-support-for-authorization-requests)
* [FAQ](#faq)
+ [Does it support landscape orientations?](#does-it-support-landscape-orientations)
+ [How can I Logout? Does the plugin provide any Logout option?](#how-can-i-logout-does-the-plugin-provide-any-logout-option)
+ [I am not getting a full name, or an email, even though I am requesting them in the LoginWithAppleId call](#i-am-not-getting-a-full-name-or-an-email-even-though-i-am-requesting-them-in-the-loginwithappleid-call)
+ [Is it possible to NOT request the user's email or full name?](#is-it-possible-to-not-request-the-users-email-or-full-name)
+ [Does the plugin use UnitySendMessage?](#does-the-plugin-use-unitysendmessage)
+ [Why do I need to call Update manually on the AppleAuthManager instance?](#why-do-i-need-to-call-update-manually-on-the-appleAuthManager-instance)
+ [What deserialization library does it use by default?](#what-deserialization-library-does-it-use-by-default)
+ [Any way to get a refresh token after the first user authorization?](#any-way-to-get-a-refresh-token-after-the-first-user-authorization)
+ [I am getting a CFBundleIdentifier Collision error when uploading my app to the macOS App Store](#i-am-getting-a-cfbundleIdentifier-collision-error-when-uploading-my-app-to-the-macos-app-store)
## Overview
Sign in with Apple plugin to use with Unity 3D game engine.
This plugin supports the following platforms:
* **iOS**
* **macOS** Intel `x86_64` AND Apple Silicon `arm64`(Experimental) ([NOTES](./docs/macOS_NOTES.md))
* **tvOS** (Experimental)
* **visionOS** (Experimental)
The main purpose for this plugin is to expose Apple's newest feature, Sign in with Apple, to the Unity game engine.
On WWDC19, Apple announced **Sign in with Apple**, and on top of that, they announced that every iOS/tvOS/macOS Application
that used any kind of Third party sign-ins (like *Sign in with Facebook*, or *Sign in with Google*), will have to support
Sign in with Apple in order to get approved for the App Store, making it **mandatory**.
## Features
### Native Sign in with Apple
- Support for iOS
- Support for macOS: Intel `x86_64` AND Apple Silicon `arm64`(Experimental) ([NOTES](./docs/macOS_NOTES.md))
- Support for tvOS (Experimental)
- Support for visionOS (Experimental)
- Supports Sign in with Apple, with customizable scopes (Email and Full name).
- Supports Get Credential status (Authorized, Revoked and Not Found).
- Supports Quick login (including iTunes Keychain credentials).
- Supports adding Sign In with Apple capability to Xcode project programatically in a PostBuild script.
- Supports listening to Credentials Revoked notifications.
- Supports setting custom Nonce and State for authorization requests when Signing In, and attempting a Quick Login.
- NSError mapping so no details are missing.
- NSPersonNameComponents support (for ALL different styles).
- Customizable serialization (uses Unity default serialization, but you can add your own implementation)
## Installation
> Current stable version is 1.5.0
There are two options available to install this plugin. Either using the Unity Package Manager, or the traditional `.unitypackage` file.
### Unity Package Manager
#### Install via Git URL
Available starting from Unity 2020.3.
Just add this line to the `Packages/manifest.json` file of your Unity Project:
```json
"dependencies": {
"com.lupidan.apple-signin-unity": "https://github.com/lupidan/apple-signin-unity.git?path=Source#1.5.0",
}
```
#### Install via OpenUPM
The package is available on the [openupm registry](https://openupm.com). You can install it via [openupm-cli](https://github.com/openupm/openupm-cli).
```
openupm add com.lupidan.apple-signin-unity
```
### Unity Package File
1. Download the most recent Unity package release [here](https://github.com/lupidan/apple-signin-unity/releases)
2. Import the downloaded Unity package in your app. There are two main folders:
* The `AppleAuth` folder contains the **main plugin**.
* The `AppleAuthSample` folder contains **sample code** to use as a reference, or to test the plugin.
![Import detail](https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/ImportPlugin.png)
## Plugin setup (iOS/tvOS)
To be able to use Apple's platform and framework for Authenticating with an Apple ID, we need to set up our Xcode project. Two different options are available to set up the entitlements required to enable Apple ID authentication with the iOS SDK.
### Programmatic setup with a Script
*RECOMMENDED*
This plugin **provides an extension method** for `ProjectCapabilityManager` ([docs](https://docs.unity3d.com/ScriptReference/iOS.Xcode.ProjectCapabilityManager.html)), used to add this entitlement programatically after an Xcode build has finished.
Simply create a Post Processing build script ([more info](https://docs.unity3d.com/ScriptReference/Callbacks.PostProcessBuildAttribute.html)) that performs the call. If you already have a post process build script, it should be simple to add to your code.
The provided extension method is `AddSignInWithAppleWithCompatibility`.
Sample code:
```csharp
using AppleAuth.Editor;
public static class SignInWithApplePostprocessor
{
[PostProcessBuild(1)]
public static void OnPostProcessBuild(BuildTarget target, string path)
{
if (target != BuildTarget.iOS)
return;
var projectPath = PBXProject.GetPBXProjectPath(path);
var project = new PBXProject();
project.ReadFromString(System.IO.File.ReadAllText(projectPath));
var manager = new ProjectCapabilityManager(projectPath, "Entitlements.entitlements", null, project.GetUnityMainTargetGuid());
manager.AddSignInWithAppleWithCompatibility();
manager.WriteToFile();
}
}
```
### Manual entitlements setup
The other option is to manually setup all the entitlements in our Xcode project. Note that when making an iOS Build from Unity into the same folder, if you choose the option to overwrite, you will need to perform the Manual setup again.
1. In your generated Xcode project. Select the main app Unity-iPhone target and select the option *Signing And Capabilities*. You should see there an option to add a capability from a list. Just locate *Sign In With Apple* and add it to your project.
<p align="center">
<a href="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/AddEntitlements.png"><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/AddEntitlements.png" alt="Add Entitlements" width="400"/></a>
</p>
2. This should have added an Entitlements file to your project. Locate it on the project explorer (it should be a file with the extension `.entitlements`). Inside it you should see an entry like this one:
<p align="center">
<a href="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/EntitlementsDetail.png"><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/EntitlementsDetail.png"/></a>
</p>
3. You need to import the `AuthenticationServices.framework` library in the Build Phases->Link Binary with Libraries. **If you are targeting older iOS versions**, mark the library as `Optional`.
For **Unity 2019.3** onwards, add it to the UnityFramework target
For **previous Unity versions**, add it to the main Unity-iPhone target
<p align="center">
<a href="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/AddFramework20193.png"><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/AddFramework20193.png" alt="Add Framework 2019.3" width="400"/></a>
<a href="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/AddFrameworkPrevious.png"><img src="https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/AddFrameworkPrevious.png" alt="Add Framework Previous versions" width="400"/></a>
</p>
### Enabling Apple capability
You will also need to **setup everything** in the Apple's developer portal. More information can be found [here](https://help.apple.com/developer-account/#/devde676e696). Please remember this plugin only supports native Sign In With Apple on iOS (no REST API support).
There is also a [Getting Started site](https://developer.apple.com/sign-in-with-apple/get-started/).
### Final notes regarding setup
The `AuthenticationServices.framework` should be added as Optional, to support previous iOS versions, avoiding crashes at startup.
The provided extension method uses reflection to integrate with the current tools Unity provides. It has been tested with Unity 2020.x, 2021.x, 2022.x and 6000.0. But if it fails on your particular Unity version, feel free to open a issue, specifying the Unity version.
## Plugin setup (visionOS)
On visionOS, the setup is pretty much the same as the iOS/tvOS setup.
However, due to how Unity's visionOS project is exported, you need to adapt the Postprocess code to find the proper xcode project filename:
if (target == BuildTarget.VisionOS)
{
projectPath = projectPath.Replace("Unity-iPhone.xcodeproj", "Unity-VisionOS.xcodeproj");
}
## Plugin setup (macOS)
An unsigned precompiled `.bundle` file is available. The precompiled `.bundle` should support both architectures: Intel `x86_64` & Apple Silicon `arm64`(Experimental). The bundle should be automatically included in your macOS builds.
However that `.bundle` needs to be modified to avoid issues when uploading it to the MacOS App Store.
In particular, the bundle identifier of that `.bundle` needs to be modified to a custom one.
To automate the process, there is a helper method that will change the bundle identifier to one based on your project's application identifier.
You should call this method on a Postprocess build script of your choice.
```csharp
using AppleAuth.Editor;
public static class SignInWithApplePostprocessor
{
[PostProcessBuild(1)]
public static void OnPostProcessBuild(BuildTarget target, string path)
{
if (target != BuildTarget.StandaloneOSX)
return;
AppleAuthMacosPostprocessorHelper.FixManagerBundleIdentifier(target, path);
}
}
```
The Xcode project with the source code to generate a new bundle file is available at `MacOSAppleAuthManager/MacOSAppleAuthManager.xcodeproj`
To support the feature, **the app needs to be codesigned correctly**, including the required entitlements. For more information regarding macOS codesign, please follow this [link](./docs/macOS_NOTES.md).
## Implement Sign in With Apple
> Currently, it seems Sign In With Apple does not work properly in the simulator. This needs testing on a device with an iOS 13 version.
An overall flow of how the native Sign In With Apple flow could work is presented in this diagram.
![Frameworks detail](https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/AppleSignInFlow_v3.png)
### Initializing
```csharp
private IAppleAuthManager appleAuthManager;
void Start()
{
...
// If the current platform is supported
if (AppleAuthManager.IsCurrentPlatformSupported)
{
// Creates a default JSON deserializer, to transform JSON Native responses to C# instances
var deserializer = new PayloadDeserializer();
// Creates an Apple Authentication manager with the deserializer
this.appleAuthManager = new AppleAuthManager(deserializer);
}
...
}
void Update()
{
...
// Updates the AppleAuthManager instance to execute
// pending callbacks inside Unity's execution loop
if (this.appleAuthManager != null)
{
this.appleAuthManager.Update();
}
...
}
```
### Perform Sign In With Apple
> :warning: You will receive users's email and name **ONLY THE FIRST TIME THE USER LOGINS**. Any further login attempts **will have a NULL Email and FullName**, unless you [revoke the credentials](#how-can-i-logout-does-the-plugin-provide-any-logout-option)
If you want to Sign In and request the Email and Full Name for a user, you can do it like this:
```csharp
var loginArgs = new AppleAuthLoginArgs(LoginOptions.IncludeEmail | LoginOptions.IncludeFullName);
this.appleAuthManager.LoginWithAppleId(
loginArgs,
credential =>
{
// Obtained credential, cast it to IAppleIDCredential
var appleIdCredential = credential as IAppleIDCredential;
if (appleIdCredential != null)
{
// Apple User ID
// You should save the user ID somewhere in the device
var userId = appleIdCredential.User;
PlayerPrefs.SetString(AppleUserIdKey, userId);
// Email (Received ONLY in the first login)
var email = appleIdCredential.Email;
// Full name (Received ONLY in the first login)
var fullName = appleIdCredential.FullName;
// Identity token
var identityToken = Encoding.UTF8.GetString(
appleIdCredential.IdentityToken,
0,
appleIdCredential.IdentityToken.Length);
// Authorization code
var authorizationCode = Encoding.UTF8.GetString(
appleIdCredential.AuthorizationCode,
0,
appleIdCredential.AuthorizationCode.Length);
// And now you have all the information to create/login a user in your system
}
},
error =>
{
// Something went wrong
var authorizationErrorCode = error.GetAuthorizationErrorCode();
});
```
### Quick login
This should be the **first thing to try** when the user first runs the application.
If the user has previously authorized the app to login with Apple, this will open a native dialog to re-confirm the login, and obtain an Apple User ID.
If the credentials were never given, or they were revoked, the Quick login will fail.
![Frameworks detail](https://raw.githubusercontent.com/lupidan/apple-signin-unity/93e79cacc665fcd3930bda9e27e8cb27631ff1f7/Img/QuickLogin.png)
```csharp
var quickLoginArgs = new AppleAuthQuickLoginArgs();
this.appleAuthManager.QuickLogin(
quickLoginArgs,
credential =>
{
// Received a valid credential!
// Try casting to IAppleIDCredential or IPasswordCredential
// Previous Apple sign in credential
var appleIdCredential = credential as IAppleIDCredential;
// Saved Keychain credential (read about Keychain Items)
var passwordCredential = credential as IPasswordCredential;
},
error =>
{
// Quick login failed. The user has never used Sign in With Apple on your app. Go to login screen
});
```
Note that, if this succeeds, you will **ONLY** receive the Apple User ID (no email or name, even if it was previously requested).
#### IOS Keychain Support
When performing a quick login, if the SDK detects [IOS Keychain credentials](https://developer.apple.com/documentation/security/keychain_services/keychain_items?language=objc) for your app, it will return those.
Just cast the credential to `IPasswordCredential` to get the login details for the user.
### Checking credential status
This is used to verify that an Apple User ID is still valid.
Given an `userId` from a previous successful sign in.
You can check the credential state of that user ID like so:
```csharp
this.appleAuthManager.GetCredentialState(
userId,
state =>
{
switch (state)
{
case CredentialState.Authorized:
// User ID is still valid. Login the user.
break;
case CredentialState.Revoked:
// User ID was revoked. Go to login screen.
break;
case CredentialState.NotFound:
// User ID was not found. Go to login screen.
break;
}
},
error =>
{
// Something went wrong
});
```
### Listening to credentials revoked notification
It may be that your user suddenly decides to revoke the authorization that was given previously. You should be able to listen to the incoming notification by registering a callback for it.
```csharp
this.appleAuthManager.SetCredentialsRevokedCallback(result =>
{
// Sign in with Apple Credentials were revoked.
// Discard credentials/user id and go to login screen.
});
```
To clear the callback, and stop listening to notifications, simply set it to `null`
```csharp
this.appleAuthManager.SetCredentialsRevokedCallback(null);
```
### Nonce and State support for Authorization Requests
Both methods, `LoginWithAppleId` and `QuickLogin`, use a custom structure containing arguments for the authorization request.
An optional `Nonce` and an optional `State` can be set for both structures when constructing them:
```csharp
// Your custom Nonce string
var yourCustomNonce = "RANDOM_NONCE_FORTHEAUTHORIZATIONREQUEST";
var yourCustomState = "RANDOM_STATE_FORTHEAUTHORIZATIONREQUEST";
// Arguments for a normal Sign In With Apple Request
var loginArgs = new AppleAuthLoginArgs(
LoginOptions.IncludeEmail | LoginOptions.IncludeFullName,
yourCustomNonce,
yourCustomState);
// Arguments for a Quick Login
var quickLoginArgs = new AppleAuthQuickLoginArgs(yourCustomNonce, yourCustomState);
```
The `State` is returned later in the received Apple ID credential, allowing you to validate that the request was generated in your device.
The `Nonce` is embedded in the IdentityToken, included in the received Apple ID credential. It is important to generate a new random `Nonce` for every request. This is useful for services that provide a built in solution for **Sign In With Apple**, like [Firebase](https://firebase.google.com/docs/auth/ios/apple?authuser=0)
Some tentative guide is available for Firebase integration [here](./docs/Firebase_NOTES.md)
More info about State and Nonce can be found in [this WWDC 2020 session](https://developer.apple.com/videos/play/wwdc2020/10173/) (check at 2m35s)
## FAQ
+ [Does it support landscape orientations](#does-it-support-landscape-orientations)
+ [How can I Logout? Does the plugin provide any Logout option?](#how-can-i-logout-does-the-plugin-provide-any-logout-option)
+ [I am not getting a full name, or an email, even though I am requesting them in the LoginWithAppleId call](#i-am-not-getting-a-full-name-or-an-email-even-though-i-am-requesting-them-in-the-loginwithappleid-call)
+ [Is it possible to NOT request the user's email or full name?](#is-it-possible-to-not-request-the-users-email-or-full-name)
+ [Does the plugin use UnitySendMessage?](#does-the-plugin-use-unitysendmessage)
+ [Why do I need to call Update manually on the AppleAuthManager instance?](#why-do-i-need-to-call-update-manually-on-the-appleAuthManager-instance)
+ [What deserialization library does it use by default?](#what-deserialization-library-does-it-use-by-default)
+ [Any way to get a refresh token after the first user authorization?](#any-way-to-get-a-refresh-token-after-the-first-user-authorization)
### Does it support landscape orientations?
On **iOS 13.0**, Apple does not support landscape orientation for this feature. For more details, check this [issue](https://github.com/lupidan/apple-signin-unity/issues/5).
### How can I Logout? Does the plugin provide any Logout option?
On **iOS 13** Apple does not provide any method to *"logout"* programatically. If you want to *"logout"* and re-test account creation, you need to revoke the credentials through settings.
Go to `Settings` => `Click your iTunes user` => `Password & Security` => `Apple ID logins`. There you can select the app and click on `Stop using Apple ID`.
After this, the credentials are effectively revoked, your app will receive a [Credentials Revoked notification](#listening-to-credentials-revoked-notification). This will allow you to re-test account creation.
### I am not getting a full name, or an email, even though I am requesting them in the LoginWithAppleId call
This probably means that you already used Sign In with apple at some point. Apple will give you the email/name **ONLY ONCE**. Once the credential is created, __it's your app/game's responsibility to send that information somewhere__, so an account is created with the given user identifier.
If a credential was already created, you will only receive a user identifier, so it will work similarly to a Quick Login.
If you want to test new account scenarios, you need to [revoke](#how-can-i-logout-does-the-plugin-provide-any-logout-option) your app credentials for that Apple ID through the settings menu.
### Is it possible to NOT request the user's email or full name?
Yes, just provide `LoginOptions.None` when calling `LoginWithAppleId` and the user will not be asked for their email or full name.
This will skip that entire login step and make it more smooth. It is recommended if the user's email or full name is not used.
```csharp
appleAuthManager.LoginWithAppleId(LoginOptions.None, credential => { ... }, error => { ... });
```
### Does the plugin use UnitySendMessage?
No. The plugin uses callbacks in a static context with request identifiers using JSON strings. Callbacks are scheduled inside `AppleAuthManager`, and calling `Update` on it will execute those pending callbacks.
### Why do I need to call Update manually on the AppleAuthManager instance?
Callbacks from iOS SDK are executed in their own thread (normally the main thread), and outside Unity's engine control. Meaning that you can't update the UI, or worse, if your callback throws an Exception (like a simple NRE), it will crash the Game completely.
It's recommended to update the instance of `AppleAuthManager` regularly in a MonoBehaviour of your choice.
### What deserialization library does it use by default?
If you initialize the `AppleAuthManager` with the built-in `PayloadDeserializer`, it uses Unity JSON serialization system, so **no extra libraries are added**.
You can also implement your own deserialization by implementing an `IPayloadDeserializer`.
### Any way to get a refresh token on iOS to verify a user?
**NO**, That's not how Apple wants you to do it. This is how they want you to verify a user:
_On iOS:_ The first login gives you the Apple User ID and an Authorization Code to send to your backend. Checking the validity of a user on the device, from now on, should be done with `GetCredentialState` and that Apple User ID.
_On the server:_ It receives the data from the first login on iOS to create the user. Uses that received Authorization Code to get a refresh token for the user. Refreshes the token once a day.
[More info here](http://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/verifying_a_user)
### I am getting a CFBundleIdentifier Collision error when uploading my app to the macOS App Store:
If you are experiencing an error like this when uploading your macOS app to the App Store
> The info.plist CFBundleIdentifier value 'com.lupidan.MacOSAppleAuthManager" of 'appname.app/Contents/Plugins/MacOSAppleAuthManager.bundle' is already in use by another application"
It probably means that your [postprocess build script for macOS](#plugin-setup-macos) is not setup correctly.
You should call `AppleAuthMacosPostprocessorHelper.FixManagerBundleIdentifier` to fix the plugin's bundle identifier to a custom one for your app.
You can find more details about the bug [here](https://github.com/lupidan/apple-signin-unity/issues/72)

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9a7fbb4b439cc4d329fc4ece08c1d7bb
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e4b3990cf691541809dac7ec03c3ed9d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
{
"name": "AppleAuth"
}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: d2e6cf35637124bd3bae6e7160a590d7
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
using AppleAuth.Enums;
namespace AppleAuth
{
public struct AppleAuthLoginArgs
{
public readonly LoginOptions Options;
public readonly string Nonce;
public readonly string State;
public AppleAuthLoginArgs(
LoginOptions options,
string nonce = null,
string state = null)
{
this.Options = options;
this.Nonce = nonce;
this.State = state;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 935e1fe3ddaa24fa986b4a08d16ef677
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,338 @@
#if ((UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS || UNITY_STANDALONE_OSX) && !UNITY_EDITOR)
#define APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
#endif
using AppleAuth.Enums;
using AppleAuth.Interfaces;
using System;
namespace AppleAuth
{
public class AppleAuthManager : IAppleAuthManager
{
static AppleAuthManager()
{
const string versionMessage = "Using Sign in with Apple Unity Plugin - 1.5.0";
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
PInvoke.AppleAuth_LogMessage(versionMessage);
#else
UnityEngine.Debug.Log(versionMessage);
#endif
}
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
private readonly IPayloadDeserializer _payloadDeserializer;
private Action<string> _credentialsRevokedCallback;
#endif
public static bool IsCurrentPlatformSupported
{
get
{
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
return PInvoke.AppleAuth_IsCurrentPlatformSupported();
#else
return false;
#endif
}
}
public AppleAuthManager(IPayloadDeserializer payloadDeserializer)
{
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
this._payloadDeserializer = payloadDeserializer;
#endif
}
public void QuickLogin(Action<ICredential> successCallback, Action<IAppleError> errorCallback)
{
this.QuickLogin(new AppleAuthQuickLoginArgs(), successCallback, errorCallback);
}
public void QuickLogin(
AppleAuthQuickLoginArgs quickLoginArgs,
Action<ICredential> successCallback,
Action<IAppleError> errorCallback)
{
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
var nonce = quickLoginArgs.Nonce;
var state = quickLoginArgs.State;
var requestId = CallbackHandler.AddMessageCallback(
true,
payload =>
{
var response = this._payloadDeserializer.DeserializeLoginWithAppleIdResponse(payload);
if (response.Error != null)
errorCallback(response.Error);
else if (response.PasswordCredential != null)
successCallback(response.PasswordCredential);
else
successCallback(response.AppleIDCredential);
});
PInvoke.AppleAuth_QuickLogin(requestId, nonce, state);
#else
throw new Exception("AppleAuthManager is not supported in this platform");
#endif
}
public void LoginWithAppleId(LoginOptions options, Action<ICredential> successCallback, Action<IAppleError> errorCallback)
{
this.LoginWithAppleId(new AppleAuthLoginArgs(options), successCallback, errorCallback);
}
public void LoginWithAppleId(
AppleAuthLoginArgs loginArgs,
Action<ICredential> successCallback,
Action<IAppleError> errorCallback)
{
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
var loginOptions = loginArgs.Options;
var nonce = loginArgs.Nonce;
var state = loginArgs.State;
var requestId = CallbackHandler.AddMessageCallback(
true,
payload =>
{
var response = this._payloadDeserializer.DeserializeLoginWithAppleIdResponse(payload);
if (response.Error != null)
errorCallback(response.Error);
else
successCallback(response.AppleIDCredential);
});
PInvoke.AppleAuth_LoginWithAppleId(requestId, (int)loginOptions, nonce, state);
#else
throw new Exception("AppleAuthManager is not supported in this platform");
#endif
}
public void GetCredentialState(
string userId,
Action<CredentialState> successCallback,
Action<IAppleError> errorCallback)
{
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
var requestId = CallbackHandler.AddMessageCallback(
true,
payload =>
{
var response = this._payloadDeserializer.DeserializeCredentialStateResponse(payload);
if (response.Error != null)
errorCallback(response.Error);
else
successCallback(response.CredentialState);
});
PInvoke.AppleAuth_GetCredentialState(requestId, userId);
#else
throw new Exception("AppleAuthManager is not supported in this platform");
#endif
}
public void SetCredentialsRevokedCallback(Action<string> credentialsRevokedCallback)
{
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
if (this._credentialsRevokedCallback != null)
{
CallbackHandler.NativeCredentialsRevoked -= this._credentialsRevokedCallback;
this._credentialsRevokedCallback = null;
}
if (credentialsRevokedCallback != null)
{
CallbackHandler.NativeCredentialsRevoked += credentialsRevokedCallback;
this._credentialsRevokedCallback = credentialsRevokedCallback;
}
#endif
}
public void Update()
{
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
CallbackHandler.ExecutePendingCallbacks();
#endif
}
#if APPLE_AUTH_MANAGER_NATIVE_IMPLEMENTATION_AVAILABLE
private static class CallbackHandler
{
private const uint InitialCallbackId = 1U;
private const uint MaxCallbackId = uint.MaxValue;
private static readonly object SyncLock = new object();
private static readonly System.Collections.Generic.Dictionary<uint, Entry> CallbackDictionary = new System.Collections.Generic.Dictionary<uint, Entry>();
private static readonly System.Collections.Generic.List<Action> ScheduledActions = new System.Collections.Generic.List<Action>();
private static uint _callbackId = InitialCallbackId;
private static bool _initialized = false;
private static uint _credentialsRevokedCallbackId = 0U;
private static event Action<string> _nativeCredentialsRevoked = null;
public static event Action<string> NativeCredentialsRevoked
{
add
{
lock (SyncLock)
{
if (_nativeCredentialsRevoked == null)
{
_credentialsRevokedCallbackId = AddMessageCallback(false, payload => _nativeCredentialsRevoked.Invoke(payload));
PInvoke.AppleAuth_RegisterCredentialsRevokedCallbackId(_credentialsRevokedCallbackId);
}
_nativeCredentialsRevoked += value;
}
}
remove
{
lock (SyncLock)
{
_nativeCredentialsRevoked -= value;
if (_nativeCredentialsRevoked == null)
{
RemoveMessageCallback(_credentialsRevokedCallbackId);
_credentialsRevokedCallbackId = 0U;
PInvoke.AppleAuth_RegisterCredentialsRevokedCallbackId(0U);
}
}
}
}
public static void ScheduleCallback(uint requestId, string payload)
{
lock (SyncLock)
{
var callbackEntry = default(Entry);
if (CallbackDictionary.TryGetValue(requestId, out callbackEntry))
{
var callback = callbackEntry.MessageCallback;
ScheduledActions.Add(() => callback.Invoke(payload));
if (callbackEntry.IsSingleUseCallback)
{
CallbackDictionary.Remove(requestId);
}
}
}
}
public static void ExecutePendingCallbacks()
{
lock (SyncLock)
{
while (ScheduledActions.Count > 0)
{
var action = ScheduledActions[0];
ScheduledActions.RemoveAt(0);
action.Invoke();
}
}
}
public static uint AddMessageCallback(bool isSingleUse, Action<string> messageCallback)
{
if (!_initialized)
{
PInvoke.AppleAuth_SetupNativeMessageHandlerCallback(PInvoke.NativeMessageHandlerCallback);
_initialized = true;
}
if (messageCallback == null)
{
throw new Exception("Can't add a null Message Callback.");
}
var usedCallbackId = default(uint);
lock (SyncLock)
{
usedCallbackId = _callbackId;
_callbackId += 1;
if (_callbackId >= MaxCallbackId)
_callbackId = InitialCallbackId;
var callbackEntry = new Entry(isSingleUse, messageCallback);
CallbackDictionary.Add(usedCallbackId, callbackEntry);
}
return usedCallbackId;
}
public static void RemoveMessageCallback(uint requestId)
{
lock (SyncLock)
{
if (!CallbackDictionary.ContainsKey(requestId))
{
throw new Exception("Callback with id " + requestId + " does not exist and can't be removed");
}
CallbackDictionary.Remove(requestId);
}
}
private class Entry
{
public readonly bool IsSingleUseCallback;
public readonly Action<string> MessageCallback;
public Entry(bool isSingleUseCallback, Action<string> messageCallback)
{
this.IsSingleUseCallback = isSingleUseCallback;
this.MessageCallback = messageCallback;
}
}
}
private static class PInvoke
{
#if UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS
private const string DllName = "__Internal";
#elif UNITY_STANDALONE_OSX
private const string DllName = "MacOSAppleAuthManager";
#endif
public delegate void NativeMessageHandlerCallbackDelegate(uint requestId, string payload);
[AOT.MonoPInvokeCallback(typeof(NativeMessageHandlerCallbackDelegate))]
public static void NativeMessageHandlerCallback(uint requestId, string payload)
{
try
{
CallbackHandler.ScheduleCallback(requestId, payload);
}
catch (Exception exception)
{
Console.WriteLine("Received exception while scheduling a callback for request ID " + requestId);
Console.WriteLine("Detailed payload:\n" + payload);
Console.WriteLine("Exception: " + exception);
}
}
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern bool AppleAuth_IsCurrentPlatformSupported();
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern void AppleAuth_SetupNativeMessageHandlerCallback(NativeMessageHandlerCallbackDelegate callback);
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern void AppleAuth_GetCredentialState(uint requestId, string userId);
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern void AppleAuth_LoginWithAppleId(uint requestId, int loginOptions, string nonceCStr, string stateCStr);
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern void AppleAuth_QuickLogin(uint requestId, string nonceCStr, string stateCStr);
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern void AppleAuth_RegisterCredentialsRevokedCallbackId(uint callbackId);
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern void AppleAuth_LogMessage(string messageCStr);
}
#endif
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1812ac7eddfab4a23a1cc982cac36051
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
namespace AppleAuth
{
public struct AppleAuthQuickLoginArgs
{
public readonly string Nonce;
public readonly string State;
public AppleAuthQuickLoginArgs(string nonce = null, string state = null)
{
this.Nonce = nonce;
this.State = state;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8a61733e4ebb942098197a89f5934c8e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f4e47df0608a64147a64d38fcc06cb6f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,33 @@
namespace AppleAuth.Enums
{
/// <summary>
/// ASAuthorizationError
/// </summary>
public enum AuthorizationErrorCode
{
/// <summary>
/// The authorization attempt failed for an unknown reason
/// </summary>
Unknown = 1000,
/// <summary>
/// The user canceled the authorization attempt
/// </summary>
Canceled = 1001,
/// <summary>
/// The authorization request received an invalid response
/// </summary>
InvalidResponse = 1002,
/// <summary>
/// The authorization request wasn't handled
/// </summary>
NotHandled = 1003,
/// <summary>
/// The authorization attempt failed
/// </summary>
Failed = 1004,
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0c0980d6cfee342fdb99276ff8fb11dd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
namespace AppleAuth.Enums
{
/// <summary>
/// ASAuthorizationAppleIDProvider.CredentialState
/// </summary>
public enum CredentialState
{
/// <summary>
/// Authorization for the given user has been revoked
/// </summary>
Revoked = 0,
/// <summary>
/// The user is authorized
/// </summary>
Authorized = 1,
/// <summary>
/// The user can't be found
/// </summary>
NotFound = 2,
/// <summary>
/// ASAuthorizationAppleIDProviderCredentialTransferred
/// </summary>
Transferred = 3,
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3d646586a6b44460cb153db7578ecfc7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
using System;
namespace AppleAuth.Enums
{
[Flags]
public enum LoginOptions
{
/// <summary>
/// Empty scope. No full name or email
/// </summary>
None = 0,
/// <summary>
/// A scope that includes the user’s full name.
/// </summary>
IncludeFullName = 1 << 0,
/// <summary>
/// A scope that includes the user’s email address
/// </summary>
IncludeEmail = 1 << 1,
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2ef22db01f9c447db85fc3b72dc5260b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,33 @@
namespace AppleAuth.Enums
{
/// <summary>
/// NSPersonNameComponentsFormatter
/// </summary>
public enum PersonNameFormatterStyle
{
/// <summary>
/// The minimally necessary features for differentiation in a casual setting. Equivalent to NSPersonNameComponentsFormatterStyleMedium.
/// </summary>
Default = 0,
/// <summary>
/// Relies on user preferences and language defaults to display shortened form appropriate for display in space-constrained settings.
/// </summary>
Short = 1,
/// <summary>
/// The minimally necessary features for differentiation in a casual setting. Equivalent to NSPersonNameComponentsFormatterStyleDefault.
/// </summary>
Medium = 2,
/// <summary>
/// The fully qualified name complete with all known components.
/// </summary>
Long = 3,
/// <summary>
/// The maximally abbreviated form of a name.
/// </summary>
Abbreviated = 4,
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b5b6cd4c6059245f5bf45e2cdf6fd52d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,23 @@
namespace AppleAuth.Enums
{
/// <summary>
/// ASUserDetectionStatus
/// </summary>
public enum RealUserStatus
{
/// <summary>
/// The system can't determine this user's status as a real person.
/// </summary>
Unsupported = 0,
/// <summary>
/// The system hasn't determined whether the user might be a real person.
/// </summary>
Unknown = 1,
/// <summary>
/// The user appears to be a real person.
/// </summary>
LikelyReal = 2,
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 77ef719658b694f05b1647b0bef37987
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e6df00849339b49b282935a9d57d1d04
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,20 @@
using AppleAuth.Enums;
using AppleAuth.Interfaces;
using System;
namespace AppleAuth.Extensions
{
public static class AppleErrorExtensions
{
public static AuthorizationErrorCode GetAuthorizationErrorCode(this IAppleError error)
{
if (error.Domain == "com.apple.AuthenticationServices.AuthorizationError" &&
Enum.IsDefined(typeof(AuthorizationErrorCode), error.Code))
{
return (AuthorizationErrorCode)error.Code;
}
return AuthorizationErrorCode.Unknown;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dbc055864a39a46b4bbec75fe21d9cc8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,91 @@
#if ((UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS || UNITY_STANDALONE_OSX) && !UNITY_EDITOR)
#define NATIVE_PERSON_NAME_COMPONENTS_AVAILABLE
#endif
using AppleAuth.Enums;
using AppleAuth.Interfaces;
namespace AppleAuth.Extensions
{
public static class PersonNameExtensions
{
public static string ToLocalizedString(
this IPersonName personName,
PersonNameFormatterStyle style = PersonNameFormatterStyle.Default,
bool usePhoneticRepresentation = false)
{
#if NATIVE_PERSON_NAME_COMPONENTS_AVAILABLE
var jsonString = JsonStringForPersonName(personName);
var localizedString = PInvoke.AppleAuth_GetPersonNameUsingFormatter(jsonString, (int) style, usePhoneticRepresentation);
if (localizedString != null)
{
return localizedString;
}
#endif
var orderedParts = new System.Collections.Generic.List<string>();
if (string.IsNullOrEmpty(personName.NamePrefix))
orderedParts.Add(personName.NamePrefix);
if (string.IsNullOrEmpty(personName.GivenName))
orderedParts.Add(personName.GivenName);
if (string.IsNullOrEmpty(personName.MiddleName))
orderedParts.Add(personName.MiddleName);
if (string.IsNullOrEmpty(personName.FamilyName))
orderedParts.Add(personName.FamilyName);
if (string.IsNullOrEmpty(personName.NameSuffix))
orderedParts.Add(personName.NameSuffix);
return string.Join(" ", orderedParts.ToArray());
}
#if NATIVE_PERSON_NAME_COMPONENTS_AVAILABLE
private const string StringDictionaryFormat = "\"{0}\": \"{1}\",";
private const string StringObjectFormat = "\"{0}\": {1},";
private static string JsonStringForPersonName(IPersonName personName)
{
if (personName == null)
return null;
var stringBuilder = new System.Text.StringBuilder();
stringBuilder.Append("{");
TryAddKeyValue(StringDictionaryFormat, "_namePrefix", personName.NamePrefix, stringBuilder);
TryAddKeyValue(StringDictionaryFormat, "_givenName", personName.GivenName, stringBuilder);
TryAddKeyValue(StringDictionaryFormat, "_middleName", personName.MiddleName, stringBuilder);
TryAddKeyValue(StringDictionaryFormat, "_familyName", personName.FamilyName, stringBuilder);
TryAddKeyValue(StringDictionaryFormat, "_nameSuffix", personName.NameSuffix, stringBuilder);
TryAddKeyValue(StringDictionaryFormat, "_nickname", personName.Nickname, stringBuilder);
var phoneticRepresentationJson = JsonStringForPersonName(personName.PhoneticRepresentation);
TryAddKeyValue(StringObjectFormat, "_phoneticRepresentation", phoneticRepresentationJson, stringBuilder);
stringBuilder.Append("}");
return stringBuilder.ToString();
}
private static void TryAddKeyValue(string format, string key, string value, System.Text.StringBuilder stringBuilder)
{
if (string.IsNullOrEmpty(value))
return;
stringBuilder.AppendFormat(format, key, value);
}
private static class PInvoke
{
#if UNITY_IOS || UNITY_TVOS || UNITY_VISIONOS
private const string DllName = "__Internal";
#elif UNITY_STANDALONE_OSX
private const string DllName = "MacOSAppleAuthManager";
#endif
[System.Runtime.InteropServices.DllImport(DllName)]
public static extern string AppleAuth_GetPersonNameUsingFormatter(string payload, int style, bool usePhoneticRepresentation);
}
#endif
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d684b62a264c94bd9adc484681cd2864
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
using AppleAuth.Enums;
using AppleAuth.Interfaces;
using System;
namespace AppleAuth
{
public interface IAppleAuthManager
{
[Obsolete("This method is deprecated and will be removed soon. Please provide an empty instance of AppleAuthQuickLoginArgs to QuickLogin.")]
void QuickLogin(Action<ICredential> successCallback, Action<IAppleError> errorCallback);
void QuickLogin(AppleAuthQuickLoginArgs quickLoginArgs, Action<ICredential> successCallback, Action<IAppleError> errorCallback);
[Obsolete("This method is deprecated and will be removed soon. Please provide an instance of AppleAuthLoginArgs to LoginWithAppleId with the LoginOptions instead.")]
void LoginWithAppleId(LoginOptions options, Action<ICredential> successCallback, Action<IAppleError> errorCallback);
void LoginWithAppleId(AppleAuthLoginArgs loginArgs, Action<ICredential> successCallback, Action<IAppleError> errorCallback);
void GetCredentialState(string userId, Action<CredentialState> successCallback, Action<IAppleError> errorCallback);
void SetCredentialsRevokedCallback(Action<string> credentialsRevokedCallback);
void Update();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 69ff4ac90201d4456bec62466fe2a936
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d8d7552c17e7c42198c7fbcc2b5b115f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,35 @@
namespace AppleAuth.Interfaces
{
public interface IAppleError
{
/// <summary>
/// The error code.
/// </summary>
int Code { get; }
/// <summary>
/// A string containing the error domain.
/// </summary>
string Domain { get; }
/// <summary>
/// A string containing the localized description of the error.
/// </summary>
string LocalizedDescription { get; }
/// <summary>
/// An array containing the localized titles of buttons appropriate for displaying in an alert panel.
/// </summary>
string[] LocalizedRecoveryOptions { get; }
/// <summary>
/// A string containing the localized recovery suggestion for the error.
/// </summary>
string LocalizedRecoverySuggestion { get; }
/// <summary>
/// A string containing the localized explanation of the reason for the error.
/// </summary>
string LocalizedFailureReason { get; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c98d39aa7be1d4361b09450c4d2316d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,42 @@
using AppleAuth.Enums;
namespace AppleAuth.Interfaces
{
public interface IAppleIDCredential : ICredential
{
/// <summary>
/// A JSON Web Token (JWT) that securely communicates information about the user to your app.
/// </summary>
byte[] IdentityToken { get; }
/// <summary>
/// A short-lived token used by your app for proof of authorization when interacting with the app’s server counterpart.
/// </summary>
byte[] AuthorizationCode { get; }
/// <summary>
/// An arbitrary string that your app provided to the request that generated the credential.
/// </summary>
string State { get; }
/// <summary>
/// The contact information the user authorized your app to access.
/// </summary>
string[] AuthorizedScopes { get; }
/// <summary>
/// The user’s name
/// </summary>
IPersonName FullName { get; }
/// <summary>
/// The user’s email address
/// </summary>
string Email { get; }
/// <summary>
/// A value that indicates whether the user appears to be a real person.
/// </summary>
RealUserStatus RealUserStatus { get; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f3b2ea10c99194e828f0b6d77e5410cf
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
namespace AppleAuth.Interfaces
{
public interface ICredential
{
/// <summary>
/// An identifier associated with the authenticated user
/// </summary>
string User { get; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: aa092eaf7563444788fec832eda94849
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,11 @@
using AppleAuth.Enums;
namespace AppleAuth.Interfaces
{
public interface ICredentialStateResponse
{
bool Success { get; }
CredentialState CredentialState { get; }
IAppleError Error { get; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ad3121cb886334d909ad3942666cd396
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
namespace AppleAuth.Interfaces
{
public interface ILoginWithAppleIdResponse
{
bool Success { get; }
IAppleError Error { get; }
IAppleIDCredential AppleIDCredential { get; }
IPasswordCredential PasswordCredential { get; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0394fee0ab58b44c4ab2b93c2a81f061
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
namespace AppleAuth.Interfaces
{
public interface IPasswordCredential : ICredential
{
string Password { get; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 767f76f82bb4a4f8e83678a31afccef2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
namespace AppleAuth.Interfaces
{
public interface IPayloadDeserializer
{
ICredentialStateResponse DeserializeCredentialStateResponse(string payload);
ILoginWithAppleIdResponse DeserializeLoginWithAppleIdResponse(string payload);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c374a2fc1b8024d1b8aa7755908d3777
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
namespace AppleAuth.Interfaces
{
/// <summary>
/// PersonNameComponents
/// </summary>
public interface IPersonName
{
/// <summary>
/// The portion of a name’s full form of address that precedes the name itself (for example, “Dr.,” “Mr.,” “Ms.”)
/// </summary>
string NamePrefix { get; }
/// <summary>
/// Name bestowed upon an individual to differentiate them from other members of a group that share a family name (for example, “Johnathan”)
/// </summary>
string GivenName { get; }
/// <summary>
/// Secondary name bestowed upon an individual to differentiate them from others that have the same given name (for example, “Maple”)
/// </summary>
string MiddleName { get; }
/// <summary>
/// Name bestowed upon an individual to denote membership in a group or family. (for example, “Appleseed”)
/// </summary>
string FamilyName { get; }
/// <summary>
/// The portion of a name’s full form of address that follows the name itself (for example, “Esq.,” “Jr.,” “Ph.D.”)
/// </summary>
string NameSuffix { get; }
/// <summary>
/// Name substituted for the purposes of familiarity (for example, "Johnny")
/// </summary>
string Nickname { get; }
/// <summary>
/// The phonetic representation name components of the receiver
/// </summary>
IPersonName PhoneticRepresentation { get; }
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a7127bb6510c746c5831ca01efa61a71
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: de22a4c26e5ad461dacc44a1d5ed99f1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,41 @@
using AppleAuth.Interfaces;
using System;
using UnityEngine;
namespace AppleAuth.Native
{
[Serializable]
internal class AppleError : IAppleError, ISerializationCallbackReceiver
{
public int _code = 0;
public string _domain = null;
public string _localizedDescription = null;
public string[] _localizedRecoveryOptions = null;
public string _localizedRecoverySuggestion = null;
public string _localizedFailureReason = null;
public int Code { get { return this._code; } }
public string Domain { get { return this._domain; } }
public string LocalizedDescription { get { return this._localizedDescription; } }
public string[] LocalizedRecoveryOptions { get { return this._localizedRecoveryOptions; } }
public string LocalizedRecoverySuggestion { get { return this._localizedRecoverySuggestion; } }
public string LocalizedFailureReason { get { return this._localizedFailureReason; } }
public void OnBeforeSerialize() { }
public void OnAfterDeserialize()
{
SerializationTools.FixSerializationForString(ref this._domain);
SerializationTools.FixSerializationForString(ref this._localizedDescription);
SerializationTools.FixSerializationForString(ref this._localizedRecoverySuggestion);
SerializationTools.FixSerializationForString(ref this._localizedFailureReason);
SerializationTools.FixSerializationForArray(ref this._localizedRecoveryOptions);
}
public override string ToString()
{
return $"Domain={_domain} Code={_code} Description={_localizedDescription}";
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 66599b6010f2b4ddf968ec5828018bf5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,51 @@
using AppleAuth.Enums;
using AppleAuth.Interfaces;
using System;
using UnityEngine;
namespace AppleAuth.Native
{
[Serializable]
internal class AppleIDCredential : IAppleIDCredential, ISerializationCallbackReceiver
{
public string _base64IdentityToken = null;
public string _base64AuthorizationCode = null;
public string _state = null;
public string _user = null;
public string[] _authorizedScopes = null;
public bool _hasFullName = false;
public FullPersonName _fullName = null;
public string _email = null;
public int _realUserStatus = 0;
private byte[] _identityToken;
private byte[] _authorizationCode;
public byte[] IdentityToken { get { return this._identityToken; } }
public byte[] AuthorizationCode { get { return this._authorizationCode; } }
public string State { get { return this._state; } }
public string User { get { return this._user; } }
public string[] AuthorizedScopes { get { return this._authorizedScopes; } }
public IPersonName FullName { get { return this._fullName; } }
public string Email { get { return this._email; } }
public RealUserStatus RealUserStatus { get { return (RealUserStatus) this._realUserStatus; } }
public void OnBeforeSerialize() { }
public void OnAfterDeserialize()
{
SerializationTools.FixSerializationForString(ref this._base64IdentityToken);
SerializationTools.FixSerializationForString(ref this._base64AuthorizationCode);
SerializationTools.FixSerializationForString(ref this._state);
SerializationTools.FixSerializationForString(ref this._user);
SerializationTools.FixSerializationForString(ref this._email);
SerializationTools.FixSerializationForArray(ref this._authorizedScopes);
SerializationTools.FixSerializationForObject(ref this._fullName, this._hasFullName);
this._identityToken = SerializationTools.GetBytesFromBase64String(this._base64IdentityToken, "_identityToken");
this._authorizationCode = SerializationTools.GetBytesFromBase64String(this._base64AuthorizationCode, "_authorizationCode");
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 15941ca67e34e497c9d07d4fcd0a310f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,29 @@
using AppleAuth.Enums;
using AppleAuth.Interfaces;
using System;
using UnityEngine;
namespace AppleAuth.Native
{
[Serializable]
internal class CredentialStateResponse : ICredentialStateResponse, ISerializationCallbackReceiver
{
public bool _success = false;
public bool _hasCredentialState = false;
public bool _hasError = false;
public int _credentialState = 0;
public AppleError _error = null;
public bool Success { get { return this._success; } }
public CredentialState CredentialState { get { return (CredentialState) this._credentialState; } }
public IAppleError Error { get { return this._error; } }
public void OnBeforeSerialize() { }
public void OnAfterDeserialize()
{
SerializationTools.FixSerializationForObject(ref this._credentialState, this._hasCredentialState);
SerializationTools.FixSerializationForObject(ref this._error, this._hasError);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 24dd6e2297c95497b94116cd3cb73a1d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,21 @@
using AppleAuth.Interfaces;
using System;
namespace AppleAuth.Native
{
[Serializable]
internal class FullPersonName : PersonName, IPersonName
{
public bool _hasPhoneticRepresentation = false;
public PersonName _phoneticRepresentation = null;
public new IPersonName PhoneticRepresentation { get { return _phoneticRepresentation; } }
public override void OnAfterDeserialize()
{
base.OnAfterDeserialize();
SerializationTools.FixSerializationForObject(ref this._phoneticRepresentation, this._hasPhoneticRepresentation);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 23f96edff86ab4667b8690d7d5127edc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,32 @@
using AppleAuth.Interfaces;
using System;
using UnityEngine;
namespace AppleAuth.Native
{
[Serializable]
internal class LoginWithAppleIdResponse : ILoginWithAppleIdResponse, ISerializationCallbackReceiver
{
public bool _success = false;
public bool _hasAppleIdCredential = false;
public bool _hasPasswordCredential = false;
public bool _hasError = false;
public AppleIDCredential _appleIdCredential = null;
public PasswordCredential _passwordCredential = null;
public AppleError _error = null;
public bool Success { get { return this._success; } }
public IAppleError Error { get { return this._error; } }
public IAppleIDCredential AppleIDCredential { get { return this._appleIdCredential; } }
public IPasswordCredential PasswordCredential { get { return this._passwordCredential; } }
public void OnBeforeSerialize() { }
public void OnAfterDeserialize()
{
SerializationTools.FixSerializationForObject(ref this._error, this._hasError);
SerializationTools.FixSerializationForObject(ref this._appleIdCredential, this._hasAppleIdCredential);
SerializationTools.FixSerializationForObject(ref this._passwordCredential, this._hasPasswordCredential);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 88fccfe9390ad446fb450f04f59a6729
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
using AppleAuth.Interfaces;
using System;
using UnityEngine;
namespace AppleAuth.Native
{
[Serializable]
internal class PasswordCredential : IPasswordCredential, ISerializationCallbackReceiver
{
public string _user = null;
public string _password = null;
public string User { get { return this._user; } }
public string Password { get { return this._password; } }
public void OnBeforeSerialize() { }
public void OnAfterDeserialize()
{
SerializationTools.FixSerializationForString(ref this._user);
SerializationTools.FixSerializationForString(ref this._password);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b38027d09c1a04617b50cc7fa5e01310
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,18 @@
using AppleAuth.Interfaces;
using UnityEngine;
namespace AppleAuth.Native
{
public class PayloadDeserializer : IPayloadDeserializer
{
public ICredentialStateResponse DeserializeCredentialStateResponse(string payload)
{
return JsonUtility.FromJson<CredentialStateResponse>(payload);
}
public ILoginWithAppleIdResponse DeserializeLoginWithAppleIdResponse(string payload)
{
return JsonUtility.FromJson<LoginWithAppleIdResponse>(payload);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 06a2a38e685214c3295204c9136940a8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,37 @@
using System;
using AppleAuth.Interfaces;
using UnityEngine;
namespace AppleAuth.Native
{
[Serializable]
internal class PersonName : IPersonName, ISerializationCallbackReceiver
{
public string _namePrefix = null;
public string _givenName = null;
public string _middleName = null;
public string _familyName = null;
public string _nameSuffix = null;
public string _nickname = null;
public string NamePrefix { get { return _namePrefix; } }
public string GivenName { get { return _givenName; } }
public string MiddleName { get { return _middleName; } }
public string FamilyName { get { return _familyName; } }
public string NameSuffix { get { return _nameSuffix; } }
public string Nickname { get { return _nickname; } }
public IPersonName PhoneticRepresentation { get { return null; } }
public void OnBeforeSerialize() { }
public virtual void OnAfterDeserialize()
{
SerializationTools.FixSerializationForString(ref this._namePrefix);
SerializationTools.FixSerializationForString(ref this._givenName);
SerializationTools.FixSerializationForString(ref this._middleName);
SerializationTools.FixSerializationForString(ref this._familyName);
SerializationTools.FixSerializationForString(ref this._nameSuffix);
SerializationTools.FixSerializationForString(ref this._nickname);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0d959c3605b194eac93e208fa33002c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,47 @@
using System;
namespace AppleAuth.Native
{
internal static class SerializationTools
{
internal static void FixSerializationForString(ref string originalString)
{
if (string.IsNullOrEmpty(originalString))
originalString = null;
}
internal static void FixSerializationForArray<T>(ref T[] originalArray)
{
if (originalArray != null && originalArray.Length == 0)
originalArray = null;
}
internal static void FixSerializationForObject<T>(ref T originalObject, bool hasOriginalObject)
{
if (!hasOriginalObject)
originalObject = default(T);
}
internal static byte[] GetBytesFromBase64String(string base64String, string fieldName)
{
if (base64String == null)
{
return null;
}
var returnedBytes = default(byte[]);
try
{
returnedBytes = Convert.FromBase64String(base64String);
}
catch (Exception exception)
{
Console.WriteLine("Received exception while deserializing byte array for " + fieldName);
Console.WriteLine("Exception: " + exception);
returnedBytes = null;
}
return returnedBytes;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c90c4bb9b4fc94c32adf26b8cbf97cb6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 687423b5bd2394931962eb42f71aba99
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,55 @@
//
// MIT License
//
// Copyright (c) 2019-2020 Daniel Lupiañez Casares
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_OPTIONS(int, AppleAuthManagerLoginOptions) {
AppleAuthManagerIncludeName = 1 << 0,
AppleAuthManagerIncludeEmail = 1 << 1,
};
typedef void (*NativeMessageHandlerDelegate)(uint requestId, const char* payload);
@interface AppleAuthManager : NSObject
+ (instancetype) sharedManager;
- (void) quickLogin:(uint)requestId withNonce:(NSString *)nonce andState:(NSString *)state;
- (void) loginWithAppleId:(uint)requestId withOptions:(AppleAuthManagerLoginOptions)options nonce:(NSString *)nonce andState:(NSString *)state;
- (void) getCredentialStateForUser:(NSString *)userId withRequestId:(uint)requestId;
- (void) registerCredentialsRevokedCallbackForRequestId:(uint)requestId;
@end
bool AppleAuth_IsCurrentPlatformSupported(void);
void AppleAuth_SetupNativeMessageHandlerCallback(NativeMessageHandlerDelegate callback);
void AppleAuth_GetCredentialState(uint requestId, const char* userId);
void AppleAuth_LoginWithAppleId(uint requestId, int options, const char* _Nullable nonceCStr, const char* _Nullable stateCStr);
void AppleAuth_QuickLogin(uint requestId, const char* _Nullable nonceCStr, const char* _Nullable stateCStr);
void AppleAuth_RegisterCredentialsRevokedCallbackId(uint requestId);
void AppleAuth_LogMessage(const char* _Nullable messageCStr);
NS_ASSUME_NONNULL_END

View File

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 06c81bcee738c4a2dbc125bd0bfc9929
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude VisionOS: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
Exclude tvOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
VisionOS: VisionOS
second:
enabled: 1
settings: {}
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 1
settings:
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,391 @@
//
// MIT License
//
// Copyright (c) 2019-2020 Daniel Lupiañez Casares
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#import "AppleAuthManager.h"
#import "AppleAuthSerializer.h"
#pragma mark - AppleAuthManager Implementation
// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
#define AUTHENTICATION_SERVICES_AVAILABLE true
#import <AuthenticationServices/AuthenticationServices.h>
#endif
@interface AppleAuthManager ()
@property (nonatomic, assign) NativeMessageHandlerDelegate mainCallback;
@property (nonatomic, weak) NSOperationQueue *callingOperationQueue;
- (void) sendNativeMessageForDictionary:(NSDictionary *)payloadDictionary forRequestId:(uint)requestId;
- (void) sendNativeMessageForString:(NSString *)payloadString forRequestId:(uint)requestId;
- (NSError *)internalErrorWithCode:(NSInteger)code andMessage:(NSString *)message;
- (void) sendsCredentialStatusInternalErrorWithCode:(NSInteger)code andMessage:(NSString *)message forRequestWithId:(uint)requestId;
- (void) sendsLoginResponseInternalErrorWithCode:(NSInteger)code andMessage:(NSString *)message forRequestWithId:(uint)requestId;
@end
#if AUTHENTICATION_SERVICES_AVAILABLE
API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
@interface AppleAuthManager () <ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding>
@property (nonatomic, strong) ASAuthorizationAppleIDProvider *appleIdProvider;
@property (nonatomic, strong) ASAuthorizationPasswordProvider *passwordProvider;
@property (nonatomic, strong) NSObject *credentialsRevokedObserver;
@property (nonatomic, strong) NSMapTable<ASAuthorizationController *, NSNumber *> *authorizationsInProgress;
@end
#endif
@implementation AppleAuthManager
+ (instancetype) sharedManager
{
static AppleAuthManager *_defaultManager = nil;
static dispatch_once_t defaultManagerInitialization;
dispatch_once(&defaultManagerInitialization, ^{
_defaultManager = [[AppleAuthManager alloc] init];
});
return _defaultManager;
}
- (instancetype) init
{
self = [super init];
if (self)
{
#if AUTHENTICATION_SERVICES_AVAILABLE
if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
{
_appleIdProvider = [[ASAuthorizationAppleIDProvider alloc] init];
_passwordProvider = [[ASAuthorizationPasswordProvider alloc] init];
_authorizationsInProgress = [NSMapTable mapTableWithKeyOptions:NSPointerFunctionsStrongMemory valueOptions:NSPointerFunctionsStrongMemory];
}
#endif
}
return self;
}
#pragma mark Public methods
- (void) quickLogin:(uint)requestId withNonce:(NSString *)nonce andState:(NSString *)state
{
#if AUTHENTICATION_SERVICES_AVAILABLE
if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
{
ASAuthorizationAppleIDRequest *appleIDRequest = [[self appleIdProvider] createRequest];
[appleIDRequest setNonce:nonce];
[appleIDRequest setState:state];
ASAuthorizationPasswordRequest *keychainRequest = [[self passwordProvider] createRequest];
ASAuthorizationController *authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[appleIDRequest, keychainRequest]];
[self performAuthorizationRequestsForController:authorizationController withRequestId:requestId];
}
else
{
[self sendsLoginResponseInternalErrorWithCode:-100
andMessage:@"Native AppleAuth is only available from iOS 13.0"
forRequestWithId:requestId];
}
#else
[self sendsLoginResponseInternalErrorWithCode:-100
andMessage:@"Native AppleAuth is only available from iOS 13.0"
forRequestWithId:requestId];
#endif
}
- (void) loginWithAppleId:(uint)requestId withOptions:(AppleAuthManagerLoginOptions)options nonce:(NSString *)nonce andState:(NSString *)state
{
#if AUTHENTICATION_SERVICES_AVAILABLE
if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
{
ASAuthorizationAppleIDRequest *request = [[self appleIdProvider] createRequest];
NSMutableArray *scopes = [NSMutableArray array];
if (options & AppleAuthManagerIncludeName)
[scopes addObject:ASAuthorizationScopeFullName];
if (options & AppleAuthManagerIncludeEmail)
[scopes addObject:ASAuthorizationScopeEmail];
[request setRequestedScopes:[scopes copy]];
[request setNonce:nonce];
[request setState:state];
ASAuthorizationController *authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[request]];
[self performAuthorizationRequestsForController:authorizationController withRequestId:requestId];
}
else
{
[self sendsLoginResponseInternalErrorWithCode:-100
andMessage:@"Native AppleAuth is only available from iOS 13.0"
forRequestWithId:requestId];
}
#else
[self sendsLoginResponseInternalErrorWithCode:-100
andMessage:@"Native AppleAuth is only available from iOS 13.0"
forRequestWithId:requestId];
#endif
}
- (void) getCredentialStateForUser:(NSString *)userId withRequestId:(uint)requestId
{
#if AUTHENTICATION_SERVICES_AVAILABLE
if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
{
[[self appleIdProvider] getCredentialStateForUserID:userId completion:^(ASAuthorizationAppleIDProviderCredentialState credentialState, NSError * _Nullable error) {
NSNumber *credentialStateNumber = nil;
NSDictionary *errorDictionary = nil;
if (error)
errorDictionary = [AppleAuthSerializer dictionaryForNSError:error];
else
credentialStateNumber = @(credentialState);
NSDictionary *responseDictionary = [AppleAuthSerializer credentialResponseDictionaryForCredentialState:credentialStateNumber
errorDictionary:errorDictionary];
[self sendNativeMessageForDictionary:responseDictionary forRequestId:requestId];
}];
}
else
{
[self sendsCredentialStatusInternalErrorWithCode:-100
andMessage:@"Native AppleAuth is only available from iOS 13.0"
forRequestWithId:requestId];
}
#else
[self sendsCredentialStatusInternalErrorWithCode:-100
andMessage:@"Native AppleAuth is only available from iOS 13.0"
forRequestWithId:requestId];
#endif
}
- (void) registerCredentialsRevokedCallbackForRequestId:(uint)requestId
{
#if AUTHENTICATION_SERVICES_AVAILABLE
if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
{
if ([self credentialsRevokedObserver])
{
[[NSNotificationCenter defaultCenter] removeObserver:[self credentialsRevokedObserver]];
[self setCredentialsRevokedObserver:nil];
}
if (requestId != 0)
{
NSObject *observer = [[NSNotificationCenter defaultCenter] addObserverForName:ASAuthorizationAppleIDProviderCredentialRevokedNotification
object:nil
queue:nil
usingBlock:^(NSNotification * _Nonnull note) {
[self sendNativeMessageForString:@"Credentials Revoked" forRequestId:requestId];
}];
[self setCredentialsRevokedObserver:observer];
}
}
#endif
}
#pragma mark Private methods
- (void) sendNativeMessageForDictionary:(NSDictionary *)payloadDictionary forRequestId:(uint)requestId
{
NSError *error = nil;
NSData *payloadData = [NSJSONSerialization dataWithJSONObject:payloadDictionary options:0 error:&error];
NSString *payloadString = error ? [NSString stringWithFormat:@"Serialization error %@", [error localizedDescription]] : [[NSString alloc] initWithData:payloadData encoding:NSUTF8StringEncoding];
[self sendNativeMessageForString:payloadString forRequestId:requestId];
}
- (void) sendNativeMessageForString:(NSString *)payloadString forRequestId:(uint)requestId
{
if ([self mainCallback] == NULL)
return;
if ([self callingOperationQueue])
{
[[self callingOperationQueue] addOperationWithBlock:^{
[self mainCallback](requestId, [payloadString UTF8String]);
}];
}
else
{
[self mainCallback](requestId, [payloadString UTF8String]);
}
}
- (NSError *)internalErrorWithCode:(NSInteger)code andMessage:(NSString *)message
{
return [NSError errorWithDomain:@"com.unity.AppleAuth"
code:code
userInfo:@{NSLocalizedDescriptionKey : message}];
}
- (void) sendsCredentialStatusInternalErrorWithCode:(NSInteger)code andMessage:(NSString *)message forRequestWithId:(uint)requestId
{
NSError *customError = [self internalErrorWithCode:code andMessage:message];
NSDictionary *customErrorDictionary = [AppleAuthSerializer dictionaryForNSError:customError];
NSDictionary *responseDictionary = [AppleAuthSerializer credentialResponseDictionaryForCredentialState:nil
errorDictionary:customErrorDictionary];
[self sendNativeMessageForDictionary:responseDictionary forRequestId:requestId];
}
- (void) sendsLoginResponseInternalErrorWithCode:(NSInteger)code andMessage:(NSString *)message forRequestWithId:(uint)requestId
{
NSError *customError = [self internalErrorWithCode:code andMessage:message];
NSDictionary *customErrorDictionary = [AppleAuthSerializer dictionaryForNSError:customError];
NSDictionary *responseDictionary = [AppleAuthSerializer loginResponseDictionaryForAppleIdCredentialDictionary:nil
passwordCredentialDictionary:nil
errorDictionary:customErrorDictionary];
[self sendNativeMessageForDictionary:responseDictionary forRequestId:requestId];
}
#if AUTHENTICATION_SERVICES_AVAILABLE
- (void) performAuthorizationRequestsForController:(ASAuthorizationController *)authorizationController withRequestId:(uint)requestId
API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
{
// 使用强引用 NSMapTable 保存 ASAuthorizationController,避免其被提前释放导致 delegate 回调不触发
[[self authorizationsInProgress] setObject:@(requestId) forKey:authorizationController];
[authorizationController setDelegate:self];
[authorizationController setPresentationContextProvider:self];
[authorizationController performRequests];
}
#pragma mark ASAuthorizationControllerDelegate protocol implementation
- (void) authorizationController:(ASAuthorizationController *)controller didCompleteWithAuthorization:(ASAuthorization *)authorization
API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
{
NSNumber *requestIdNumber = [[self authorizationsInProgress] objectForKey:controller];
if (requestIdNumber)
{
NSDictionary *appleIdCredentialDictionary = nil;
NSDictionary *passwordCredentialDictionary = nil;
if ([[authorization credential] isKindOfClass:[ASAuthorizationAppleIDCredential class]])
{
appleIdCredentialDictionary = [AppleAuthSerializer dictionaryForASAuthorizationAppleIDCredential:(ASAuthorizationAppleIDCredential *)[authorization credential]];
}
else if ([[authorization credential] isKindOfClass:[ASPasswordCredential class]])
{
passwordCredentialDictionary = [AppleAuthSerializer dictionaryForASPasswordCredential:(ASPasswordCredential *)[authorization credential]];
}
NSDictionary *responseDictionary = [AppleAuthSerializer loginResponseDictionaryForAppleIdCredentialDictionary:appleIdCredentialDictionary
passwordCredentialDictionary:passwordCredentialDictionary
errorDictionary:nil];
[self sendNativeMessageForDictionary:responseDictionary forRequestId:[requestIdNumber unsignedIntValue]];
[[self authorizationsInProgress] removeObjectForKey:controller];
}
}
- (void) authorizationController:(ASAuthorizationController *)controller didCompleteWithError:(NSError *)error
API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
{
NSNumber *requestIdNumber = [[self authorizationsInProgress] objectForKey:controller];
if (requestIdNumber)
{
NSDictionary *errorDictionary = [AppleAuthSerializer dictionaryForNSError:error];
NSDictionary *responseDictionary = [AppleAuthSerializer loginResponseDictionaryForAppleIdCredentialDictionary:nil
passwordCredentialDictionary:nil
errorDictionary:errorDictionary];
[self sendNativeMessageForDictionary:responseDictionary forRequestId:[requestIdNumber unsignedIntValue]];
[[self authorizationsInProgress] removeObjectForKey:controller];
}
}
#pragma mark ASAuthorizationControllerPresentationContextProviding protocol implementation
- (ASPresentationAnchor) presentationAnchorForAuthorizationController:(ASAuthorizationController *)controller
API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0))
{
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
return [[[UIApplication sharedApplication] delegate] window];
#elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
return [[NSApplication sharedApplication] mainWindow];
#else
return nil;
#endif
}
#endif
@end
#pragma mark - Native C Calls
bool AppleAuth_IsCurrentPlatformSupported(void)
{
if (@available(iOS 13.0, tvOS 13.0, macOS 10.15, visionOS 1.0, *))
{
return true;
}
else
{
return false;
}
}
void AppleAuth_SetupNativeMessageHandlerCallback(NativeMessageHandlerDelegate callback)
{
[[AppleAuthManager sharedManager] setMainCallback:callback];
[[AppleAuthManager sharedManager] setCallingOperationQueue: [NSOperationQueue currentQueue]];
}
void AppleAuth_GetCredentialState(uint requestId, const char* userId)
{
[[AppleAuthManager sharedManager] getCredentialStateForUser:[NSString stringWithUTF8String:userId] withRequestId:requestId];
}
void AppleAuth_LoginWithAppleId(uint requestId, int options, const char* _Nullable nonceCStr, const char* _Nullable stateCStr)
{
NSString *nonce = nonceCStr != NULL ? [NSString stringWithUTF8String:nonceCStr] : nil;
NSString *state = stateCStr != NULL ? [NSString stringWithUTF8String:stateCStr] : nil;
[[AppleAuthManager sharedManager] loginWithAppleId:requestId withOptions:options nonce:nonce andState:state];
}
void AppleAuth_QuickLogin(uint requestId, const char* _Nullable nonceCStr, const char* _Nullable stateCStr)
{
NSString *nonce = nonceCStr != NULL ? [NSString stringWithUTF8String:nonceCStr] : nil;
NSString *state = stateCStr != NULL ? [NSString stringWithUTF8String:stateCStr] : nil;
[[AppleAuthManager sharedManager] quickLogin:requestId withNonce:nonce andState:state];
}
void AppleAuth_RegisterCredentialsRevokedCallbackId(uint requestId)
{
[[AppleAuthManager sharedManager] registerCredentialsRevokedCallbackForRequestId:requestId];
}
void AppleAuth_LogMessage(const char* _Nullable messageCStr)
{
NSString *message = messageCStr != NULL ? [NSString stringWithUTF8String:messageCStr] : nil;
NSLog(@"%@", message);
}

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: 61f5e8cab65e74724a8d16c25b068fef
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude VisionOS: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
Exclude tvOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
VisionOS: VisionOS
second:
enabled: 1
settings: {}
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,62 @@
//
// MIT License
//
// Copyright (c) 2019 Daniel Lupiañez Casares
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#import <Foundation/Foundation.h>
// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
#import <AuthenticationServices/AuthenticationServices.h>
#endif
@interface AppleAuthSerializer : NSObject
+ (NSDictionary * _Nullable) dictionaryForNSError:(NSError * _Nullable)error;
+ (NSDictionary * _Nullable) credentialResponseDictionaryForCredentialState:(NSNumber * _Nullable)credentialStateNumber
errorDictionary:(NSDictionary * _Nullable)errorDictionary;
+ (NSDictionary * _Nullable) loginResponseDictionaryForAppleIdCredentialDictionary:(NSDictionary * _Nullable)appleIdCredentialDictionary
passwordCredentialDictionary:(NSDictionary * _Nullable)passwordCredentialDictionary
errorDictionary:(NSDictionary * _Nullable)errorDictionary;
// IOS/TVOS 9.0 | MACOS 10.11 | VISIONOS 1.0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __TV_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
+ (NSDictionary * _Nullable) dictionaryForNSPersonNameComponents:(NSPersonNameComponents * _Nullable)nameComponents
API_AVAILABLE(ios(9.0), macos(10.11), tvos(9.0), watchos(2.0), visionos(1.0));
#endif
// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
+ (NSDictionary * _Nullable) dictionaryForASAuthorizationAppleIDCredential:(ASAuthorizationAppleIDCredential * _Nullable)appleIDCredential
API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0));
+ (NSDictionary * _Nullable) dictionaryForASPasswordCredential:(ASPasswordCredential * _Nullable)passwordCredential
API_AVAILABLE(ios(13.0), macos(10.15), tvos(13.0), watchos(6.0), visionos(1.0));
#endif
@end

View File

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 7a96c2b731b5146bb9317c8ea15774ec
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude VisionOS: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
Exclude tvOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: LinuxUniversal
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
VisionOS: VisionOS
second:
enabled: 1
settings: {}
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 1
settings:
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,151 @@
//
// MIT License
//
// Copyright (c) 2019 Daniel Lupiañez Casares
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#import "AppleAuthSerializer.h"
@implementation AppleAuthSerializer
+ (NSDictionary *) dictionaryForNSError:(NSError *)error
{
if (!error)
return nil;
NSMutableDictionary *result = [NSMutableDictionary dictionary];
[result setValue:@([error code]) forKey:@"_code"];
[result setValue:[error domain] forKey:@"_domain"];
[result setValue:[error localizedDescription] forKey:@"_localizedDescription"];
[result setValue:[error localizedRecoveryOptions] forKey:@"_localizedRecoveryOptions"];
[result setValue:[error localizedRecoverySuggestion] forKey:@"_localizedRecoverySuggestion"];
[result setValue:[error localizedFailureReason] forKey:@"_localizedFailureReason"];
return [result copy];
}
+ (NSDictionary *) credentialResponseDictionaryForCredentialState:(NSNumber *)credentialStateNumber
errorDictionary:(NSDictionary *)errorDictionary
{
NSMutableDictionary *result = [[NSMutableDictionary alloc] init];
[result setValue:@(errorDictionary == nil) forKey:@"_success"];
[result setValue:@(credentialStateNumber != nil) forKey:@"_hasCredentialState"];
[result setValue:@(errorDictionary != nil) forKey:@"_hasError"];
[result setValue:credentialStateNumber forKey:@"_credentialState"];
[result setValue:errorDictionary forKey:@"_error"];
return [result copy];
}
+ (NSDictionary *) loginResponseDictionaryForAppleIdCredentialDictionary:(NSDictionary *)appleIdCredentialDictionary
passwordCredentialDictionary:(NSDictionary *)passwordCredentialDictionary
errorDictionary:(NSDictionary *)errorDictionary
{
NSMutableDictionary *result = [[NSMutableDictionary alloc] init];
[result setValue:@(errorDictionary == nil) forKey:@"_success"];
[result setValue:@(appleIdCredentialDictionary != nil) forKey:@"_hasAppleIdCredential"];
[result setValue:@(passwordCredentialDictionary != nil) forKey:@"_hasPasswordCredential"];
[result setValue:@(errorDictionary != nil) forKey:@"_hasError"];
[result setValue:appleIdCredentialDictionary forKey:@"_appleIdCredential"];
[result setValue:passwordCredentialDictionary forKey:@"_passwordCredential"];
[result setValue:errorDictionary forKey:@"_error"];
return [result copy];
}
// IOS/TVOS 9.0 | MACOS 10.11 | VISIONOS 1.0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __TV_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
+ (NSDictionary *) dictionaryForNSPersonNameComponents:(NSPersonNameComponents *)nameComponents
{
if (!nameComponents)
return nil;
// Sometimes, when not requesting a name in the ASAuthorizationAppleIDRequest scopes,
// Apple will just send an empty NSPersonNameComponents instance...
// This should be treated as a nil person name components
if ([nameComponents namePrefix] == nil &&
[nameComponents givenName] == nil &&
[nameComponents middleName] == nil &&
[nameComponents familyName] == nil &&
[nameComponents nameSuffix] == nil &&
[nameComponents nickname] == nil &&
[nameComponents phoneticRepresentation] == nil)
return nil;
NSMutableDictionary *result = [NSMutableDictionary dictionary];
[result setValue:[nameComponents namePrefix] forKey:@"_namePrefix"];
[result setValue:[nameComponents givenName] forKey:@"_givenName"];
[result setValue:[nameComponents middleName] forKey:@"_middleName"];
[result setValue:[nameComponents familyName] forKey:@"_familyName"];
[result setValue:[nameComponents nameSuffix] forKey:@"_nameSuffix"];
[result setValue:[nameComponents nickname] forKey:@"_nickname"];
NSDictionary *phoneticRepresentationDictionary = [AppleAuthSerializer dictionaryForNSPersonNameComponents:[nameComponents phoneticRepresentation]];
[result setValue:@(phoneticRepresentationDictionary != nil) forKey:@"_hasPhoneticRepresentation"];
[result setValue:phoneticRepresentationDictionary forKey:@"_phoneticRepresentation"];
return [result copy];
}
#endif
// IOS/TVOS 13.0 | MACOS 10.15 | VISIONOS 1.0
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 || __VISION_OS_VERSION_MAX_ALLOWED >= 10000
+ (NSDictionary *) dictionaryForASAuthorizationAppleIDCredential:(ASAuthorizationAppleIDCredential *)appleIDCredential
{
if (!appleIDCredential)
return nil;
NSMutableDictionary *result = [NSMutableDictionary dictionary];
[result setValue:[[appleIDCredential identityToken] base64EncodedStringWithOptions:0] forKey:@"_base64IdentityToken"];
[result setValue:[[appleIDCredential authorizationCode] base64EncodedStringWithOptions:0] forKey:@"_base64AuthorizationCode"];
[result setValue:[appleIDCredential state] forKey:@"_state"];
[result setValue:[appleIDCredential user] forKey:@"_user"];
[result setValue:[appleIDCredential authorizedScopes] forKey:@"_authorizedScopes"];
[result setValue:[appleIDCredential email] forKey:@"_email"];
[result setValue:@([appleIDCredential realUserStatus]) forKey:@"_realUserStatus"];
NSDictionary *fullNameDictionary = [AppleAuthSerializer dictionaryForNSPersonNameComponents:[appleIDCredential fullName]];
[result setValue:@(fullNameDictionary != nil) forKey:@"_hasFullName"];
[result setValue:fullNameDictionary forKey:@"_fullName"];
return [result copy];
}
+ (NSDictionary *) dictionaryForASPasswordCredential:(ASPasswordCredential *)passwordCredential
{
if (!passwordCredential)
return nil;
NSMutableDictionary *result = [NSMutableDictionary dictionary];
[result setValue:[passwordCredential user] forKey:@"_user"];
[result setValue:[passwordCredential password] forKey:@"_password"];
return [result copy];
}
#endif
@end

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: f4b051f98e4b74942bb617c674da4d8d
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude VisionOS: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
Exclude tvOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
VisionOS: VisionOS
second:
enabled: 1
settings: {}
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,78 @@
//
// MIT License
//
// Copyright (c) 2019 Daniel Lupiañez Casares
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
#import <Foundation/Foundation.h>
const char* AppleAuth_CopyCString(const char* string)
{
if (string == NULL)
return NULL;
char* res = (char*)malloc(strlen(string) + 1);
strcpy(res, string);
return res;
}
const char* AppleAuth_GetPersonNameUsingFormatter(const char *payload, int style, bool usePhoneticRepresentation)
{
if (payload == NULL)
return NULL;
NSError *error = nil;
NSData *payloadData = [NSData dataWithBytes:payload length:strlen(payload)];
NSDictionary * nameComponentsDictionary = [NSJSONSerialization JSONObjectWithData:payloadData options:0 error:&error];
if (error)
return NULL;
if (@available(iOS 9.0, tvOS 9.0, macOS 10.11, visionOS 1.0, *)) {
NSPersonNameComponents *nameData = [[NSPersonNameComponents alloc] init];
[nameData setNamePrefix:[nameComponentsDictionary objectForKey:@"_namePrefix"]];
[nameData setGivenName:[nameComponentsDictionary objectForKey:@"_givenName"]];
[nameData setMiddleName:[nameComponentsDictionary objectForKey:@"_middleName"]];
[nameData setFamilyName:[nameComponentsDictionary objectForKey:@"_familyName"]];
[nameData setNameSuffix:[nameComponentsDictionary objectForKey:@"_nameSuffix"]];
[nameData setNickname:[nameComponentsDictionary objectForKey:@"_nickname"]];
NSDictionary *phoneticRepresentationDictionary = [nameComponentsDictionary objectForKey:@"_phoneticRepresentation"];
if (phoneticRepresentationDictionary)
{
NSPersonNameComponents *phoneticRepresentation = [[NSPersonNameComponents alloc] init];
[phoneticRepresentation setNamePrefix:[phoneticRepresentationDictionary objectForKey:@"_namePrefix"]];
[phoneticRepresentation setGivenName:[phoneticRepresentationDictionary objectForKey:@"_givenName"]];
[phoneticRepresentation setMiddleName:[phoneticRepresentationDictionary objectForKey:@"_middleName"]];
[phoneticRepresentation setFamilyName:[phoneticRepresentationDictionary objectForKey:@"_familyName"]];
[phoneticRepresentation setNameSuffix:[phoneticRepresentationDictionary objectForKey:@"_nameSuffix"]];
[phoneticRepresentation setNickname:[phoneticRepresentationDictionary objectForKey:@"_nickname"]];
[nameData setPhoneticRepresentation:phoneticRepresentation];
}
NSPersonNameComponentsFormatterOptions options = usePhoneticRepresentation ? NSPersonNameComponentsFormatterPhonetic : 0;
NSString *localizedName = [NSPersonNameComponentsFormatter localizedStringFromPersonNameComponents:nameData style:style options:options];
return AppleAuth_CopyCString([localizedName UTF8String]);
} else {
return NULL;
}
}

View File

@ -0,0 +1,105 @@
fileFormatVersion: 2
guid: dcbee9f0ecbf4466b90ffadfe14a372a
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
: Any
second:
enabled: 0
settings:
Exclude Editor: 1
Exclude Linux: 1
Exclude Linux64: 1
Exclude LinuxUniversal: 1
Exclude OSXUniversal: 1
Exclude VisionOS: 0
Exclude Win: 1
Exclude Win64: 1
Exclude iOS: 0
Exclude tvOS: 0
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
CPU: AnyCPU
DefaultValueInitialized: true
OS: AnyOS
- first:
Facebook: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Linux
second:
enabled: 0
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: AnyCPU
- first:
VisionOS: VisionOS
second:
enabled: 1
settings: {}
- first:
iPhone: iOS
second:
enabled: 1
settings:
AddToEmbeddedBinaries: false
CPU: AnyCPU
CompileFlags:
FrameworkDependencies:
- first:
tvOS: tvOS
second:
enabled: 1
settings: {}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More