ionic-cli icon indicating copy to clipboard operation
ionic-cli copied to clipboard

iOS build fails if app name entry in config.xml contains HTML Code or ASCII special characters and symbols

Open feliperfmarques opened this issue 9 years ago • 2 comments

v3 beta7 testing

What version of the CLI are you using? Output of ionic --version

3.0.0-beta7

Short description of the problem:

iOS build fails if app name entry in config.xml contains HTML Code or ASCII special characters and symbols. For instance, I create a new app and rename app name entry in config.xml to M & M's. So I got this error when run ionic cordova build ios

$ ionic cordova build ios 
  Running app-scripts build: --iscordovaserve --externalIpRequired --nobrowser
[02:13:18]  build dev started ... 
[02:13:18]  clean started ... 
[02:13:18]  clean finished in 1 ms 
[02:13:18]  copy started ... 
[02:13:18]  transpile started ... 
[02:13:21]  transpile finished in 2.50 s 
[02:13:21]  preprocess started ... 
[02:13:21]  deeplinks started ... 
[02:13:21]  deeplinks finished in 14 ms 
[02:13:21]  preprocess finished in 14 ms 
[02:13:21]  webpack started ... 
[02:13:21]  copy finished in 2.72 s 
[02:13:29]  webpack finished in 8.90 s 
[02:13:29]  sass started ... 
[02:13:30]  sass finished in 843 ms 
[02:13:30]  postprocess started ... 
[02:13:30]  postprocess finished in 77 ms 
[02:13:30]  lint started ... 
[02:13:30]  build dev finished in 12.36 s 
✔ Running build - done!
⠼ Executing cordova command: cordova build ios [02:13:33]  lint finished in 2.29 s 
⠇ Executing cordova command: cordova build ios [ERROR] An error occurred while running the above command (exit code 1):
        
        xcodebuild: error: Unable to load workspace 'M & M's.xcworkspace'.
        	Reason: Could not open workspace file at ~/Documents/Projects/MyApp/platforms/ios/M & M's.xcworkspace/contents.xcworkspacedata
        Error: Error code 74 for command: xcodebuild with args: -xcconfig,/Users/feliperfmarques/Documents/Projects/MyApp/platforms/ios/cordova/build-debug.xcconfig,-workspace,M & M's.xcworkspace,-scheme,M & M's,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/feliperfmarques/Documents/Projects/MyApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/feliperfmarques/Documents/Projects/MyApp/platforms/ios/build/sharedpch

What behavior are you expecting?

Build to ios platform without errors.

Steps to reproduce:

  1. Create a new app
  2. Rename app name entry in config.xml to some name with special character (For instance, M & M's)
  3. Add iOS plataform ionic cordova platform add ios
  4. Run ionic cordova build ios

Post the output of ionic info below please

  Cordova CLI: 6.5.0 
    Ionic Framework Version: 3.0.1
    Ionic CLI Version: 3.0.0-beta7
    ios-deploy version: 1.9.1 
    ios-sim version: 5.0.13 
    OS: OS X El Capitan
    Node Version: v6.9.1
    Xcode version: Xcode 8.1 Build version 8B62

feliperfmarques avatar Apr 20 '17 05:04 feliperfmarques

@feliperfmarques I don't think I've seen anyone successfully use an apostrophe in a Cordova app's name. See this: https://calendee.com/2015/07/29/configuring-app-name-in-cordova-hybrid-apps

As for the ampersand, looks like a bug was re-introduced into cordova-ios 4.3.0/4.3.1: https://issues.apache.org/jira/browse/CB-12402

We'll have to wait for cordova-ios 4.4.0 to be released, unfortunately.

imhoffd avatar Apr 21 '17 02:04 imhoffd

@dwieeb Thanks so much.

feliperfmarques avatar Apr 21 '17 03:04 feliperfmarques