Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23894] iOS: -I flag not acknowledged when selecting iOS9 and watchos2.2 using iOS sdk 10.0

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-09-13T03:34:44.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.5.0, ioslib 0.15.2, ioslib 0.15.3
ComponentsiOS, Tooling
Labelsn/a
ReporterChee Kiat Ng
AssigneeChris Barber
Created2016-09-12T06:09:04.000+0000
Updated2016-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)

Comments

  1. Jan Vennemann 2016-09-12

    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.
  2. Chris Barber 2016-09-12

    ioslib PR: https://github.com/appcelerator/ioslib/pull/46
  3. Chris Barber 2016-09-13

    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
  4. Chee Kiat Ng 2016-09-13

    PRs merged.
  5. Eric Wieber 2016-09-13

    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 sims iOS 9.3/WatchOS 2.2 and selecting iOS 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/ClassicWatch3
       
       [TRACE] :  [ioslib] Selected iOS Simulator: iPhone 6
       [TRACE] :  [ioslib]   UDID    = 5D0E5EA5-E8C6-4C3D-A569-3C94957A3AE6
       [TRACE] :  [ioslib]   iOS     = 9.3
       [TRACE] :  [ioslib] Selected WatchOS Simulator: Apple Watch - 38mm
       [TRACE] :  [ioslib]   UDID    = FF879C84-1C67-42E7-A971-32165993D5AE
       [TRACE] :  [ioslib]   WatchOS = 2.2
       [TRACE] :  [ioslib] Autoselected Xcode: 7.3.1
       
  6. Ashraf Abu 2016-09-13

    Ran this in Studio (9.3 with 2.2). Command in Studio:
        /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/testestme
       
    Error:
       [ERROR] :  ** BUILD FAILED **
       [ERROR] :  The following build commands failed:
       [ERROR] :  	CompileSwift normal i386 /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme/build/iphone/extensions/deteleteest/deteleteest WatchKit Extension/NotificationController.swift
       [ERROR] :  	CompileSwift normal i386 /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme/build/iphone/extensions/deteleteest/deteleteest WatchKit Extension/ExtensionDelegate.swift
       [ERROR] :  	CompileSwift normal i386 /Users/msamah/Documents/Appcelerator_Studio_Workspace/testestme/build/iphone/extensions/deteleteest/deteleteest WatchKit Extension/InterfaceController.swift
       [ERROR] :  	CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
       [ERROR] :  (4 failures)
       
    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.
  7. Ashraf Abu 2016-09-13

    Tried with 10.0 with 2.2 (in Studio) Error:
       [ERROR] :  An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=161):
       The operation couldn’t be completed. Invalid argument
       Invalid argument
       
    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 argument
       
  8. Eric Wieber 2016-09-13

    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:
       [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
       
    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:
       /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.0 --watch-device-id E5CE2E3B-84AB-453B-B3FE-0BDD4BBBCBE4 --launch-watch-app --device-id F1F70A5E-331E-4051-86BA-0B550180CFEF --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-1473771967982.json --no-banner --project-dir /Users/Eric/Documents/Appcelerator_Studio_Workspace/ClassicWatch3
       
  9. Eric Wieber 2016-09-14

    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.

JSON Source