Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15121] iOS7: Launching invalid iOS 7 Simulator prevents application logging

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-02-19T17:43:23.000+0000
Affected Version/sRelease 3.1.3
Fix Version/sRelease 3.2.2, Release 3.3.0
ComponentsCLI, iOS
Labelsios7, module_api, qe-3.1.3, qe-testadded
ReporterDustin Hyde
AssigneeChris Barber
Created2013-09-11T18:40:47.000+0000
Updated2014-07-25T21:50:07.000+0000

Description

Attachments

FileDateSize
run config.png2013-09-11T18:40:47.000+0000442536
simulator.png2013-09-11T18:40:47.000+0000201713

Comments

  1. Dustin Hyde 2013-09-11

    Note when it's in this state, the console does not seem to register logging events from app.
  2. Sabil Rahim 2013-09-12

    There should be some sort of internal validation inside CLI and studio that prevents user from ever selecting non-supported Simulator version's.
  3. Federico Casali 2013-09-16

    I was able to reproduce the issue and get into the broken event state following those steps: 1) Create a new project. Open "Run configuration" and run it using iOS SDK 7.0, Simulator version 7.0 and Display Type "Non-Retina". Result: iOS 7 Retina simulator is opening. Everything works fine as expected. 2) After point 1, "Run configuration" and run the project using iOS SDK 7.0, Simulator version 6.1 and Display Type "Non-Retina". Result: iOS 6.1 Simulator opens and everything works fine as expected. 3) After point 2, 'Run configuration" and run the project using iOS SDK 7.0, Simulator version 7.0 and Display Type "Non-Retina". Result: iOS 6.1 Simulator is being opened instead of the 7.0. In this states, all events are not diplayed in console. For example, something like:
       var win1 = Titanium.UI.createWindow({  
           title:'Tab 1',
           backgroundColor:'#fff'
       });
       var tab1 = Titanium.UI.createTab({  
           icon:'KS_nav_views.png',
           title:'Tab 1',
           window:win1
       });
       
       var label1 = Titanium.UI.createLabel({
       	color:'#999',
       	text:'I am Window 1',
       	font:{fontSize:20,fontFamily:'Helvetica Neue'},
       	textAlign:'center',
       	width:'auto'
       });
       
       label1.addEventListener('click', function(){
       	Ti.API.info('#### logging event');
       	console.log('#### console log');
       });
       
       win1.add(label1);
       
       win1.open();
       
       
    clicking on the 'label1' when the simulator is in this state does not produce any output in the console log.
  4. Eric Merriman 2013-09-16

    I am going to repurpose this ticket and change the title to reflect the lack of logging. We have another ticket that covers the root behavior.
  5. Chris Barber 2013-10-27

    With SDK 3.2, when I say --ios-version 7.0, it will set --sim-version also to 7.0 and the iOS Simulator launches running 7.0. As far as retina, there is no such thing anymore of a non-retina simulator running iOS 7.0. As far as the logging output, it works as expected.
  6. Pete Saia 2013-10-29

    I can confirm the console logging is not working as it should. Everything works well until the console gets to "[INFO] Focusing the iOS Simulator" and nothing else will output. Here are my versions: - node v0.10.21 (I tried multiple versions down to 0.9) - Titanium (CLI) 3.1.2 - Titanium SDK 3.1.3.GA - Xcode 5.0.1 Command: node ./node_modules/titanium/bin/titanium build --platform iphone --project-dir ./ --log-level trace --ios-version 7.0 -f -F iphone
  7. Ygor Lemos 2013-11-06

  8. Sabil Rahim 2014-02-19

    Should be fixed as part of TIMOB-15741. There are additional checks inside CLI itself that prevents this bad behavior from happening. In the off case where, it slips through over checks, the simulator would still give back logging info(confirmed it from ios-sim app side) Tested from within iossim using Xcode 5.0.2 (trying to launch iPad retina 64bit simulator)(using following command : ios-sim launch "/Users/sabilrahim/Documents/Appcelerator_Studio_Workspace/timob15796/build/iphone/build/Debug-iphonesimulator/timob15796.app" --xcode-dir "/Applications/temp folder/Xcode502.app/Contents/Developer/" --sdk 7.0 --family ipad --retina --sim-64bit)
  9. Wilson Luu 2014-02-20

    Closing ticket as fixed. Verified application logging appears on iOS 7 simulator with Alloy and Classic app. In the default Alloy app, added this code in index.js to verify:
       function doClick(e) {
           alert($.label.text);
           
           Ti.API.trace('#### monkey trace');
           Ti.API.debug('#### monkey debug');
           Ti.API.info('#### monkey info');
           Ti.API.warn('#### monkey warn');
           Ti.API.error('#### monkey error');
       	
           console.log('#### monkey console');
       }
       
    And in the default Classic app, added this code in app.js to verify:
       label1.addEventListener('click', function(e){
       	Ti.API.trace('#### monkey trace');
           Ti.API.debug('#### monkey debug');
           Ti.API.info('#### monkey info');
           Ti.API.warn('#### monkey warn');
           Ti.API.error('#### monkey error');
       	
           console.log('#### monkey console');
       });
       
    Tested on: Appcelerator Studio, build: 3.2.1.201402061120 SDK build: 3.2.2.v20140214120903, 3.3.0.v20140214150951 CLI: 3.2.1 Alloy: 1.3.1 Xcode: 5.0.2, 5.1 beta 5 Devices: iphone retina 3.5 inch simulator (7.0.3, 7.1), ipad retina simulator (7.0.3, 7.1)

JSON Source