Bits & Babble

A blog in development.

Fix for Titanium.API.info Not Working in OS X

November 19, 2013  

Titanium.API.info Not Working?

After recently upgrading OS X and Xcode, my Titanium iOS simulator log had some serious issues. Issues, as in, Titanium.API.info not working at all. A quick Googling let me to this three year old Appcelerator Question forum post. While the post was for an old version of Titanium, Xcode, and version 4 of the iPhone simulator, the same situation had reappeared for the latest simulator version.

The basic problem is that the Titanium console uses symbolic links to read from the iPhone Simulator app’s log. Every time the simulator gets an upgrade to a new version, the Titanium build process must be modified, and Appcelerator has to push out an update for Titanium Studio. Sometimes they’re not right on top of that, Rose.

After personally running into this problem, I quick fixed my issue using that post as a guideline. A few days later, I switched the simulator’s hardware option from iPhone Retina (4-inch) to iPhone Retina (4-inch 64-bit). This killed my Titanium console log again.

The point is, until Appcelerator pushes out an update, any time you switch the hardware option of the simulator, you’ll need to update your symlinks.

Let’s Fix It, Felix

So let’s walk through the simple process. First, open up a command prompt and change directory to the iPhone Simulator support directory. Then take a look at any existing sym links with ls -la.

1
2
cd ~/Library/Application\ Support/iPhone\ Simulator
ls -la

cd ~/Library/Application\ Support/iPhone\ Simulator ls -la

Next, we need to create a symbolic link to the simulator we’re using. We’ll use the ln command with the -s option to create the symlink. Here, I’m assuming we’re using the 64-bit version of the iOS 7 simulator.

1
2
ln -s 7.0.3-64 7.0
ls -la

ln -s 7.0.3-64 7.0 ls -la

That’s it. Rebuild and run your project, and you should be good to go. You can confirm your new symlink with the ls -la command. Just remember you’ll need to change this symlink every time you change the simulator hardware option, at least, until Appcelerator gets this implemented into the latest build process.

6 Comments

By SPENCER SOKOL
  • About
  • Twitter
  • Studio 27

Categories

  • Alloy
  • Android
  • Appcelerator Titanium
  • Babble
  • Debugging
  • Genesis
  • iOS
  • s2Member
  • Woocommerce
  • Wordpress

About Spencer Sokol

Spencer co-founded Studio 27, a small web and application design and development company in Indianapolis. He has spent many years in both the development and testing side of the software industry, and generally avoids talking to people face to face.

Trackbacks

  1. Pingback: This Week in Titanium Mobile Development: 25 Nov 2013 | Titanium Development
  2. Pingback: This Week in Titanium Mobile Development: 25 Nov 2013 | TiDev

Comments

  1. Yann says

    November 26, 2013 at 7:34 am

    Hi!

    It doesn’t work for me. here is my “iPhone Simulator” folder :

    drwxr-xr-x 8 yann staff 272 24 jul 14:29 6.1
    drwxr-xr-x 3 yann staff 102 25 jul 12:56 tmp
    drwxr-xr-x 5 yann staff 170 11 oct 13:59 Media
    drwxr-xr-x 14 yann staff 476 11 oct 13:59 Library
    drwxr-xr-x 10 yann staff 340 21 nov 12:00 7.0.3-64
    drwxr-xr-x 11 yann staff 374 26 nov 09:23 7.0.back
    lrwxr-xr-x 1 yann staff 8 26 nov 09:24 7.0 -> 7.0.3-64
    drwxr-xr-x 11 yann staff 374 26 nov 11:54 7.0.3

    is there something wrong ?
    1fter that, I clean and build my projet, and the Ti.API.warn/info doesn’t appear in the console.

    Reply
    • Spencer Sokol says

      November 26, 2013 at 2:05 pm

      Are you using the 64-bit version of the 7.0 Simulator? You’ll need to make sure that the version of the simulator matches the symlink.

      Reply
      • Yann says

        November 27, 2013 at 9:53 am

        Ok, it was that! thanks 😉

        Reply
  2. dh says

    December 14, 2013 at 2:03 pm

    bless you!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • About
  • Indianapolis Design & Development
Copyright © 2021 Spencer Sokol

Copyright © 2021 · Bits and Babble on Genesis Framework · WordPress · Log in