Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Really? That's the first impression?

I downloaded Titanium, ran the IDE, followed the instructions in GettingStarted PDF, build the HelloWorld app, tried to launch in simulator, got:

[ERROR] Your TARGET_BUILD_DIR is incorrectly set. Most likely you have configured in Xcode a customized build location. Titanium does not currently support this configuration.
[ERROR] Expected dir /Users/dpc/GamesDevelopment/Sonotope/titanium/Sit Your Mind/build/iphone/build/Debug-iphonesimulator, was: /Users/dpc/GamesDevelopment/Sonotope/titanium/Sit Your Mind/build/iphone/build

searched the forums, looked at whether I'd set custom build path in xcode, saw I hadn't puzzled over this.

Searched for app.js in resources folder, which the pdf said I should find, nothing there.

This is seriously dodgy for a first impression…am I missing something?

— asked October 18th 2010 by David Plans
0 Comments

11 Answers

  • I did a write up here for this but the short answer is:

    Modify the XCode template under your SDK:
    /Library/Application Support/Titanium/mobilesdk/osx/1.7.0/iphone/iphone/Titanium.xcodeproj

    Delete any values in the Build Products Path and Intermediate Build Files Path. Then under per-configuration build products path enter the following:

    Debug enter - $(BUILD_DIR)/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

    Release enter - $(BUILD_DIR)/build/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

    — answered June 14th 2011 by Craig Williams
    permalink
    0 Comments
  • What does the directory structure look like in your project folder? Any odd file permissions?

    There are 2 (or more) Resources folders. One is in the project folder, the others are in the build folder. You'd be after the one in the project folder.

    Another question I have is do you have the regular install of the SDK or just the XCode 4 preview?

    — answered October 18th 2010 by John McKnight
    permalink
    12 Comments
    • Well, the permissions are all drwxr-xr-x so can't see that this would be the problem. And yup, I was looking at the root folder Resources folder…

      If by a regular install of the SDK you mean the one people are encouraged to download here:

      http://www.appcelerator.com/products/download/

      Then I guess so, yes.

      — commented October 18th 2010 by David Plans
    • I've just tried on a different machine with a fresh download of Titanium, followed instructions, same xcode path error.

      Surely this is a broken release?

      Anyone from appcelerator even here?

      — commented October 18th 2010 by David Plans
    • I can see that question may have been vague. What SDK from Apple did you install? Is it the XCode 3.2.x or the XCode 4 preview? The reason it matters is the XCode 4 preview installs in a non-standard location and could cause issues when you attend to build an iPhone/iPad project. You should avoid the 4.2 beta release from Apple as well because it has been known to be a bit buggy.

      I do not believe the current builds are broken. I am using Titanium with the current SDK (both Apple and Titanium) and also the beta SDK from Titanium.

      What happens when you create a new project for iPhone and try to do a build to the simulator?

      — commented October 18th 2010 by John McKnight
    • Ok thanks John. I'm using xcode 3.2.4 and the iOS 4.1 SDK…so: any thoughts on how I might go about getting a working environment? I've tried actually setting a custom build environment but it makes no difference…I get:

      [INFO] Compiling JavaScript…one moment
      [INFO] No JavaScript errors detected.
      [INFO] One moment, building …
      [ERROR] Your TARGET_BUILD_DIR is incorrectly set. Most likely you have configured in Xcode a customized build location. Titanium does not currently support this configuration.
      [ERROR] Expected dir /Users/dpc/GamesDevelopment/Sonotope/titanium/Sit Your Mind/build/iphone/build/Debug-iphonesimulator, was: /Users/dpc/GamesDevelopment/Sonotope/titanium/Sit Your Mind/build/iphone/build

      I've just gone into the project folder in build/iphone and opened the xcode project myself, hit build, and it succeeded. But, how does the top Resources/app.js script relate to the build project? I mean I guess I could just try things out editing app.js (which appeared after shutting down/restarting a little while ago) and going from there…but if Titanium refuses to build, is it missing the opportunity to update the xcode project with the changes in app.js?

      — commented October 18th 2010 by David Plans
    • Ok just tried updating app.js with my own changes and running launch again from Titanium…it fails to build with error I described…but xcode does get the changes, and on build, updates the app on the simulator…so I guess this is a local Titanium problem…something in the configs? Where?

      — commented October 18th 2010 by David Plans
    • Also, the targets for xcode all all simulator-based so for example, the sound recording example (which won't record/play back or give peak power on simulator) is impossible to run from xcode on the device…plus, even if you have the phone registered with apple (which it doesn't detect), and you have the WWDR certificate (which it -does- detect), and you have the provisioning profile installed (not detected), the 'Install Now' button in Titanium doesn't work…

      — commented October 18th 2010 by David Plans
    • The app.js is included by Titanium itself and is a relative path back to your resources folder. The nice part is that you do not need to do a rebuild to test changes, they will be pulled in by the app automatically when you launch it again in the simulator. By that I mean you can leave the simulator open, make javascript changes and just close the app in the simulator and launch again while in the simulator. BTW - Since 4.1 is multitasking, you need to make sure to kill the app if it was sent to the background.

      The fact that you did a compile from the build folder shows that XCode is running fine and Titanium built the project as it should have.

      So here is my next question… Did you do a fresh install of XCode and Titanium today and haven't rebooted? I am wondering if an environment variable didn't get set in the shell and Finder and a reboot may get it set properly. Just a thought.

      — commented October 18th 2010 by John McKnight
    • So you have to click on 'upload profile' before it'll do so…after which I get…wait for it…YES! Same damn error:

      [INFO] Performing clean build
      Your TARGET_BUILD_DIR is incorrectly set. Most likely you have configured in Xcode a customized build location. Titanium does not currently support this configuration.
      [ERROR] Expected dir /Users/dpc/GamesDevelopment/Sonotope/titanium/Sit Your Mind/build/iphone/build/Release-iphoneos, was: /Users/dpc/GamesDevelopment/Sonotope/titanium/Sit Your Mind/build/iphone/build

      — commented October 18th 2010 by David Plans
    • You are experiencing a number of problems I have not encountered. For example I am able to record and play sound in the simulator with no issue and I get peak and average power readings. Does your Mac have the input set to its microphone or is there a chance it is set to another device?

      Install Now never seems to do what it ought to do. I usually go into the build folder and grab the compiled app and drop it into iTunes manually or I install through XCode.

      I won't lie, Titanium can be awkward in how it handles some things but once you are used to it you can be very productive, very quickly and have an app that looks and behaves like a native app.

      BTW - I get no notifications from the Q/A area and I am checking it from time to time so me not answering doesn't mean I quit helping, just that I haven't seen a new question.

      — commented October 18th 2010 by John McKnight
    • thanks john…doh! the input was set to line…I guess I'll stick with xcode then…but let me see if I get this correctly…do you need to use Titanium at least once, to get the xcode project built? Or can you bypass even that…

      — commented October 18th 2010 by David Plans
    • I find it's always something like that lol.

      Unless you install a new SDK, you don't necessarily need to use the Titanium tool after the project has been created. If you were to change a setting like project description or app icon you would want to use Titanium to force a rebuild but otherwise you don't need to.

      I will say that Ti.API.info(); method.html really comes in handy so figuring out what went wrong with Titanium would be helpful.

      — commented October 18th 2010 by John McKnight
    • Arrggg. It messed my link up. http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.API.info-method.html

      — commented October 18th 2010 by John McKnight
  • what is your system configuration?

    — answered October 19th 2010 by Peter Lum
    permalink
    0 Comments
  • I think this error is usually to do with a part of the path incorrectly being lowercase or uppercase, which you can switch in Xcode. So check that the path matches exactly, and if that doesn't work it might be worth seeing if taking the spaces out of the folder name works.

    — answered October 19th 2010 by Charles Davison
    permalink
    0 Comments
  • I don't know if this helps, but I was able to solve this by opening up XCode, selecting the Building tab in the Preferences and making sure that the "Place Build Products in" is set to Project Directory - rather than a Customized location.

    Hopefully this helps you and others…

    — answered January 15th 2011 by Noah Mattern
    permalink
    0 Comments
  • hi, thanks for your info craig. I resolved mine with the product path etc as "build" and then the per-configuration fields all as

    $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

    Titanium works now! (In your original article you didn't say you actually needed to put this in Per-Configuration Build Products Path, I'd hardcoded Debug-iphoneos etc so my paths were getting mixed up when compiling a simulator version)

    please can you explain why you use titanium.build for your immediate paths though? something to do with separating them from other platforms? also why you have $(BUILD_DIR)/build rather than just $(BUILD_DIR), which is set as build anyway in the product path.

    thanks
    j

    — answered September 13th 2011 by Józef Pierlejewski
    permalink
    0 Comments
  • Hi guys!

    I'm trying to get this to work but I don't understand where to fill in what in xCode. In my version I have the following lines to work with, what values should be where?

    xCode fields

    — answered September 23rd 2011 by Joel Finnstrom
    permalink
    4 Comments
    • turns out I don't know markdown either! ;) the screenshot from xCode is here:

      http://stage.cordovan.se/demo/pic.png

      — commented September 23rd 2011 by Joel Finnstrom
    • for now put

      Build products path: build
      (next 2 should prefill)

      Immediate Build files path: build
      (next 2 should prefill)

      Per configuration build products path:
      $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

      Per configuration immediate build:
      $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)

      (the debug & release rows should prefill)

      this should get you up and running hopefully

      you'll probably want to tweak it for test/deployment later eg probably something like in this image

      but for now just get it working with the settings above

      — commented September 23rd 2011 by Józef Pierlejewski
    • Thanks Józef for a great answer, it solved my problem…and generated a new one :( when I now try to distribute my app I get this, any ideas what it might mean?

      
      [ERROR] xcodebuild: error: The directory /projects/ctc/app/CTC Kalkylen/build/iphone contains 2 projects, including multiple projects with the current extension (.xcodeproj). Specify the project to use with the -project option.
      [ERROR] 
      [ERROR] Error: Traceback (most recent call last):
      

      — commented September 26th 2011 by Joel Finnstrom
    • not sure but from that error it seems you've ended up with 2 Xcode Projects in the same folder. also I would refer to Craig's original article . His set up is slightly different.

      — commented September 26th 2011 by Józef Pierlejewski
  • As I said, I read the forums and found other people with the same path problem…so my 'unique' first impression is, in fact, not unique. That was a poor reply.

    Can anyone speak sense about this?

    — answered October 18th 2010 by David Plans
    permalink
    0 Comments
  • Is that it? Is no-one from appcelerator going to answer this? Please note, I've just downloaded Titanium to a different OSX machine, followed instructions again, and again, got the error above…

    Surely this is a broken release?

    Once again, I'd love to be proved wrong…but right now, it seems like this is hookware, and that to get anywhere, these guys will want you to 'go pro' and pay hundreds a month.

    — answered October 18th 2010 by David Plans
    permalink
    1 Comment
    • I can vouch for the fact it isn't hookware. I have paid nothing and am having good luck with this tool. It isn't as polished as I would like but I am a lot more productive with Titanium than I am with Objective-C. I have played with other tools and found myself using Titanium over everything else that is out there right now. I have been actively using it for less than 3 weeks and yet I have a rather large and ambitious iOS app that I am building and so far it is looking great and working very well. I can try to help with the problems you are encountering and have asked a couple more questions below.

      — commented October 18th 2010 by John McKnight
  • I've just tried on a different machine with a fresh download of Titanium, followed instructions, same xcode path error.

    Surely this is a broken release?

    Anyone from appcelerator even here?

    — answered October 18th 2010 by David Plans
    permalink
    0 Comments
  • While I've never heard of your problem before (I'm quite new to the SDK myself), I can tell you that despite your unique first impression, Titanium Mobile is truly an incredibly powerful and effective tool for any developer, and you will not regret learning it. (it's really simple compared to others, so it shouldn't take that long!)

    — answered October 18th 2010 by Connor Zwick
    permalink
    3 Comments
    • Wow, what is that, a boilerplate "yeah we know it's broken, lemme issue a panic response item" response? Come on now.

      — commented October 18th 2010 by David Plans
    • One year later, the problem still exists, we all are in this hell together

      — commented February 24th 2012 by Francisco Valdez
    • Well - the problem DID go away. But now Apple have released XCode 4.3 and Appcelerator is not certified to work against it yet. The blog has all the info - Basically you install XCode 4.2 and all it good

      — commented February 24th 2012 by Nick Milner
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.