feat(spoof): deviceType=ANDROID по умолчанию на iOS, iOS-спуф отключён

This commit is contained in:
klockky
2026-06-22 12:25:30 +03:00
parent eaf6084451
commit 7b73f1335a
2 changed files with 12 additions and 6 deletions
+2 -2
View File
@@ -201,7 +201,6 @@ class Api {
);
} else if (Platform.isIOS) {
final iosInfo = await deviceInfo.iosInfo;
deviceType = 'IOS';
osVersion = iosInfo.systemVersion;
deviceName = iosInfo.utsname.machine;
} else if (Platform.isAndroid) {
@@ -220,7 +219,8 @@ class Api {
final spoofed = await SpoofingService.getSpoofedSessionData();
if (spoofed != null) {
deviceType = (spoofed['device_type'] as String?) ?? deviceType;
final sDeviceType = spoofed['device_type'] as String?;
if (sDeviceType != null && sDeviceType != 'IOS') deviceType = sDeviceType;
final sDeviceName = spoofed['device_name'] as String?;
if (sDeviceName != null && sDeviceName.isNotEmpty) {
deviceName = sDeviceName;
+10 -4
View File
@@ -136,9 +136,9 @@ class _SpoofScreenState extends State<SpoofScreen> {
}
var type = profile.deviceType.isEmpty ? 'ANDROID' : profile.deviceType;
if (type == 'WEB') type = 'ANDROID';
if (type == 'WEB' || type == 'IOS') type = 'ANDROID';
_selectedDeviceType = type;
if (type == 'IOS' || type == 'DESKTOP') {
if (type == 'DESKTOP') {
_selectedMethod = SpoofingMethod.full;
}
}
@@ -215,7 +215,7 @@ class _SpoofScreenState extends State<SpoofScreen> {
: 'arm64-v8a';
} else if (Platform.isIOS) {
final iosInfo = await deviceInfo.iosInfo;
_selectedDeviceType = 'IOS';
_selectedDeviceType = 'ANDROID';
_selectedArch = 'arm64';
_deviceNameController.text = iosInfo.utsname.machine;
_osVersionController.text = iosInfo.systemVersion;
@@ -614,7 +614,6 @@ class _SpoofScreenState extends State<SpoofScreen> {
_buildChipSelector<String>(
options: const [
_ChipOption('ANDROID', 'Android', Icons.android_outlined),
_ChipOption('IOS', 'iOS', Icons.phone_iphone_outlined),
_ChipOption(
'DESKTOP',
'Desktop',
@@ -623,6 +622,13 @@ class _SpoofScreenState extends State<SpoofScreen> {
],
selected: _selectedDeviceType,
onSelected: _onDeviceTypeChanged,
trailing: [
_buildDisabledChip(
'iOS',
Icons.phone_iphone_outlined,
theme,
),
],
)
else
_buildChipSelector<String>(