Fix regexp that strips invalid characters from the project identifier

Fixes #3835
This commit is contained in:
Todd Volkert 2016-05-10 13:24:20 -07:00
commit 810b3e32a6
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>Runner</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.example.hello_world</string>
<string>io.flutter.example.helloworld</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>

View File

@ -193,7 +193,7 @@ String _createAndroidIdentifier(String name) {
String _createUTIIdentifier(String name) {
// Create a UTI (https://en.wikipedia.org/wiki/Uniform_Type_Identifier) from a base name
RegExp disallowed = new RegExp(r"[^a-zA-Z0-9\-.\u0080-\uffff]+");
RegExp disallowed = new RegExp(r"[^a-zA-Z0-9\-\.\u0080-\uffff]+");
name = camelCase(name).replaceAll(disallowed, '');
name = name.isEmpty ? 'untitled' : name;
return 'com.yourcompany.$name';