Skip to content

Difference in hookArgs.prepareData.platform #4963

Closed
@PeterStaev

Description

@PeterStaev

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.0.3
  • Cross-platform modules: 6.0.6
  • Android Runtime: 6.0.1
  • iOS Runtime: 6.0.0
  • Plugin(s):

Describe the bug
There is a difference in the casing of the platform that is sent to an after-prepare hook.

To Reproduce
Create a simple plugin with an after-prepare hook having the following:

module.exports = function (hookArgs) {
  console.log("PLATFORM: ", hookArgs.prepareData.platform)
}

Execute:

tns prepare ios

Output:

PLATFORM: ios

Execute:

tns run ios

Output:

PLATFORM: iOS

Expected behavior
The platform should be made consistent no matter which CLI command you are executing.

Sample project

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdebughooksDescribes issues related to hooksprepareDescribes issues related to prepare commandpreviewDescribes issues related to preview commandrunDescribes issues related to run commandunit testing

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions