Titanium Mobile
  1. Titanium Mobile
  2. TIMOB-11599

CLI: Using XCode to run app on device won't work

    Details

      Description

      use xcode a lot to debug on device. I need this especially when i use motion sensors, gps ....
      Since the integration of node as the build system, i am facing quite a problem, XCode wont correctly launch the app on my device.
      I think that what s really happening is that the app package is not correctly done an maybe even not correctly copied

      remove the app from your device
      clean

      • build in ti studio
      • launch the xcode project
      • run on device Then you get this error
      [DEBUG] Loading: /var/mobile/Applications/92E009DA-982E-4BED-8857-525A93A84EE0/Pif Paf.app/app.js, Resource: app_js [ERROR] Error loading path: file://localhost/var/mobile/Applications/92E009DA-982E-4BED-8857-525A93A84EE0/Pif%20Paf.app/app.js, Error Domain=NSCocoaErrorDomain Code=260 "The operation couldn’t be completed. (Cocoa error 260.)" UserInfo=0x522b730 {NSFilePath=/var/mobile/Applications/92E009DA-982E-4BED-8857-525A93A84EE0/Pif Paf.app/app.js, NSUnderlyingError=0x522d850 "The operation couldn’t be completed. No such file or directory"} [ERROR] Script Error = Could not find the file app.js. 
      

        Activity

        Hide
        Chris Barber added a comment -

        @Martin, the commit you shared is good stuff. I'm doing major surgery to the iOS build command and have updated the code to reflect what you did. This hopefully will work better for you. Thanks!

        Show
        Chris Barber added a comment - @Martin, the commit you shared is good stuff. I'm doing major surgery to the iOS build command and have updated the code to reflect what you did. This hopefully will work better for you. Thanks!
        Hide
        Martin Guillon added a comment -

        @Chris: thanks a lot. Much appreciated. I only have one problem left now.
        If running on the sim from xcode, symlinks are not created. I remember you telling me about fixing something about this. Was it in the cli node module or in titanium_mobile sources? (dont really want to update node cli module if not really necessary).

        Thanks

        Show
        Martin Guillon added a comment - @Chris: thanks a lot. Much appreciated. I only have one problem left now. If running on the sim from xcode, symlinks are not created. I remember you telling me about fixing something about this. Was it in the cli node module or in titanium_mobile sources? (dont really want to update node cli module if not really necessary). Thanks
        Hide
        Chris Barber added a comment -

        @Martin, I'm working on the iOS build script a bunch this week. Actually, I found a few more issues when building directly from Xcode. i18n files and JSS are never generated during Xcode builds TIMOB-12348. Give me a couple days, then you can take a peek at the latest and greatest.

        Show
        Chris Barber added a comment - @Martin, I'm working on the iOS build script a bunch this week. Actually, I found a few more issues when building directly from Xcode. i18n files and JSS are never generated during Xcode builds TIMOB-12348 . Give me a couple days, then you can take a peek at the latest and greatest.
        Hide
        Martin Guillon added a comment -

        @chris: take your time. It s gonna be an android week for me anyway Still you had me hooked, wil take a peek for sure

        Show
        Martin Guillon added a comment - @chris: take your time. It s gonna be an android week for me anyway Still you had me hooked, wil take a peek for sure
        Hide
        Mike Matan added a comment -

        Hi, I've also encountered this problem, it's just as Martin describes it. I do ios module dev and debugging on device is often essential, looking forward to a getting a fix. Confirming steps to reproduce:

        Create fresh mobile project in titanium studio (build id 3.0.1.201212181159)
        Execute on iphone simulator
        Open project in xcode by going to project root directory and executing command line statement: open build/iphone/ProjectName.xcodeproj/
        Attempt to run on device from xcode.
        Get Application Error: "Could not find the file app.js"
        Console error message: [ERROR] Script Error = Could not find the file app.js.

        Show
        Mike Matan added a comment - Hi, I've also encountered this problem, it's just as Martin describes it. I do ios module dev and debugging on device is often essential, looking forward to a getting a fix. Confirming steps to reproduce: Create fresh mobile project in titanium studio (build id 3.0.1.201212181159) Execute on iphone simulator Open project in xcode by going to project root directory and executing command line statement: open build/iphone/ProjectName.xcodeproj/ Attempt to run on device from xcode. Get Application Error: "Could not find the file app.js" Console error message: [ERROR] Script Error = Could not find the file app.js.

          People

          • Assignee:
            Chris Barber
            Reporter:
            Martin Guillon
          • Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: