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

App ID "reserved" words undocumented and too restrictive

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 8.0.0
    • None
    • cordova-create
    • None
    • MacOS X 10.10.5, Yosemite, Cordova CLI 5.4.1

    Description

      Running the following 'cordova create' command results in an error:

      $ cordova create MyApp com.company.internal.MyApp
      Error: App id contains a reserved word, or is not a valid identifier.

      First, the error message does not tell me which of the words in the specified app id is reserved. I figured out it was "internal" by trial and error. I tried to search the documentation for the list of reserved words, but could not find anything.

      Secondly, I think the list of "reserved" words is unnecessarily restrictive. I do not see why "internal" should be banned from the app id. In fact, the team provisioning profile we use for internal iOS development in our company requires us to use an app id which includes "internal".

      It looks like Cordova uses the valid-identifier package to decide if a word used in the app id is reserved.

      https://github.com/purplecabbage/valid-identifier

      This means that no Java keyword or reserved word can appear as part of the app id. I am not sure that's correct for the domain names used as the app/widget id's.

      Interestingly, this also means that Cordova rejects to create project with an app id like 'in.company.something' even though it would be a perfectly valid domain for India. The problem is that "in" happens to be a reserved word too. Someone complained about it here:

      http://stackoverflow.com/questions/32765028/using-in-in-the-android-app-id-eg-in-example-myapp

      Attachments

        Activity

          People

            Unassigned Unassigned
            jchalupa Jan Chalupa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: