@@ -18,9 +18,9 @@ public static class iOSLaunchUtils
1818 private static readonly string DerivedDataPath = Path . GetFullPath ( Path . Combine ( Common . BuildScratchDirectory , "ios-build" ) ) ;
1919 private static readonly string XCodeProjectFile = "Unity-iPhone.xcodeproj" ;
2020
21- private static readonly Regex nameRegex = new Regex ( "^[a-z|A-Z| \\ s|0-9]+ " ) ;
22- private static readonly Regex simulatorUIDRegex = new Regex ( "\\ [([A-Z]|[0-9]|-)+ \\ ]" ) ;
23- private static readonly Regex deviceUIDRegex = new Regex ( "\\ [([a-z]|[0-9])+ \\ ]" ) ;
21+ private static readonly Regex nameRegex = new Regex ( "^(.+) \\ [ " ) ;
22+ private static readonly Regex simulatorUIDRegex = new Regex ( "\\ [([a-zA-Z0-9 \\ -]+) \\ ] \\ (Simulator \\ )$ " ) ;
23+ private static readonly Regex deviceUIDRegex = new Regex ( "\\ [([a-zA-Z0-9 \\ -]+) \\ ]$ " ) ;
2424
2525 public static Dictionary < string , string > RetrieveAvailableiOSSimulators ( )
2626 {
@@ -36,8 +36,8 @@ public static Dictionary<string, string> RetrieveAvailableiOSSimulators()
3636 {
3737 if ( simulatorUIDRegex . IsMatch ( message ) )
3838 {
39- var simulatorUID = simulatorUIDRegex . Match ( message ) . Value . Trim ( '[' , ']' ) ;
40- availableSimulators [ nameRegex . Match ( message ) . Value ] = simulatorUID ;
39+ var simulatorUID = simulatorUIDRegex . Match ( message ) . Groups [ 1 ] . Value ;
40+ availableSimulators [ nameRegex . Match ( message ) . Groups [ 1 ] . Value ] = simulatorUID ;
4141 }
4242 }
4343 } )
@@ -61,8 +61,8 @@ public static Dictionary<string, string> RetrieveAvailableiOSDevices()
6161 {
6262 if ( deviceUIDRegex . IsMatch ( message ) )
6363 {
64- var deviceUID = deviceUIDRegex . Match ( message ) . Value . Trim ( '[' , ']' ) ;
65- availableDevices [ nameRegex . Match ( message ) . Value ] = deviceUID ;
64+ var deviceUID = deviceUIDRegex . Match ( message ) . Groups [ 1 ] . Value ;
65+ availableDevices [ nameRegex . Match ( message ) . Groups [ 1 ] . Value ] = deviceUID ;
6666 }
6767 } )
6868 . RedirectOutputOptions ( OutputRedirectBehaviour . None )
0 commit comments