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 |
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 |
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.
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.
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.
Ok, it was that! thanks 😉
bless you!