What To Do When Titanium Doesn’t List iOS Simulators as a Build Option

I’ve encountered this problem before but couldn’t remember how I solved it. Usually it happens with an SDK update or something similar. Disclaimer: this is for Mac users.

What happens is that when you tried to run an app in the iOS simulator, you will no longer see any of the options. It may just list Android and/or iTunes Sync but no simulators are listed. What worked for me was to:

  • locate the hidden ./titanium directory in my home folder on my Mac
  • Delete it.
  • Then in Titanium, go to the terminal and type in: titanium sdk select
  • Select the current/latest build of the Titanium SDK
  • Restart Titanium
  • The simulator options should be there

iOS File Size for Custom Local Notification Ringtones Using Appcelerator’s Titanium

Recently I worked on a project for a client in which local notifications were needed along with custom ringtones that the user could use. I won’t go into the code about local notifications but more importantly, the ringer files.

First thing you want to do is put them in a “sounds” folder inside the “Resources” directory (reference the sounds files in the code as “sounds/soundname.caf”. Next, you want to convert your sound files to .caf files. An easy way to do this is through Terminal (on a Mac, not sure about PC). Enter the following:

afconvert -f caff -d LEI16@44100 originalfile.mp3 nameofnewfilewhateveryouwant.caf

You’ll need to navigate to the file using Terminal commands but once you get there you’re golden. So now you have your sounds folder, your converted sound files, and the last most important step is to make sure they’re less than appx. 4.5 MB. Any sound file above this seems to not be able to sound off when the notification fires. You end with a silent notification.

As always, I’m sharing for you all but this is just a journal for me to refer to when getting stuck on things I’ve forgotten about. Especially small things like this nuisance.