[TIMOB-23614] iOS10: Titanium with Swift Watch App fails to build on Xcode 8.0 Beta
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-08-24T21:04:28.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.5.0 |
Components | iOS, Tooling |
Labels | qe-5.5.0, watchOS3 |
Reporter | Chee Kiat Ng |
Assignee | Jan Vennemann |
Created | 2016-07-05T04:05:04.000+0000 |
Updated | 2016-08-24T21:04:46.000+0000 |
Saw this on Xcode 8 release notes. maybe useful: {quote}The version of Swift 2 (2.3) used in Xcode 8 is very close to the version used in Xcode 7.3.1. However, it has been updated for the newer SDKs, and therefore is not compatible with Swift frameworks compiled in Xcode 7.3.1. Distributing binary Swift frameworks remains unsupported in Xcode 8. (25680392){quote}
[~jvennemann] [~hansknoechel] The PR fixed partially the problem. Try the run case above again. you'll see this error:
If you check
appc ti info
you will see the device id and watch id does corresponding to iOS10 and watchOS 3.0 so for some reason it thinks it's an error. This might be an ioslib detection issue, that will require [~cbarber] to help take a look at.The error is coming from ioslib.
simctl
does not tell which Watch Simulators can be paired with which iOS Simulators, so I created a lookup table that must be manually maintained: https://github.com/appcelerator/ioslib/blob/master/lib/simulator.js#L73-L96. It'll take some trial and error figure out the correct compatibility, but it should be pretty easy. I'd be happy to fix it when I'm back.I am still able to reproduce this issue. Here is the test case I ran: 1. appc new --classic (and another project as a default Alloy Project) 2. Enter project root 3. appc new -t applewatch 3. Specified the
<team-id>
property in the tiapp.xml 4. appc run -p ios -I 10.0 --launch-watch-app -l trace *Logs:*Tested On: iPhone 6S (10.0) Simulator WatchOS3 (3.0) Simulator Mac OSX El Capitan 10.11.6 Ti SDK: 5.5.0.v20160816120242 Appc Studio: 4.7.0.201607250649 Appc NPM: 4.2.7 App CLI: 5.5.0-5 Xcode 8.0 beta 6 (8S193k) Node v4.4.7 *Reopening Ticket.*
Confirmed. Here's the TiSDK master PR for this ticket: https://github.com/appcelerator/titanium_mobile/pull/8120 [~jvennemann] Please be sure to add a link to the PR in the ticket for which it resolves. [~jvennemann] Also, this PR needs to be backported to 5_5_X so that [~htbryant] can close this ticket. Thanks!
Oh sorry, i must have missed to post the PR link for this one. Here is the 5.5.X backport: https://github.com/appcelerator/titanium_mobile/pull/8243
backport tested and merged.
Since the API changed when i did the original fix, the master and 6.0.x branch also need to be updated. PR (master): https://github.com/appcelerator/titanium_mobile/pull/8248 PR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8249
I am still able to reproduce issue, tested with the latest SDK build (5.5.0.v20160822000355) and the same error occurs when trying to build. Checked the PR against my SDK under _templates/applewatch/watchos2-swift/template/
WatchkitExtName
/InterfaceController.swift.ejs_ and verified that the change is present. *Reopening Ticket.*[~htbryant], are you using the latest Xcode 8 Beta 6?
[~jvennemann] I asked [~ewieber] to validate and he did not experience the issue. After further investigation I found that my xcode configuration was not as it should be. I removed my Xcode Beta and did a fresh install, and I no longer encounter the issue. I can confirm that I am able to build a Titanium app with a Swift Watch app on Xcode 8.0 Beta 6, for Simulators. However, I am encountering issues with Devices as a target. The Titanium app installs without problem on the iPhone 6S (iOS10 beta 7), but when attempting to install the app on the watch device, it fails to do so. This is currently under investigation by myself and [~ewieber], who will report on his findings when he gets the opportunity to validate. Tested On: iPhone 6S (10.0) Device & Simulator Apple Watch (OS 3.0) Device & Simulator Mac OSX El Capitan 10.11.6 Ti SDK: 5.5.0.v20160822000355 Appc Studio: 4.7.1.201608190732 Appc NPM: 4.2.7 App CLI: 5.5.0-5 Version 8.0 beta 6 Node v4.4.7
Probably somewhere the swift-version is set to 2.3 but needs to be 3.0 OR have the legacy-flag in it? -The
MySwift.swift
file has correct Swift 3 syntax (which is the same as Swift 2.x here, since it's a very simpleUIImageView
). #my2cents- *EDIT*: Whoops, that was for TIMOB-23808.The
SWIFT_VERSION
build settings in the extension'sproject.pbxproj
should be set to 3.0. This will be set by [this template](https://github.com/appcelerator/titanium_mobile/blob/master/templates/applewatch/watchos2-swift/template/ExtName
.xcodeproj/project.pbxproj.ejs#L336). I think Xcode changed that when i opened the project manually and it still had old swift syntax in it, so that's another thing you could look at.[~jvennemann] [~hansknoechel] , [~ewieber] and I finally isolated the problem down to our provisioning profiles, and after removing our current ones and installing newly configured profiles, were able to install watch apps without any issue. Resolving this ticket as fixed. Tested On: iPhone 6S (10.0) Device & Simulator Apple Watch (OS3) Device & Simulator Mac OSX El Capitan 10.11.6 Ti SDK: 5.5.0.v20160822000355 Appc Studio: 4.7.1.201608190732 Appc NPM: 4.2.7 App CLI: 5.5.0-5 Version 8.0 beta 6 (8S201h) Node v4.4.7 *Closing ticket.*