[TIMOB-20083] Remove watchos1 template and related code
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-12T03:31:30.000+0000 |
Affected Version/s | Release 5.1.1 |
Fix Version/s | Release 6.0.0 |
Components | iOS, Tooling |
Labels | breaking-change, notable, watch |
Reporter | Fokke Zandbergen |
Assignee | Feon Sua Xin Miao |
Created | 2015-12-02T07:57:22.000+0000 |
Updated | 2018-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
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:
5. Build a project that has a watchOS 2 app 6. Build should succeed.
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?
[~cng] won't it already fail if you use a template name that no longer exists?
[~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/Well, then thats a separate bug which should also happen if you do
appc new -t applewatch --template foo
The CLI should be already handling non-existent template. Also, this is the error message I get.
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.
OK PR Approved and merged!
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]
[~fmiao] I'll need this PR that was merged, to be reverted on master. Thanks.
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
Agreed with Fokke. [~fmiao] can you PR to re-insert build support in iphone/cli/commands/_build.js on master branch?
[~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.
PR: https://github.com/appcelerator/titanium_mobile/pull/7757 It would be alot easier if we have a branch for 5_4_X.
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.
PR merged.
[~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
PR: https://github.com/appcelerator/titanium_mobile/pull/8123
APPROVED.
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.