[ 
https://issues.apache.org/jira/browse/CB-6992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15237088#comment-15237088
 ] 

Tony Homer commented on CB-6992:
--------------------------------

Downstream in Intel XDK, we had a user report an issue with building an app 
with an arabic name.

I reproduced the issue using Cordova CLI:
1. Create a new project using CLI (`cordova create arabic-test-cli`)
2. Edit config.xml, change name to: إثرا
3. `cordova platform add [email protected]`
4. `cordova build ios --device` (xcodebuild: error: The project 
'إثرا.xcodeproj' does not contain a target named 'إثرا'.)
5. Build fails

After some experimenting I found that build succeeds if the platform is added 
before editing the name in config.xml.
1. Create a new project using CLI (`cordova create arabic-test-cli`)
2. `cordova platform add [email protected]`
3. Edit config.xml, change name to: إثرا
4. `cordova prepare ios`
5. `cordova build ios --device`
6. Build succeeds (** BUILD SUCCEEDED ** ... Results at 
'/Users/ajhomer/arabic-test-cli-2/platforms/ios/build/device/إثرا.ipa')

This made me suspect a discrepancy between name handling in create and prepare.
I compared name handling in prepare and create and noticed that the name is 
normalized by prepare but not by createPlatform.
Applying the name normalization from prepare to create makes the above fail 
steps succeed.

I'm not sure why the existing unicode create tests pass (e.g., 'create project 
with unicode name, no spaces') but since they do, I added a new test using the 
string from my test case.  This test fails without name normalization on 
create.  Adding name normalization makes the test pass.

I'll open a PR with these 2 changes (name normalization on create and new 
create name test).

> iOS platform add/prepare fails if app display name contains unicode 
> characters.
> -------------------------------------------------------------------------------
>
>                 Key: CB-6992
>                 URL: https://issues.apache.org/jira/browse/CB-6992
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.5.0
>         Environment: uname: Darwin 13.1.0 Darwin Kernel Version 13.1.0: Thu 
> Jan 16 19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
> cordova-dev -v: 3.5.0-0.2.4
> cordova-lib: 0.21.3
> Node 0.10.26
> iOS
>            Reporter: Vladimir Kotikov
>            Assignee: Shazron Abdullah
>            Priority: Critical
>              Labels: cli, configParser, cordova-ios-4.0.x, ios, ios-deploy
>
> Repro steps:
> # cordova create test-umlaÜt com.test.umlaÜt umlaÜt
> # cd test-umlaÜt/
> # cordova platform add ios
> Platform add fails with following error:
> {noformat}
> mv: dest file already exists: 
> /Users/user/test/test-umlaÜt/platforms/ios/umlaÜt/umlaÜt-Info.plist
> mv: dest file already exists: 
> /Users/user/test/test-umlaÜt/platforms/ios/umlaÜt/umlaÜt-Prefix.pch
> shell.js: internal error
> Error: EINVAL, invalid argument 
> '/Users/user/test/test-umlaÜt/platforms/ios/umlaÜt.xcodeproj'
>     at Object.fs.renameSync (fs.js:543:18)
>     at 
> /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/shell.js:495:8
>     at Array.forEach (native)
>     at Object._mv 
> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/shell.js:471:11)
>     at Object.mv 
> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/shelljs/shell.js:1491:23)
>     at pbxProject.<anonymous> 
> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/metadata/ios_parser.js:145:27)
>     at pbxProject.EventEmitter.emit (events.js:98:17)
>     at pbxProject.<anonymous> 
> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/xcode/lib/pbxProject.js:30:18)
>     at ChildProcess.EventEmitter.emit (events.js:98:17)
>     at handleMessage (child_process.js:318:10)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to