diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
index 1d4ba7b22..74210a159 100644
--- a/ios/Flutter/AppFrameworkInfo.plist
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 18.0
+ 16.0
diff --git a/ios/Podfile b/ios/Podfile
index 28d4c2f7d..ad48460a9 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -1,5 +1,5 @@
# Define a global platform for your project
-platform :ios, '18.0'
+platform :ios, '16.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@@ -44,7 +44,7 @@ post_install do |installer|
# Ensure all pods use the same iOS deployment target
target.build_configurations.each do |config|
- config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '18.0'
+ config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= [
'$(inherited)',
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 4ef33cfa7..ad056d922 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -3,16 +3,12 @@ PODS:
- AMapNavi (~> 10.0.900)
- Flutter
- AMapFoundation (1.8.2)
- - AMapLocation (2.10.0):
- - AMapFoundation (>= 1.8.0)
- AMapNavi (10.0.900):
- AMapFoundation (>= 1.8.2)
- audio_waveforms (0.0.1):
- Flutter
- classic_bluetooth (0.0.1):
- Flutter
- - device_info_plus (0.0.1):
- - Flutter
- FBAEMKit (18.0.0):
- FBSDKCoreKit_Basics (= 18.0.0)
- FBSDKCoreKit (18.0.0):
@@ -44,6 +40,8 @@ PODS:
- WechatOpenSDK-XCFramework (~> 2.0.4)
- haptic_feedback (0.5.1):
- Flutter
+ - keyboard_height_plugin (0.0.1):
+ - Flutter
- libwebp (1.5.0):
- libwebp/demux (= 1.5.0)
- libwebp/mux (= 1.5.0)
@@ -56,9 +54,6 @@ PODS:
- libwebp/sharpyuv (1.5.0)
- libwebp/webp (1.5.0):
- libwebp/sharpyuv
- - location_service (0.0.1):
- - AMapLocation (~> 2.10.0)
- - Flutter
- Mantle (2.2.0):
- Mantle/extobjc (= 2.2.0)
- Mantle/extobjc (2.2.0)
@@ -89,12 +84,13 @@ PODS:
- Flutter
- QCloudCOSXML (= 6.4.7)
- WechatOpenSDK-XCFramework (2.0.4)
+ - wifi_iot (0.0.1):
+ - Flutter
DEPENDENCIES:
- amap_service (from `.symlinks/plugins/amap_service/ios`)
- audio_waveforms (from `.symlinks/plugins/audio_waveforms/ios`)
- classic_bluetooth (from `.symlinks/plugins/classic_bluetooth/ios`)
- - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- Flutter (from `Flutter`)
- flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`)
- flutter_image_compress_common (from `.symlinks/plugins/flutter_image_compress_common/ios`)
@@ -103,17 +99,17 @@ DEPENDENCIES:
- flutter_tts (from `.symlinks/plugins/flutter_tts/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
- haptic_feedback (from `.symlinks/plugins/haptic_feedback/ios`)
- - location_service (from `.symlinks/plugins/location_service/ios`)
+ - keyboard_height_plugin (from `.symlinks/plugins/keyboard_height_plugin/ios`)
- ota (from `.symlinks/plugins/ota/ios`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- record_darwin (from `.symlinks/plugins/record_darwin/ios`)
- spotify_sdk (from `.symlinks/plugins/spotify_sdk/ios`)
- tencentcloud_cos_sdk_plugin (from `.symlinks/plugins/tencentcloud_cos_sdk_plugin/ios`)
+ - wifi_iot (from `.symlinks/plugins/wifi_iot/ios`)
SPEC REPOS:
trunk:
- AMapFoundation
- - AMapLocation
- AMapNavi
- FBAEMKit
- FBSDKCoreKit
@@ -135,8 +131,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/audio_waveforms/ios"
classic_bluetooth:
:path: ".symlinks/plugins/classic_bluetooth/ios"
- device_info_plus:
- :path: ".symlinks/plugins/device_info_plus/ios"
Flutter:
:path: Flutter
flutter_facebook_auth:
@@ -153,8 +147,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/fluwx/ios"
haptic_feedback:
:path: ".symlinks/plugins/haptic_feedback/ios"
- location_service:
- :path: ".symlinks/plugins/location_service/ios"
+ keyboard_height_plugin:
+ :path: ".symlinks/plugins/keyboard_height_plugin/ios"
ota:
:path: ".symlinks/plugins/ota/ios"
permission_handler_apple:
@@ -165,15 +159,15 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/spotify_sdk/ios"
tencentcloud_cos_sdk_plugin:
:path: ".symlinks/plugins/tencentcloud_cos_sdk_plugin/ios"
+ wifi_iot:
+ :path: ".symlinks/plugins/wifi_iot/ios"
SPEC CHECKSUMS:
amap_service: 1c3e7e07f51cbbdff03719a4a079c60d015c1c0b
AMapFoundation: 9885c48fc3a78fdfb84a0299a2293e56ea3c9fec
- AMapLocation: 5248aec2455ebb5d104b367813c946430a2ee033
AMapNavi: fceb4715f9a3b5a25f330facebee2aa2bdba42dd
audio_waveforms: a6dde7fe7c0ea05f06ffbdb0f7c1b2b2ba6cedcf
- classic_bluetooth: c146e1618e867a47fa7ab79a3bf262e7d69d557d
- device_info_plus: 71ffc6ab7634ade6267c7a93088ed7e4f74e5896
+ classic_bluetooth: 29f392f1ab7c52862a9ef036c94f2713b02e0c50
FBAEMKit: e34530df538b8eb8aeb53c35867715ba6c63ef0c
FBSDKCoreKit: d3f479a69127acebb1c6aad91c1a33907bcf6c2f
FBSDKCoreKit_Basics: 017b6dc2a1862024815a8229e75661e627ac1e29
@@ -186,8 +180,8 @@ SPEC CHECKSUMS:
flutter_tts: b88dbc8655d3dc961bc4a796e4e16a4cc1795833
fluwx: 6bf9c5a3a99ad31b0de137dd92370a0d10a60f4b
haptic_feedback: fd1d8509833f58f164fc12122c0357fa9b2750e0
+ keyboard_height_plugin: ef70a8181b29f27670e9e2450814ca6b6dc05b05
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
- location_service: fab4ef23d473296a215c49e12c129e466574d94e
Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d
ota: 20c3e522c57e7ba70ce118109e73650acc9fec76
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
@@ -200,7 +194,8 @@ SPEC CHECKSUMS:
spotify_sdk: a48400bb29f70c4fe251ebfdc9135c37097ac5ca
tencentcloud_cos_sdk_plugin: 7bed564dbe72df23e7b5cacb1e51b1a20cb1639c
WechatOpenSDK-XCFramework: 36fb2bea0754266c17184adf4963d7e6ff98b69f
+ wifi_iot: f645260a2be8608517b2a9bf4c39b98e97003acc
-PODFILE CHECKSUM: 517ecd5ce5153c9609017e05f4e64ab72605e805
+PODFILE CHECKSUM: e69e629768e642fde97676ea149350c61d57751e
COCOAPODS: 1.16.2
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index bad551a70..2bd851492 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -252,7 +252,7 @@
);
mainGroup = 97C146E51CF9000F007C117D;
packageReferences = (
- 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */,
D013B7972DFA83E400B2B69B /* XCRemoteSwiftPackageReference "flutterfire" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
@@ -526,15 +526,16 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = 42C82SZUVX;
+ DEVELOPMENT_TEAM = 537SFY28XS;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 18.0;
+ INFOPLIST_KEY_CFBundleDisplayName = "Deep Voice";
+ IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.yunqiinnovation.deepsound;
+ PRODUCT_BUNDLE_IDENTIFIER = com.chuangxiangyunqi.deapsound;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -549,6 +550,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
+ DEVELOPMENT_TEAM = 537SFY28XS;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
MARKETING_VERSION = 1.0;
@@ -716,15 +718,16 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = 42C82SZUVX;
+ DEVELOPMENT_TEAM = 537SFY28XS;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 18.0;
+ INFOPLIST_KEY_CFBundleDisplayName = "Deep Voice";
+ IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.yunqiinnovation.deepsound;
+ PRODUCT_BUNDLE_IDENTIFIER = com.chuangxiangyunqi.deapsound;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -741,15 +744,16 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- DEVELOPMENT_TEAM = 42C82SZUVX;
+ DEVELOPMENT_TEAM = 537SFY28XS;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
- IPHONEOS_DEPLOYMENT_TARGET = 18.0;
+ INFOPLIST_KEY_CFBundleDisplayName = "Deep Voice";
+ IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
- PRODUCT_BUNDLE_IDENTIFIER = com.yunqiinnovation.deepsound;
+ PRODUCT_BUNDLE_IDENTIFIER = com.chuangxiangyunqi.deapsound;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
@@ -793,7 +797,7 @@
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
- 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
+ 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index c3fedb29c..95d6e55f2 100644
--- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,7 +1,7 @@
+ version = "1.7">
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
index 5be33da0e..71516c17e 100644
--- a/ios/Runner/Info.plist
+++ b/ios/Runner/Info.plist
@@ -39,7 +39,7 @@
- CFBundleVersion
+ CFBundleVersion
$(FLUTTER_BUILD_NUMBER)
FacebookAdvertiserIDCollectionEnabled
@@ -72,50 +72,12 @@
LSRequiresIPhoneOS
- NSAccessorySetupBluetoothCompanyIdentifiers
-
- EFAB
-
- NSAccessorySetupDescriptions
-
-
- AccessoryMediaType
- Headphones
- LocalizedAccessoryName
- 语音助理耳机
-
-
- NSAccessorySetupKitSupports
-
- Bluetooth
-
NSAppTransportSecurity
NSAllowsArbitraryLoads
NSAllowsArbitraryLoadsInWebContent
- NSExceptionDomains
-
- mcp.amap.com
-
- NSExceptionAllowsInsecureHTTPLoads
-
- NSExceptionMinimumTLSVersion
- TLSv1.0
- NSIncludesSubdomains
-
-
- mcp.ideapsound.com
-
- NSExceptionAllowsInsecureHTTPLoads
-
- NSExceptionMinimumTLSVersion
- TLSv1.0
- NSIncludesSubdomains
-
-
-
NSBluetoothAlwaysUsageDescription
需要蓝牙权限用于连接和管理音频设备
@@ -160,5 +122,7 @@
UIInterfaceOrientationLandscapeLeft
UIInterfaceOrientationLandscapeRight
+ UIViewControllerBasedStatusBarAppearance
+
diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements
index 032f72d37..0286ef500 100644
--- a/ios/Runner/Runner.entitlements
+++ b/ios/Runner/Runner.entitlements
@@ -2,11 +2,15 @@
+ com.apple.developer.associated-domains
+
+ applinks:deepsoud.com
+
+ com.apple.developer.homekit
+
com.apple.developer.networking.wifi-info
com.apple.external-accessory.wireless-configuration
- com.apple.developer.homekit
-
diff --git a/lib/data/models/user_Info.dart b/lib/data/models/user_Info.dart
index 3f3f9fa86..04fa89610 100644
--- a/lib/data/models/user_Info.dart
+++ b/lib/data/models/user_Info.dart
@@ -1,3 +1,5 @@
+import 'dart:ffi';
+
class User {
// 单例实例
static User? _instance;
@@ -21,15 +23,7 @@ class User {
String phonemac;
String password;
int viplv = 0; //添加会员等级字段,0表示普通用户
- String earphonename;
- String earphonemac;
- String earphonelicense;
- String earphoneauthcode;
- // final Int64 lastbettime;
- // final Int64 createtime;
- // final String wxopenid;
- // final String googleopenid;
- // final String facebookopenid;
+ List devices;
// 私有构造函数
User._({
@@ -42,21 +36,14 @@ class User {
required this.phone,
required this.phonemac,
required this.password,
- required this.viplv, // 添加默认值
- required this.earphonename,
- required this.earphonemac,
- required this.earphonelicense,
- required this.earphoneauthcode,
- // required this.lastbettime,
- // required this.createtime,
- // required this.wxopenid,
- // required this.googleopenid,
- // required this.facebookopenid,
+ required this.viplv,
+ required this.devices,
});
factory User.fromJson(Map json) {
// 修复1:安全获取嵌套的 user 字段
final userData = json['user'] as Map?; // 允许空值
+ final devicesData = json['devices'] as Map?; // 允许空值
//final token = json['data']['token'] as String? ?? '';
//final token = '';
// 更新单例实例
@@ -74,21 +61,17 @@ class User {
phonemac: (userData?['phonemac'] as String?) ?? '',
password: (userData?['password'] as String?) ?? '',
viplv: (userData?['viplv'] as int?) ?? 0, // 提供默认值
- earphonename: (userData?['earphonename'] as String?) ?? '',
- earphonemac: (userData?['earphonemac'] as String?) ?? '',
- earphonelicense: (userData?['earphonelicense'] as String?) ?? '',
- earphoneauthcode: (userData?['earphoneauthcode'] as String?) ?? '',
-// lastbettime: _parseTimestamp(userData['lastbettime']),
-// createtime: _parseTimestamp(userData['createtime']),
-// wxopenid: (userData?['wxopenid'] as String?) ?? '',
-// googleopenid: (userData?['googleopenid'] as String?) ?? '',
-// facebookopenid: (userData?['facebookopenid'] as String?) ?? '',
+ devices: (devicesData as List?)
+ ?.map((e) => UserDevice.fromJson(e as Map))
+ .toList() ??
+ [], // 处理设备列表
);
}
factory User.fronTokenJson(Map json) {
// 修复1:安全获取嵌套的 user 字段
final userData = json['user'] as Map?; // 允许空值
- print("数据获取fronTokenJson${userData}");
+ final devicesData = json['devices'] as Map?; // 允许空值
+ print("数据获取fronTokenJson${userData} ${devicesData}");
// 更新单例实例
return _instance = User._(
token: '',
@@ -101,17 +84,12 @@ class User {
phone: (userData?['phone'] as String?) ?? '',
phonemac: (userData?['phonemac'] as String?) ?? '',
password: (userData?['password'] as String?) ?? '',
-
viplv: (userData?['viplv'] as int?) ?? 0, // 提供默认值
- earphonename: (userData?['earphonename'] as String?) ?? '',
- earphonemac: (userData?['earphonemac'] as String?) ?? '',
- earphonelicense: (userData?['earphonelicense'] as String?) ?? '',
- earphoneauthcode: (userData?['earphoneauthcode'] as String?) ?? '',
-// lastbettime: _parseTimestamp(userData['lastbettime']),
-// createtime: _parseTimestamp(userData['createtime']),
-// wxopenid: (userData?['wxopenid'] as String?) ?? '',
-// googleopenid: (userData?['googleopenid'] as String?) ?? '',
-// facebookopenid: (userData?['facebookopenid'] as String?) ?? '',
+ devices: devicesData != null
+ ? (devicesData as List)
+ .map((e) => UserDevice.fromJson(e as Map))
+ .toList()
+ : [], // 处理设备列表
);
}
@@ -121,7 +99,6 @@ class User {
'name': name,
'uid': uid,
'avatar': avatar,
-
'language': language,
'token': token,
'mail': mail,
@@ -129,17 +106,52 @@ class User {
'phonemac': phonemac,
'password': password,
'viplv': viplv,
+ 'devices': devices.map((device) => device.toJson()).toList(),
+ },
+ };
+
+ // 添加设备
+ addUserDevice(UserDevice device) {
+ devices.add(device);
+ }
+
+ // 查找设备
+ removeUserDevice(int id) {
+ devices.removeWhere((device) => device.id == id);
+ }
+}
+
+class UserDevice {
+ int id;
+ String uid;
+ int devicetype;
+ String devicename;
+ String devicemac;
+ String license;
+ UserDevice({
+ required this.id,
+ required this.uid,
+ required this.devicetype,
+ required this.devicename,
+ required this.devicemac,
+ required this.license,
+ });
- 'earphonename': earphonename,
- 'earphonemac': earphonemac,
- "earphonelicense": earphonelicense,
- 'earphoneauthcode': earphoneauthcode,
+ factory UserDevice.fromJson(Map json) => UserDevice(
+ id: json['id'] as int,
+ uid: json['uid'] as String,
+ devicetype: (json['devicetype'] as num).toInt(),
+ devicename: json['devicename'] as String,
+ devicemac: json['devicemac'] as String,
+ license: json['license'] as String,
+ );
- // 'lastbettime': lastbettime,
- // 'createtime': createtime,
- // 'wxopenid': wxopenid,
- // 'googleopenid': googleopenid,
- // 'facebookopenid': facebookopenid,
- }
+ toJson() => {
+ 'id': id,
+ 'uid': uid,
+ 'devicetype': devicetype,
+ 'devicename': devicename,
+ 'devicemac': devicemac,
+ 'license': license,
};
}
diff --git a/lib/data/services/ble_manager.dart b/lib/data/services/ble_manager.dart
index 175ca4d9e..96bea2fc6 100644
--- a/lib/data/services/ble_manager.dart
+++ b/lib/data/services/ble_manager.dart
@@ -782,9 +782,28 @@ class BleManager extends GetxService {
}
}
- Future