[TIMOB-23905] iOS: Build fails when selecting iOS 9.0 and watchOS 2.0 using iOS SDK 9.3 or 9.2
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 6.0.0, Release 5.5.0, Release 5.5.1 |
Fix Version/s | n/a |
Components | iOS |
Labels | cb-tooling, engReviewed, qe-5.5.0 |
Reporter | Eric Wieber |
Assignee | Unknown |
Created | 2016-09-14T22:37:02.000+0000 |
Updated | 2020-01-30T19:09:46.000+0000 |
Description
I receive the below error when trying to build for iOS 9.0 and WatchOS 2.0 sims using the iOS SDK 9.3 or 9.2. One example command is:
appc run --platform ios --log-level trace --ios-version 9.3 --sim-version 9.0 --watch-device-id E5CE2E3B-84AB-453B-B3FE-0BDD4BBBCBE4 --launch-watch-app --device-id 5C5D053D-D4AE-451F-8573-2E4174315471
The error received is:
[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : CompileSwift normal i386 /Users/Eric/Documents/Appcelerator_Studio_Workspace/ClassicWatch3/build/iphone/extensions/ClassicWatch3/ClassicWatch3 WatchKit Extension/NotificationController.swift
[ERROR] : CompileSwift normal i386 /Users/Eric/Documents/Appcelerator_Studio_Workspace/ClassicWatch3/build/iphone/extensions/ClassicWatch3/ClassicWatch3 WatchKit Extension/ExtensionDelegate.swift
[ERROR] : CompileSwift normal i386 /Users/Eric/Documents/Appcelerator_Studio_Workspace/ClassicWatch3/build/iphone/extensions/ClassicWatch3/ClassicWatch3 WatchKit Extension/InterfaceController.swift
[ERROR] : CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
[ERROR] : (4 failures)
*Steps to reproduce issue*
1. Create a new project
2. Add a WatchOS app to your project
3. Build the project for simulators iOS 9.0/WatchOS 2.0
using the iOS SDK 9.3
(you can set this in the run configurations, if in Studio)
*Expected Results*
The app builds and runs without issue
*Actual Results*
The build fails with the above error
*Notes*
I have encountered this and received the below error in Studio, but the above error is shown in the CLI with the same command:
[TRACE] : [ioslib] Waiting for Watch App to install...
[ERROR] : Watch App installation failure: __96-[SPCompanionAppInstaller sendInstallationDataWithPath:dataType:name:info:installer:completion:]_block_invoke337, fileHandle == nil for com.appc.classic.watchkitapp, path: /Users/Eric/Library/Developer/CoreSimulator/Devices/F1F70A5E-331E-4051-86BA-0B550180CFEF/data/Library/Caches/com.apple.companionappd/com.appc.classic.watchkitapp.zip
These are the sims/xcode version selected:
[TRACE] : [ioslib] Selected iOS Simulator: iPhone 5
[TRACE] : [ioslib] UDID = 5C5D053D-D4AE-451F-8573-2E4174315471
[TRACE] : [ioslib] iOS = 9.0
[TRACE] : [ioslib] Selected WatchOS Simulator: Apple Watch - 38mm
[TRACE] : [ioslib] UDID = E5CE2E3B-84AB-453B-B3FE-0BDD4BBBCBE4
[TRACE] : [ioslib] WatchOS = 2.0
[TRACE] : [ioslib] Autoselected Xcode: 7.3.1
[~jvennemann] is this because of the template created when you do *appc new -t applewatch* ?
Yes the template is created during project creation and targeted for Swift 3.0 since 5.5.0. So trying to later run the project with iOS SDK 9.3 and Xcode 7/Swift 2.3 will result in the described error. Maybe we can introduce a new option when running
appc new -t applewatch
which allows to choose either a Swift 2 or Swift 3 template? But this doesn't prevent the user from changing the iOS version later on. Another solution could be to improve the error handling and print a more user friendly message stating the the Swift code needs to be changed in order to run with older Swift versions.we can do both solution. there's already a way to select the template on appc cli. I think our users are ok, as long as we explain. And yes lets have a more user friendly message.