Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10251

iOS Icons and Splash Screens do NOT copy if project name has a space

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: cordova-ios
    • Environment:

      cordova-ios 4.0.0

      Description

      For the longest time I've always thought that I'd never be able to get the icons and splash screens working by following the official documentation. I always got errors like the ones below after adding the ios platform.

      Turns out that if I change my project name from "My Project" to "MyProject", the lack of a space allows the icon/splash copying to work.

      Possible Culprits:

      https://github.com/apache/cordova-ios/blob/58885067ffea1546c51da2d95f2dc6ac30b40bef/bin/templates/scripts/cordova/lib/prepare.js#L301

      https://github.com/apache/cordova-ios/blob/58885067ffea1546c51da2d95f2dc6ac30b40bef/bin/templates/scripts/cordova/lib/prepare.js#L339

      Errors:

      Adding ios project...
      iOS project created with cordova-ios@4.0.0
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-60.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-60@2x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-60@3x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-76.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-76@2x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-small.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-small@2x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-40.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-40@2x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon@2x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-72.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-72@2x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-50.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/icons/icon-50@2x.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default~iphone.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default@2x~iphone.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-Portrait~ipad.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-Portrait@2x~ipad.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-Landscape~ipad.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-Landscape@2x~ipad.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-568h@2x~iphone.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-667h.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-736h.png
      
      cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/user900330/Desktop/project.cordova/platforms/ios/My Project/Resources/splash/Default-Landscape-736h.png
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vbresults vB Results, LLC.
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: