[TIMOB-23894] iOS: -I flag not acknowledged when selecting iOS9 and watchos2.2 using iOS sdk 10.0
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-09-13T03:34:44.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.5.0, ioslib 0.15.2, ioslib 0.15.3 |
Components | iOS, Tooling |
Labels | n/a |
Reporter | Chee Kiat Ng |
Assignee | Chris Barber |
Created | 2016-09-12T06:09:04.000+0000 |
Updated | 2016-09-14T22:39:53.000+0000 |
Description
The current situation will cause issues if we do
appc run -p ios -W 3E12A7A9-2E07-454B-8E18-07AE56E48507 -C A92248F9-1588-4CC7-809A-88DDA16096C9 -I 10.0 --launch-watch-app
whereby we use iOS 9.3 simulator and watchOS 2.2 simulator built with iOS 10 SDK / Xcode 8, resulting in a swift error.
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR] CompileSwift normal i386 /Users/kiat/titaniumTestWatch/SGWatch3/build/iphone/extensions/SGWatch3/SGWatch3 WatchKit Extension/NotificationController.swift
[ERROR] CompileSwift normal i386 /Users/kiat/titaniumTestWatch/SGWatch3/build/iphone/extensions/SGWatch3/SGWatch3 WatchKit Extension/ExtensionDelegate.swift
[ERROR] CompileSwift normal i386 /Users/kiat/titaniumTestWatch/SGWatch3/build/iphone/extensions/SGWatch3/SGWatch3 WatchKit Extension/InterfaceController.swift
[ERROR] CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
[ERROR] (4 failures)
ioslib selects a wrong Xcode Version when you preselect iOS 9.3 and watchOS 2.2 sims and the iOS SDK version set to 10, which will cause the build to fail. So this is not caused by a wrong template. [~cbarber] is already working on a fix for that.
ioslib PR: https://github.com/appcelerator/ioslib/pull/46
TiSDK master PR: https://github.com/appcelerator/titanium_mobile/pull/8359 TiSDK 6_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/8360 TiSDK 5_5_X PR: https://github.com/appcelerator/titanium_mobile/pull/8361
PRs merged.
I do not encounter this issue when using the
-I 10.0
option with the following sim combinations:iOS 10/WatchOS 3.0
,iOS 10/WatchOS 2.2
,iOS 9.3/WatchOS 3.0
,iOS 9.3/WatchOS 2.2
,iOS 9.0/WatchOS 2.0
. I *do* encounter this issue when using the-I 9.3
option. Xcode 7.3.1 is automatically selected on build. Here is the command from Studio when building for simsiOS 9.3/WatchOS 2.2
and selectingiOS SDK 9.3
:Ran this in Studio (9.3 with 2.2). Command in Studio:
Error:
Able to reproduce error. **NOTE**: Using iOS SDK 9.3 requires Xcode 7 to build which includes Swift 2.3. The watchOS templates in TI SDK 5.5.0 are targeted for Swift 3 resulting in the above error.
Tried with 10.0 with 2.2 (in Studio) Error:
Logs:
I also appear to encounter this with sims
iOS 9.0/WatchOS 2.0
. When I build with that pair in Studio, I get the below error:However, if I take the build command from Studio console and run it in the CLI, then I get the error from this ticket. Command for reference:
Verified that the issue in the main body of the ticket is fixed, using: MacOS 10.12 (16A313a) Studio 4.7.1.201609100950 Ti SDK 5.5.0.GA Appc NPM 4.2.7 Appc CLI 5.5.0 Alloy 1.9.2 Xcode 8.0 (8A218a) The issue still occurs with iOS 9.0 and WatchOS 2.0 sims with the iOS SDK 9.3 or 9.2. Created TIMOB-23905 to track the related issue. Tested by creating new watchOS apps and building them for the mentioned simulators with the iOS SDK 10.0. No error was encountered.