Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9139] Android: Tooling: How to set the deploytype

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-10-19T01:19:59.000+0000
Affected Version/sRelease 2.0.1
Fix Version/s2013 Sprint 21, 2013 Sprint 21 Core, Release 3.2.0
ComponentsAndroid, Tooling
LabelsSupportTeam, androidbuild, ay-verified, cb-verified, core, exalture, hard_to_verify, qe-closed-3.2.0
ReporterMauro Parra-Miranda
AssigneeChris Barber
Created2012-05-15T09:44:52.000+0000
Updated2013-12-17T21:18:37.000+0000

Description

Problem Description

When you do a deployment for distribution, you will think that the deploytype in analytics will switch to production. But it's not happening with some projects. A customer is not getting analytics from his app, and he reported it, the people in the Cloud replied that he didn't set the app to be in prod: The second issue, for the other app GUID 473b9203-836a-4d48-ac13-2993873efa2c, the problem is that the user is using deploytype:test, and analytics only shows up for deploytype:production. When I asked the client to do for production (i.e., deploy it to the Market), he already did that, as the attached image shows.

Actual Results

App is not set for production in the deploytype.

Expected results

If you build an app for distribution in the market, the deploytype should be production.

Extra info

See attached image.

Attachments

FileDateSize
Screen Shot 2012-05-15 at 08.40.41.png2012-05-15T09:44:52.000+0000167288

Comments

  1. Bill Dawson 2012-05-15

    Some background on how the deploytype is set via build scripts: * User chooses "Distribute - Android Marketplace" in titanium studio and fills out the form. * Studio calls the android builder.py with the ["distribute" command](https://github.com/appcelerator/titanium_mobile/blob/2_0_X/support/android/builder.py#L2126). * builder.py's build_and_run function is called with the install argument set to True. That - and the fact that the keystore information is also passed to builder - lead the deploy_type to be set to production. ([code](https://github.com/appcelerator/titanium_mobile/blob/2_0_X/support/android/builder.py#L1663)). * That information is then used when we generate the Java source for the application's "AppInfo" class. [My test app here](https://skitch.com/bill_dawson/84mm2/tistud1659appinfo.java-projects-ti-tistud1659-build-android-gen-com-billdawson-tistud1659-vim3). That sets the system "ti.deploytype" property for the application at runtime. * Then, when analytics is fired up at runtime, that "ti.deploytype" property [is read and sent along](https://github.com/appcelerator/titanium_mobile/blob/2_0_X/android/titanium/src/java/org/appcelerator/titanium/TiApplication.java#L407) with the analytics data.
  2. Ingo Muschenetz 2012-05-15

    Mauro--it appears that

    This should be working correctly

    The choice of deploy type is actually done inside the SDK scripts. There isn't anything Studio can do about it (in the code Bill links to, deploy type is not a parameter that's passed in).

    Have you replicated this yourself? If you have, it appears it should be a TIMOB issue.
  3. Mauro Parra-Miranda 2012-05-15

    This is changing to TI mobile SDK, so they can give us their opinion.
  4. Neeraj Gupta 2012-05-17

    @Mauro - Have you reproduced this issue yourself? All the issues that come from support team should have been verified? Why is this issue in the escalation list?
  5. Mauro Parra-Miranda 2012-05-21

    Changing priority to next patch, working on a testcase. Best, Mauro
  6. Allen Yeung 2013-10-18

    In the new CLI, the deploy can be set with the --deploy-type flag. When building for distribution, it can only have a deploy-type of production.
  7. Allen Yeung 2013-10-19

    PR: https://github.com/appcelerator/titanium_mobile/pull/4781
  8. Samuel Dowse 2013-12-17

    Verified fixed on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201312162209 Titanium SDK, build: 3.2.0.v20131216191854 CLI: 3.2.0-cr3 Alloy: 1.3.0-cr CLI Android: --deploy-type can be set to test and development. --target can be set to dist-playstore for production. Production will override any --deploy-type parameters. Studio has package and run buttons which sort all this out for you successfully. Closing.

JSON Source