[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.0option 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.3option. Xcode 7.3.1 is automatically selected on build. Here is the command from Studio when building for simsiOS 9.3/WatchOS 2.2and selectingiOS SDK 9.3:/usr/local/bin/node /Users/Eric/.appcelerator/install/5.5.0-6/package/node_modules/titanium/lib/titanium.js build run --platform ios --log-level trace --sdk 5.5.0.v20160912200427 --project-dir /Users/Eric/Documents/Appcelerator_Studio_Workspace/ClassicWatch3 --target simulator --ios-version 9.3 --device-family universal --deploy-type development --sim-type iphone --sim-version 9.3 --watch-device-id FF879C84-1C67-42E7-A971-32165993D5AE --launch-watch-app --device-id 5D0E5EA5-E8C6-4C3D-A569-3C94957A3AE6 --skip-js-minify --no-colors --no-progress-bars --no-prompt --prompt-type socket-bundle --prompt-port 57524 --config-file /var/folders/l6/5xvw88dx3zg3mqm0t080tt040000gn/T/build-1473747034969.json --no-banner --project-dir /Users/Eric/Documents/Appcelerator_Studio_Workspace/ClassicWatch3Ran this in Studio (9.3 with 2.2). Command in Studio:
Error:/usr/local/bin/node /Users/msamah/.appcelerator/install/5.5.0-6/package/node_modules/titanium/lib/titanium.js build run --platform ios --log-level trace --sdk 5.5.0.v20160913000746 --project-dir /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme --target simulator --ios-version 9.3 --device-family universal --deploy-type development --sim-type iphone --sim-version 9.3 --watch-device-id BD4EB193-E164-4506-81D5-4B6B968521BB --launch-watch-app --device-id 5D78919B-5DC7-459B-AD81-D6D0E79C0877 --skip-js-minify --no-colors --no-progress-bars --no-prompt --prompt-type socket-bundle --prompt-port 55707 --config-file /var/folders/b8/h4wq2hlx2511m55c623vny980000gp/T/build-1473760722332.json --no-banner --project-dir /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestmeAble 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:Command /usr/local/bin/node /Users/msamah/.appcelerator/install/5.5.0-6/package/node_modules/titanium/lib/titanium.js build run --platform ios --log-level trace --sdk 5.5.0.v20160913000746 --project-dir /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme --target simulator --ios-version 10.0 --device-family universal --deploy-type development --sim-type iphone --sim-version 10.0 --watch-device-id BD4EB193-E164-4506-81D5-4B6B968521BB --launch-watch-app --device-id 705358B4-395E-4A1B-9150-D6D24847C6F0 --skip-js-minify --no-colors --no-progress-bars --no-prompt --prompt-type socket-bundle --prompt-port 51852 --config-file /var/folders/b8/h4wq2hlx2511m55c623vny980000gp/T/build-1473761312867.json --no-banner --project-dir /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme [INFO] : Found Titanium plugin id=ti.alloy version=1.0 [INFO] : Deploy type: development [INFO] : Building for target: simulator [INFO] : Building using iOS SDK: 10.0 [INFO] : Building for iOS Simulator: iPhone 5 [INFO] : Building for device family: universal [INFO] : Minimum iOS version: 8.0 [INFO] : Debugging disabled [INFO] : Profiler disabled [INFO] : Set to copy files instead of symlinking [INFO] : Forcing clean build: /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme/build/iphone/build-manifest.json does not exist [INFO] : Initializing the build directory [INFO] : Found Alloy app in /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme/app [INFO] : Executing Alloy compile: /usr/local/bin/node /Users/msamah/.appcelerator/install/5.5.0-6/package/node_modules/alloy/bin/alloy compile /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme/app --config platform=ios,version=0,simtype=none,devicefamily=universal,deploytype=development,target=simulator --no-colors [WARN] : Generated "/i18n" directory is not ignored by Git, please add it to your .gitignore [WARN] : Generated "/platform" directory is not ignored by Git, please add it to your .gitignore [INFO] : [config.json] config.json unchanged, using cached config.json... [INFO] : ----- MVC GENERATION ----- [INFO] : [global style] loading from cache... [INFO] : [index.xml] view processing... [INFO] : style: "index.tss" [INFO] : view: "index.xml" [INFO] : controller: "index.js" [INFO] : created: "Resources/iphone/alloy/controllers/index.js" [INFO] : created: "Resources/iphone/alloy/styles/index.js" [INFO] : [INFO] : [app.js] using cached app.js... [INFO] : [INFO] : ----- OPTIMIZING ----- [INFO] : - iphone/alloy.js [INFO] : - iphone/alloy/sync/localStorage.js [INFO] : - iphone/alloy/sync/properties.js [INFO] : - iphone/alloy/sync/sql.js [INFO] : [INFO] : Alloy compiled in 1.6102s [INFO] : Alloy compiler completed successfully [INFO] : Creating Xcode project [WARN] : WatchKit App detected, changing minimum iOS deployment target from 8.0 to 9.0 [INFO] : Creating Entitlements.plist [INFO] : Creating Info.plist [INFO] : Disabling ATS [INFO] : Creating main.m [INFO] : Creating Xcode config files [INFO] : Copying Titanium libraries [INFO] : Copying Titanium iOS files [INFO] : Installing default LaunchScreen.storyboard [INFO] : Copying iOS extensions [WARN] : WatchKit App's CFBundleVersion "1" does not match the app's CFBundleVersion "1.0". [WARN] : Setting the WatchKit App's CFBundleVersion to "1.0" [INFO] : Cleaning Xcode derived data [INFO] : Creating debugger and profiler plists [INFO] : Analyzing Resources directory [INFO] : Analyzing platform files [INFO] : Analyzing module files [INFO] : Analyzing localized launch images [INFO] : Analyzing CommonJS modules [INFO] : Creating asset catalog [INFO] : Creating app icon set [INFO] : Creating launch logo image set [INFO] : Missing 5 launch logos, generating missing launch logos from DefaultIcon.png [WARN] : If this app has been previously installed on this simulator, you may need restart it to see the latest launch logo [WARN] : iOS renders and caches the launch screen to a PNG image that seems to only be invalidated by restarting iOS [INFO] : Missing 16 app icons, generating missing icons [INFO] : appicon-Small.png - Used for iPad - size: 29x29 [INFO] : appicon-Small@2x.png - Used for iPhone, iPad - size: 58x58 [INFO] : appicon-Small@3x.png - Used for iPhone - size: 87x87 [INFO] : appicon-Small-40.png - Used for iPad - size: 40x40 [INFO] : appicon-Small-40@2x.png - Used for iPhone, iPad - size: 80x80 [INFO] : appicon-Small-40@3x.png - Used for iPhone - size: 120x120 [INFO] : appicon-60@2x.png - Used for iPhone - size: 120x120 [INFO] : appicon-60@3x.png - Used for iPhone - size: 180x180 [INFO] : appicon-76.png - Used for iPad - size: 76x76 [INFO] : appicon-76@2x.png - Used for iPad - size: 152x152 [INFO] : appicon-83.5@2x.png - Used for iPad - size: 167x167 [INFO] : LaunchLogo~iphone - Used for iphone - size: 320x320 - size: 320x320 [INFO] : LaunchLogo@2x~iphone - Used for iphone - size: 374x374 - size: 374x374 [INFO] : LaunchLogo@3x~iphone - Used for iphone - size: 621x621 - size: 621x621 [INFO] : LaunchLogo~ipad - Used for ipad - size: 384x384 - size: 384x384 [INFO] : LaunchLogo@2x~ipad - Used for ipad - size: 1024x1024 - size: 1024x1024 [INFO] : Creating launch image set [INFO] : Creating assets image set [INFO] : Processing JavaScript files [INFO] : Writing app properties [INFO] : Writing i18n files [INFO] : Processing Titanium symbols [INFO] : Removing files [INFO] : Invoking xcodebuild [INFO] : Finished building the application in 3m 7s 977ms [INFO] : Launching iOS Simulator [ERROR] : An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=161): The operation couldn’t be completed. Invalid argument Invalid argumentI 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.