Skip to content

Commit 57633af

Browse files
committed
feat: 更新设备模型以支持 mDNS 服务名识别无线连接设备,修正应用名称为 DevicePlayer.app
1 parent 59ec145 commit 57633af

3 files changed

Lines changed: 15 additions & 10 deletions

File tree

lib/dialog/devices_model.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ class DevicesModel extends ListFilterItem {
88
DevicesModel(this.brand, this.model, this.id)
99
: super(brand + " " + model + " " + id);
1010

11-
/// 是否为无线连接设备(ID 格式为 ip:port)
12-
bool get isWireless => RegExp(r'^\d+\.\d+\.\d+\.\d+:\d+$').hasMatch(id);
11+
/// 是否为无线连接设备(ip:port 或 mDNS 服务名)
12+
bool get isWireless =>
13+
RegExp(r'^\d+\.\d+\.\d+\.\d+:\d+$').hasMatch(id) ||
14+
id.contains('_adb-tls-connect._tcp') ||
15+
id.contains('_adb-tls-pairing._tcp');
1316
}

macos/Runner.xcodeproj/project.pbxproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
24A804B5FEA871EFF1F9121E /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
5757
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
5858
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
59-
33CC10ED2044A3C60003C045 /* device_player.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = device_player.app; sourceTree = BUILT_PRODUCTS_DIR; };
59+
33CC10ED2044A3C60003C045 /* DevicePlayer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DevicePlayer.app; sourceTree = BUILT_PRODUCTS_DIR; };
6060
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
6161
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
6262
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
@@ -112,7 +112,7 @@
112112
33CC10EE2044A3C60003C045 /* Products */ = {
113113
isa = PBXGroup;
114114
children = (
115-
33CC10ED2044A3C60003C045 /* device_player.app */,
115+
33CC10ED2044A3C60003C045 /* DevicePlayer.app */,
116116
);
117117
name = Products;
118118
sourceTree = "<group>";
@@ -159,7 +159,6 @@
159159
478161A8E313B55F73ADDC52 /* Pods-Runner.release.xcconfig */,
160160
B384FCA7EA4A101D2907A6FD /* Pods-Runner.profile.xcconfig */,
161161
);
162-
name = Pods;
163162
path = Pods;
164163
sourceTree = "<group>";
165164
};
@@ -193,7 +192,7 @@
193192
);
194193
name = Runner;
195194
productName = Runner;
196-
productReference = 33CC10ED2044A3C60003C045 /* device_player.app */;
195+
productReference = 33CC10ED2044A3C60003C045 /* DevicePlayer.app */;
197196
productType = "com.apple.product-type.application";
198197
};
199198
/* End PBXNativeTarget section */
@@ -422,6 +421,7 @@
422421
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
423422
CODE_SIGN_STYLE = Automatic;
424423
COMBINE_HIDPI_IMAGES = YES;
424+
DEVELOPMENT_TEAM = K77324Q2HH;
425425
INFOPLIST_FILE = Runner/Info.plist;
426426
LD_RUNPATH_SEARCH_PATHS = (
427427
"$(inherited)",
@@ -548,6 +548,7 @@
548548
CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
549549
CODE_SIGN_STYLE = Automatic;
550550
COMBINE_HIDPI_IMAGES = YES;
551+
DEVELOPMENT_TEAM = K77324Q2HH;
551552
INFOPLIST_FILE = Runner/Info.plist;
552553
LD_RUNPATH_SEARCH_PATHS = (
553554
"$(inherited)",
@@ -568,6 +569,7 @@
568569
CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
569570
CODE_SIGN_STYLE = Automatic;
570571
COMBINE_HIDPI_IMAGES = YES;
572+
DEVELOPMENT_TEAM = K77324Q2HH;
571573
INFOPLIST_FILE = Runner/Info.plist;
572574
LD_RUNPATH_SEARCH_PATHS = (
573575
"$(inherited)",

macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<BuildableReference
1616
BuildableIdentifier = "primary"
1717
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
18-
BuildableName = "device_player.app"
18+
BuildableName = "DevicePlayer.app"
1919
BlueprintName = "Runner"
2020
ReferencedContainer = "container:Runner.xcodeproj">
2121
</BuildableReference>
@@ -31,7 +31,7 @@
3131
<BuildableReference
3232
BuildableIdentifier = "primary"
3333
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
34-
BuildableName = "device_player.app"
34+
BuildableName = "DevicePlayer.app"
3535
BlueprintName = "Runner"
3636
ReferencedContainer = "container:Runner.xcodeproj">
3737
</BuildableReference>
@@ -55,7 +55,7 @@
5555
<BuildableReference
5656
BuildableIdentifier = "primary"
5757
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
58-
BuildableName = "device_player.app"
58+
BuildableName = "DevicePlayer.app"
5959
BlueprintName = "Runner"
6060
ReferencedContainer = "container:Runner.xcodeproj">
6161
</BuildableReference>
@@ -72,7 +72,7 @@
7272
<BuildableReference
7373
BuildableIdentifier = "primary"
7474
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
75-
BuildableName = "device_player.app"
75+
BuildableName = "DevicePlayer.app"
7676
BlueprintName = "Runner"
7777
ReferencedContainer = "container:Runner.xcodeproj">
7878
</BuildableReference>

0 commit comments

Comments
 (0)