Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20083] Remove watchos1 template and related code

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-07-12T03:31:30.000+0000
Affected Version/sRelease 5.1.1
Fix Version/sRelease 6.0.0
ComponentsiOS, Tooling
Labelsbreaking-change, notable, watch
ReporterFokke Zandbergen
AssigneeFeon Sua Xin Miao
Created2015-12-02T07:57:22.000+0000
Updated2018-08-06T17:49:32.000+0000

Description

After TIMOB-19455 adds a watchos2-swift template and defaults to it we should remove the watchos1 template and the related code in the build script. *cli/lib/creators/applewatch.js* * Remove the check for watchos1: https://github.com/FokkeZB/titanium_mobile/blob/TIMOB-19455/cli/lib/creators/applewatch.js#L220-L223 *iphone/cli/commands/_build.js* * An check should be added to fail if if the extension is V1. * All usage of hasWatchAppV1, hasWatchAppV2orNewer, isWatchAppV1Extension, isWatchAppV1, isWatchAppV2orNewer should be changed to assume V2 or newer. *templates/applewatch/watchos1/template* * Should be removed

Comments

  1. Feon Sua Xin Miao 2016-01-05

    PR: https://github.com/appcelerator/titanium_mobile/pull/7611 Functional Test: 1. Build a project without watchOS apps 2. Build should succeed. 3. Build a project that has a watchOS 1 app 4. Build should terminate with following error message:
       [ERROR] watchOS 1 app detected
       [ERROR] Titanium 6.0.0 does not support watchOS 1 apps
       
    5. Build a project that has a watchOS 2 app 6. Build should succeed.
  2. Chee Kiat Ng 2016-01-06

    CR and FT Passed. Question: Should we warn or fail already on step 3 when calling *appc new -t applewatch --template watchos1*? instead of having the dev disappointed later at step 4.? [~fokkezb] thoughts?
  3. Fokke Zandbergen 2016-01-06

    [~cng] won't it already fail if you use a template name that no longer exists?
  4. Chee Kiat Ng 2016-01-06

    [~fokkezb] oh ya, you are quite right. So this PR FT failed.

    Expected behavior

    Step 3 should fail and say the template doesn't exist.

    Actual behavior

    PR still allowed me to generate the extension/
  5. Fokke Zandbergen 2016-01-06

    Well, then thats a separate bug which should also happen if you do appc new -t applewatch --template foo
  6. Feon Sua Xin Miao 2016-01-06

    The CLI should be already handling non-existent template. Also, this is the error message I get.
       // appc new -t applewatch --template watchos1
       [ERROR] Unable to find template "watchos1"
       [ERROR] Failed to create project after 4ms
       
       // appc new -t applewatch --template foo
       [ERROR] Unable to find template "foo"
       [ERROR] Failed to create project after 5ms
       
  7. Chee Kiat Ng 2016-01-07

    I see. must be because i overwrote an existing sdk version which already had that template in place. let me clean that directory, reinstall sdk that has your code, and test again.
  8. Chee Kiat Ng 2016-01-07

    OK PR Approved and merged!
  9. Fokke Zandbergen 2016-02-17

    As discussed, this should be in 6.0 not 5.4 because it breaks when you build an existing Titanium app with a watchos1 extension. /cc [~cng]
  10. Chee Kiat Ng 2016-02-17

    [~fmiao] I'll need this PR that was merged, to be reverted on master. Thanks.
  11. Fokke Zandbergen 2016-02-17

    Ideally we could split it up: 5.4: Remove the create support (the watchos1 template itself and the check for watchos1 in cli/lib/creators/applewatch.js) 6.0: Remove the build support in iphone/cli/commands/_build.js
  12. Chee Kiat Ng 2016-02-17

    Agreed with Fokke. [~fmiao] can you PR to re-insert build support in iphone/cli/commands/_build.js on master branch?
  13. Chee Kiat Ng 2016-02-18

    [~bimmel] Worthwhile mention on release notes as Fokke has described: 5.4.0: Developers cannot create watch apps using watchos1 templates 6.0.0: Developers who has watchos1 watch apps will fail to build. (no longer support watchos1) [~fmiao] we can merge the PR to re-insert build support for watchos1, but don't resolve this ticket until we remove it again in 6.0.0. This ticket will remain open until 6.0.0 release.
  14. Feon Sua Xin Miao 2016-02-18

    PR: https://github.com/appcelerator/titanium_mobile/pull/7757 It would be alot easier if we have a branch for 5_4_X.
  15. Chris Barber 2016-02-18

    Just so everybody is clear, we MUST always leave the WatchOS1 extension detection code in the iOS build even after WatchOS1 is dead and gone. Second, we MUST display a deprecation warning when building an app with a WatchOS1 extension. We should sneak this deprecation warning in ASAP. Third, when we do end up dropping support for WatchOS1 extensions, the iOS build must emit a fatal error and exit when a WatchOS1 extension is detected.
  16. Chee Kiat Ng 2016-02-19

    PR merged.
  17. Fokke Zandbergen 2016-02-19

    [~cbarber] agree, [~fmiao] can you make sure we keep what for 6.0 will be the fatal error in your PR for 5.4, but then as deprecation warning (without the exit)? https://github.com/appcelerator/titanium_mobile/pull/7757/files#diff-f430483233aa01af5b10df8390f9635dL1491
  18. Feon Sua Xin Miao 2016-07-11

    PR: https://github.com/appcelerator/titanium_mobile/pull/8123
  19. Chee Kiat Ng 2016-07-12

    APPROVED.
  20. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source