Uploaded image for project: 'Appcelerator CLI'
  1. Appcelerator CLI
  2. CLI-786

Creating an Apple WatchOS2 app crashes if selected SDK is pre-5.0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.0.0
    • Fix Version/s: Release 5.0.0
    • Component/s: Core
    • Labels:
      None
    • Environment:

      appc use 5.0.0-16
      ti sdk select 4.1.0.GA

      Description

      The following will happen if the selected SDK is 4.1 or older and you want to create/add an Apple Watch OS 2 app/extension.

      The CLI should gracefully inform you that the selected SDK does not support Apple Watch.

      samples $ appc new
      Appcelerator Command-Line Interface, version 5.0.0-16
      Copyright (c) 2014-2015, Appcelerator, Inc.  All Rights Reserved.
       
      Preproduction Environment Active
       
      ? What type of project are you creating? Apple Watch™ App
      ? Where's the project directory? ./appc-sample-ti500
      ? What's the project name? appc-sample-ti500
      ? Do you want to overwrite? Yes
      /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:194
              throw e;
                    ^
      TypeError: Cannot read property 'validPlatforms' of undefined
          at /Users/fokkezb/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/cli/commands/create.js:234:34
          at Array.forEach (native)
          at conf.options.appc.util.mix.platforms.validate (/Users/fokkezb/Library/Application Support/Titanium/mobilesdk/osx/4.1.0.GA/cli/commands/create.js:232:46)
          at CLI.<anonymous> (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/lib/cli.js:491:15)
          at /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:607:21
          at /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:246:17
          at iterate (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:146:13)
          at /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:157:25
          at /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:248:21
          at /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:612:34
      ---------------------------------------------
          at Object.run (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:59:8)
          at find (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:96:14)
          at q.process (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:806:21)
          at processImmediate (timers.js:367:17)
      ---------------------------------------------
          at async.setImmediate (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:107:15)
          at /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:765:21
          at _each (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:46:13)
          at _insert (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:750:11)
          at q.push (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/node_modules/async/lib/async.js:779:15)
          at Object.findExecutable (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/node-appc/lib/subprocess.js:113:8)
          at resolveNode (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/lib/titanium.js:97:34)
          at /Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/lib/titanium.js:74:5
          at Object.<anonymous> (/Users/fokkezb/.appcelerator/install/5.0.0-16/package/node_modules/appc-cli-titanium/node_modules/titanium/lib/titanium.js:80:2)
      ERROR  | titanium exited with non-zero exit code (1)
      

        Attachments

          Activity

            People

            • Assignee:
              fmiao Feon Sua Xin Miao
              Reporter:
              fokkezb Fokke Zandbergen
              Reviewer:
              Chee Kiat Ng (Inactive)
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code