Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1257] update ios-sim for Xcode 6

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2014-09-25T18:29:41.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator CLI
Labelsn/a
ReporterPaul Mietz Egli
AssigneeChris Barber
Created2014-09-25T17:54:39.000+0000
Updated2016-03-08T07:37:38.000+0000

Description

The 3.4.0-rc2 SDK contains ios-sim version 2.0, which doesn't work with the simulators in Xcode 6. The current workaround is to install ios-sim using npm install -g ios-sim and replacing the iphone/ios-sim file with a symlink to /usr/local/bin/ios-sim.

Comments

  1. Chris Barber 2014-09-25

    The version of ios-sim that ships with Titanium SDK 3.4.0-rc most certainly supports Xcode 6. You should not install ios-sim from npm. Can you please elaborate on why you believe ios-sim does work with the Xcode 6 iOS Simulator? What behavior are you seeing? Please be very specific.
  2. Paul Mietz Egli 2014-09-25

    Hi Chris, thanks for the quick response. I'm trying to build and run a module that was created with the CLI as follows: {noformat} $ ti sdk install 3.4.0.v20140916181713 $ ti create -p ios -t module -d /tmp -n test -u http:// --id com.example.test $ cd /tmp/test/iphone $ python build.py $ ln -s ../example . $ python ~/Library/Application\ Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/titanium.py run {noformat} The output of the final command is: {noformat} [INFO] Minimum iOS version: 4.3 Linked iOS Version 8.0 [DEBUG] executing command: /usr/bin/killall ios-sim [DEBUG] No matching processes belonging to you were found [DEBUG] executing command: /usr/bin/killall iPhone Simulator [DEBUG] No matching processes belonging to you were found [DEBUG] finding old log files [INFO] Launching application in Simulator [DEBUG] Unable to load simulator framework. Error: (null) [DEBUG] Failed to find class DTiPhoneSimulatorSystemRoot at runtime. [INFO] Launched application in Simulator (26.13 seconds) [INFO] Application has exited from Simulator {noformat} The version of the ios-sim executable used by titanium.py is 2.0: {noformat} $ ~/Library/Application\ Support/Titanium/mobilesdk/osx/3.4.0.v20140916181713/iphone/ios-sim --version 2.0 {noformat} If I replace ios-sim with a symlink to 3.0 as described above, the simulator launches successfully and loads the generated example app. I expect the answer to this problem is that the titanium.py script isn't supported any more, which is a bummer because the CLI currently doesn't have a one-step way to generate and launch a test app based on the contents of the example directory. Let me know if you need any additional info.
  3. Chris Barber 2014-09-25

    Ah, I see now. We are in the process of rewriting the build process for modules (TIMOB-10757) and we're not quite finished yet. The building of modules is the only Python code left. I highly recommend you do NOT use titanium.py. It's very old, very out-of-date, and not maintained. Until TIMOB-10757 is finished, I recommend you create a new mobile app, then create a small bash script that calls build.py from the ios module's directory, unzips the generated module zip file into the project directory, and run ti build from the project dir. I know this seems like a lot of work, but it's probably the best workflow right now.
  4. Paul Mietz Egli 2014-09-25

    Sounds good; thanks for your help!
  5. Paul Mietz Egli 2014-09-26

    I've got an interim module build-and-test process working now and thought I'd share in case anyone else is having similar issues:

    Use the old titanium.py script to generate the test application from your current example directory.

    Find the temporary directory where the example app was staged in the log output. It should be something like /var/folders/pr/769r4l2d4q11jstd9bvyd95r0000gq/T/mb1K27Lti/MODULENAME.

    cp -R /var/folders/pr/769r4l2d4q11jstd9bvyd95r0000gq/T/mb1K27Lti/MODULENAME ../testapp

    *IMPORTANT* edit .../testapp/tiapp.xml and remove the extra <modules/> section. You probably want to get rid of the version number on the remaining <module/> tag as well.

    Once this is done, you can build and run for iOS like this:
       ./build.py && cp com.example.mymodule-iphone-1.0.0.zip ../testapp/ && ti build -p iphone -F iphone -d ../testapp
       
    and for Android like this:
       ant clean dist && cp dist/com.example.mymodule-android-1.0.0.zip ../testapp/ && ti build -p android -d ../testapp
       
  6. Pussaaon Jungjatuporn 2014-10-21

    Hi, Paul your solution is for build or pack the module right ? not the testing module with titanium.py run because I also found the same problem with you but for me the build process works fine, only the testing module that throw me the error
  7. Paul Mietz Egli 2014-10-21

    Yes, this is what I am now doing to build and test my modules. The commands above replace the call to titanium.py run that was used prior to the 3.4.0 SDK.
  8. Pussaaon Jungjatuporn 2014-10-22

    ah ok, so it actually run test the module

JSON Source